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