Commit d6c45992 authored by eric@webkit.org's avatar eric@webkit.org

Add a version of the html-parser benchmark which uses srcdoc instead of...

Add a version of the html-parser benchmark which uses srcdoc instead of document.write so it tests the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=107158

Reviewed by Ryosuke Niwa.

Currently this test even opts-in to the threaded parser if available.
We'll remove that line when the threaded parser becomes default or goes away.

* Parser/html-parser-srcdoc.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 061d5809
2013-01-17 Eric Seidel <eric@webkit.org>
Add a version of the html-parser benchmark which uses srcdoc instead of document.write so it tests the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=107158
Reviewed by Ryosuke Niwa.
Currently this test even opts-in to the threaded parser if available.
We'll remove that line when the threaded parser becomes default or goes away.
* Parser/html-parser-srcdoc.html: Added.
2013-01-16 Arnaud Renevier <a.renevier@sisa.samsung.com>
inconsistency in drawImage with target rect negative dimensions.
......
<!DOCTYPE html>
<body>
<script src="../resources/runner.js"></script>
<script>
// Use the threaded parser if available:
if (window.internals && window.internals.settings.setThreadedHTMLParser)
window.internals.settings.setThreadedHTMLParser(true);
var spec = PerfTestRunner.loadFile("resources/html5.html");
var iframe = document.createElement("iframe");
iframe.style.display = "none"; // Prevent creation of the rendering tree, so we only test HTML parsing.
iframe.sandbox = ''; // Prevent external script loads which could cause write() to return before completing the parse.
document.body.appendChild(iframe);
PerfTestRunner.prepareToMeasureValuesAsync({done: onCompletedRun, unit: 'ms'});
iframe.onload = function() {
var now = PerfTestRunner.now();
PerfTestRunner.measureValueAsync(now - then);
then = now;
iframe.srcdoc = spec;
}
var then = PerfTestRunner.now();
iframe.srcdoc = spec;
function onCompletedRun() {
iframe.onload = null;
// FIXME: This should probably remove the iframe, but that currently
// causes the threaded-parser to never send the load event for the main page.
// document.body.removeChild(iframe);
}
</script>
</body>
......@@ -64,3 +64,8 @@ SVG/SvgNestedUse.html
ShadowDOM
Canvas/drawimage.html
# Works fine, but is mostly useful to the threaded-parsing folks, as
# it's very similar to parser/html-parser.html just using
# srcdoc to load instead of document.write.
parser/html-parser-srcdoc.html
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment