| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <body> | 2 <body> |
| 3 <script src="../resources/runner.js"></script> | 3 <script src="../resources/runner.js"></script> |
| 4 <script> | 4 <script> |
| 5 // Use the threaded parser if available: | |
| 6 if (window.internals && window.internals.settings.setThreadedHTMLParser) | |
| 7 window.internals.settings.setThreadedHTMLParser(true); | |
| 8 | |
| 9 var specURL = "resources/html5.html"; | 5 var specURL = "resources/html5.html"; |
| 10 | 6 |
| 11 var iframe = document.createElement("iframe"); | 7 var iframe = document.createElement("iframe"); |
| 12 iframe.style.display = "none"; // Prevent creation of the rendering tree, so we
only test HTML parsing. | 8 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. | 9 iframe.sandbox = ''; // Prevent external script loads which could cause write()
to return before completing the parse. |
| 14 document.body.appendChild(iframe); | 10 document.body.appendChild(iframe); |
| 15 | 11 |
| 16 PerfTestRunner.prepareToMeasureValuesAsync({ | 12 PerfTestRunner.prepareToMeasureValuesAsync({ |
| 17 description: "Measures performance of the threaded HTML parser (if available
).", | 13 description: "Measures performance of the threaded HTML parser (if available
).", |
| 18 done: onCompletedRun, | 14 done: onCompletedRun, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 29 iframe.src = specURL; | 25 iframe.src = specURL; |
| 30 | 26 |
| 31 function onCompletedRun() { | 27 function onCompletedRun() { |
| 32 iframe.onload = null; | 28 iframe.onload = null; |
| 33 // FIXME: This should probably remove the iframe, but that currently | 29 // 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
. | 30 // causes the threaded-parser to never send the load event for the main page
. |
| 35 // document.body.removeChild(iframe); | 31 // document.body.removeChild(iframe); |
| 36 } | 32 } |
| 37 </script> | 33 </script> |
| 38 </body> | 34 </body> |
| OLD | NEW |