Unreviewed, re-land r140051.
authordominicc@chromium.org <dominicc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 03:00:50 +0000 (03:00 +0000)
committerdominicc@chromium.org <dominicc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 03:00:50 +0000 (03:00 +0000)
I overzealously rolled this out; the test was intended to be
skipped, but was not skipped because of a typo in Skipped. See
<https://bugs.webkit.org/show_bug.cgi?id=107210>

* Parser/html-parser-srcdoc.html: Added.
* Skipped: Big-P Parser.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140088 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/Parser/html-parser-srcdoc.html [new file with mode: 0644]
PerformanceTests/Skipped

index 2d42db9..4492022 100644 (file)
@@ -1,3 +1,14 @@
+2013-01-17  Dominic Cooney  <dominicc@chromium.org>
+
+        Unreviewed, re-land r140051.
+
+        I overzealously rolled this out; the test was intended to be
+        skipped, but was not skipped because of a typo in Skipped. See
+        <https://bugs.webkit.org/show_bug.cgi?id=107210>
+
+        * Parser/html-parser-srcdoc.html: Added.
+        * Skipped: Big-P Parser.
+
 2013-01-17  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r140051.
diff --git a/PerformanceTests/Parser/html-parser-srcdoc.html b/PerformanceTests/Parser/html-parser-srcdoc.html
new file mode 100644 (file)
index 0000000..3e8d16b
--- /dev/null
@@ -0,0 +1,34 @@
+<!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>
index 76e3d50..d991b3c 100644 (file)
@@ -67,3 +67,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