|
1 <!doctype html> |
|
2 <meta charset=utf-8> |
|
3 <link rel=stylesheet href=../css/reset.css> |
|
4 <title>HTML editing conformance tests</title> |
|
5 <p>See the <a href=editing.html#tests>Tests</a> section of the specification |
|
6 for documentation. |
|
7 |
|
8 <p id=timing></p> |
|
9 |
|
10 <div id=log></div> |
|
11 |
|
12 <div id=test-container></div> |
|
13 |
|
14 <script src=../implementation.js></script> |
|
15 <script>var testsJsLibraryOnly = true</script> |
|
16 <script src=../tests.js></script> |
|
17 <script src=data.js></script> |
|
18 <script src=/resources/testharness.js></script> |
|
19 <script src=/resources/testharnessreport.js></script> |
|
20 <script> |
|
21 "use strict"; |
|
22 |
|
23 runTests(); |
|
24 |
|
25 function runTests() { |
|
26 var startTime = Date.now(); |
|
27 |
|
28 // Make document.body.innerHTML more tidy by removing unnecessary things. |
|
29 // We can't remove the testharness.js script, because at the time of this |
|
30 // writing, for some reason that stops it from adding appropriate CSS. |
|
31 [].forEach.call(document.querySelectorAll("script"), function(node) { |
|
32 if (!/testharness\.js$/.test(node.src)) { |
|
33 node.parentNode.removeChild(node); |
|
34 } |
|
35 }); |
|
36 |
|
37 browserTests.forEach(runConformanceTest); |
|
38 |
|
39 document.getElementById("test-container").parentNode |
|
40 .removeChild(document.getElementById("test-container")); |
|
41 |
|
42 var elapsed = Math.round(Date.now() - startTime)/1000; |
|
43 document.getElementById("timing").textContent = |
|
44 "Time elapsed: " + Math.floor(elapsed/60) + ":" |
|
45 + ((elapsed % 60) < 10 ? "0" : "") |
|
46 + (elapsed % 60).toFixed(3) + " min."; |
|
47 } |
|
48 </script> |