1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/imptests/editing/conformancetest/test_runtest.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +<!doctype html> 1.5 +<meta charset=utf-8> 1.6 +<link rel=stylesheet href=../css/reset.css> 1.7 +<title>HTML editing conformance tests</title> 1.8 +<p>See the <a href=editing.html#tests>Tests</a> section of the specification 1.9 +for documentation. 1.10 + 1.11 +<p id=timing></p> 1.12 + 1.13 +<div id=log></div> 1.14 + 1.15 +<div id=test-container></div> 1.16 + 1.17 +<script src=../implementation.js></script> 1.18 +<script>var testsJsLibraryOnly = true</script> 1.19 +<script src=../tests.js></script> 1.20 +<script src=data.js></script> 1.21 +<script src=/resources/testharness.js></script> 1.22 +<script src=/resources/testharnessreport.js></script> 1.23 +<script> 1.24 +"use strict"; 1.25 + 1.26 +runTests(); 1.27 + 1.28 +function runTests() { 1.29 + var startTime = Date.now(); 1.30 + 1.31 + // Make document.body.innerHTML more tidy by removing unnecessary things. 1.32 + // We can't remove the testharness.js script, because at the time of this 1.33 + // writing, for some reason that stops it from adding appropriate CSS. 1.34 + [].forEach.call(document.querySelectorAll("script"), function(node) { 1.35 + if (!/testharness\.js$/.test(node.src)) { 1.36 + node.parentNode.removeChild(node); 1.37 + } 1.38 + }); 1.39 + 1.40 + browserTests.forEach(runConformanceTest); 1.41 + 1.42 + document.getElementById("test-container").parentNode 1.43 + .removeChild(document.getElementById("test-container")); 1.44 + 1.45 + var elapsed = Math.round(Date.now() - startTime)/1000; 1.46 + document.getElementById("timing").textContent = 1.47 + "Time elapsed: " + Math.floor(elapsed/60) + ":" 1.48 + + ((elapsed % 60) < 10 ? "0" : "") 1.49 + + (elapsed % 60).toFixed(3) + " min."; 1.50 +} 1.51 +</script>