3 <script src="../resources/runner.js"></script>
5 // Use the threaded parser if available:
6 if (window.internals && window.internals.settings.setThreadedHTMLParser)
7 window.internals.settings.setThreadedHTMLParser(true);
9 var specURL = "resources/html5.html";
11 var iframe = document.createElement("iframe");
12 iframe.style.display = "none"; // Prevent creation of the rendering tree, so we only test HTML parsing.
13 iframe.sandbox = ''; // Prevent external script loads which could cause write() to return before completing the parse.
14 document.body.appendChild(iframe);
16 PerfTestRunner.prepareToMeasureValuesAsync({
17 description: "Measures performance of the threaded HTML parser (if available).",
22 iframe.onload = function() {
23 var now = PerfTestRunner.now();
24 PerfTestRunner.measureValueAsync(now - then);
28 var then = PerfTestRunner.now();
31 function onCompletedRun() {
33 // FIXME: This should probably remove the iframe, but that currently
34 // causes the threaded-parser to never send the load event for the main page.
35 // document.body.removeChild(iframe);