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