OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <meta charset=utf-8> |
| 3 <link rel=stylesheet href=../include/reset.css> |
| 4 <title>formatblock - HTML editing conformance tests</title> |
| 5 |
| 6 <p id=timing></p> |
| 7 |
| 8 <div id=log></div> |
| 9 |
| 10 <div id=test-container></div> |
| 11 |
| 12 <script src=../include/implementation.js></script> |
| 13 <script>var testsJsLibraryOnly = true</script> |
| 14 <script src=../include/tests.js></script> |
| 15 <script src=../data/formatblock.js></script> |
| 16 <script src=/resources/testharness.js></script> |
| 17 <script src=/resources/testharnessreport.js></script> |
| 18 <script> |
| 19 "use strict"; |
| 20 |
| 21 (function() { |
| 22 var startTime = Date.now(); |
| 23 |
| 24 // Make document.body.innerHTML more tidy by removing unnecessary things. |
| 25 [].forEach.call(document.querySelectorAll("script"), function(node) { |
| 26 node.parentNode.removeChild(node); |
| 27 }); |
| 28 |
| 29 if (true) { |
| 30 // Silly hack: the CSS styling flag should be true, not false, to match |
| 31 // expected results. This is because every group of tests except the |
| 32 // last (multitest) sets styleWithCSS automatically, and it sets it |
| 33 // first to false and then to true. Thus it's left at true at the end |
| 34 // of each group of tests, so in gentest.html it will be true when |
| 35 // starting each group of tests other than the first. But browsers are |
| 36 // supposed to default it to false when the page loads, so flip it. |
| 37 try { document.execCommand("styleWithCSS", false, "true") } catch(e) {} |
| 38 } |
| 39 |
| 40 browserTests.forEach(runConformanceTest); |
| 41 |
| 42 document.getElementById("test-container").parentNode |
| 43 .removeChild(document.getElementById("test-container")); |
| 44 |
| 45 var elapsed = Math.round(Date.now() - startTime)/1000; |
| 46 document.getElementById("timing").textContent = |
| 47 "Time elapsed: " + Math.floor(elapsed/60) + ":" |
| 48 + ((elapsed % 60) < 10 ? "0" : "") |
| 49 + (elapsed % 60).toFixed(3) + " min."; |
| 50 })(); |
| 51 </script> |
OLD | NEW |