<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160459] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160459">160459</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2013-12-11 14:47:07 -0800 (Wed, 11 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make it possible to compare layout test results between various configurations of WebKit
https://bugs.webkit.org/show_bug.cgi?id=125212
<rdar://problem/15199108>
Reviewed by Darin Adler.
* Scripts/compare-webkit-configurations: Added.
Add a script that allows comparison between the "normal" WebKit configuration
used for testing and a different configuration (e.g. with accelerated drawing
turned on, with the remote layer tree enabled, or WebKit1 vs WebKit2), like so:
compare-webkit-configurations -2 --comparison=accelerated-drawing compositing/background-color
This script runs the tests once in the default configuration, ignoring
all test expectations, writing the results out to a temporary directory.
It then runs the tests again in the modified configuration, against the
just-written temporary results.
Ref tests are treated as pixel tests, with their pixel output dumped to disk.
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
(initializeGlobalsFromCommandLineOptions):
Enable accelerated drawing if requested.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
Add --accelerated-drawing and --remote-layer-tree feature switches, which
are forwarded on to the test drivers.
Move those two and --complex-text into their own "feature switches" section.
Drive-by change "Mac OS X" to "OS X".
Add --treat-ref-tests-as-pixel-tests option, which treats ref tests
as traditional pixel tests (with PNGs dumped on disk), and
ignores e.g. -expected.html files.
* Scripts/webkitpy/port/base.py:
(Port.reference_files):
Pretend that there are no ref tests.
Since is_reference_html_file is intact, our mechanism to ignore
the expected files will continue working in this case.
* Scripts/webkitpy/port/driver.py:
(Driver.cmd_line):
Forward --accelerated-drawing and --remote-layer-tree to DRT/WKTR.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize):
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/TestController.h:
(WTR::TestController::shouldUseRemoteLayerTree):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::updateThreadedScrollingForCurrentTest):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
Parse and implement the three feature switches.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testsrun_webkit_testspy">trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportbasepy">trunk/Tools/Scripts/webkitpy/port/base.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportdriverpy">trunk/Tools/Scripts/webkitpy/port/driver.py</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacPlatformWebViewMacmm">trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsScriptscomparewebkitconfigurations">trunk/Tools/Scripts/compare-webkit-configurations</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/ChangeLog        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2013-12-11 Tim Horton <timothy_horton@apple.com>
+
+ Make it possible to compare layout test results between various configurations of WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=125212
+ <rdar://problem/15199108>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/compare-webkit-configurations: Added.
+ Add a script that allows comparison between the "normal" WebKit configuration
+ used for testing and a different configuration (e.g. with accelerated drawing
+ turned on, with the remote layer tree enabled, or WebKit1 vs WebKit2), like so:
+
+ compare-webkit-configurations -2 --comparison=accelerated-drawing compositing/background-color
+
+ This script runs the tests once in the default configuration, ignoring
+ all test expectations, writing the results out to a temporary directory.
+
+ It then runs the tests again in the modified configuration, against the
+ just-written temporary results.
+
+ Ref tests are treated as pixel tests, with their pixel output dumped to disk.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebPreferencesToConsistentValues):
+ (initializeGlobalsFromCommandLineOptions):
+ Enable accelerated drawing if requested.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ Add --accelerated-drawing and --remote-layer-tree feature switches, which
+ are forwarded on to the test drivers.
+ Move those two and --complex-text into their own "feature switches" section.
+ Drive-by change "Mac OS X" to "OS X".
+ Add --treat-ref-tests-as-pixel-tests option, which treats ref tests
+ as traditional pixel tests (with PNGs dumped on disk), and
+ ignores e.g. -expected.html files.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port.reference_files):
+ Pretend that there are no ref tests.
+ Since is_reference_html_file is intact, our mechanism to ignore
+ the expected files will continue working in this case.
+
+ * Scripts/webkitpy/port/driver.py:
+ (Driver.cmd_line):
+ Forward --accelerated-drawing and --remote-layer-tree to DRT/WKTR.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController):
+ (WTR::TestController::initialize):
+ (WTR::TestController::resetPreferencesToConsistentValues):
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::shouldUseRemoteLayerTree):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::updateThreadedScrollingForCurrentTest):
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView):
+ Parse and implement the three feature switches.
+
</ins><span class="cx"> 2013-12-11 Mario Sanchez Prada <mario.prada@samsung.com>
</span><span class="cx">
</span><span class="cx"> [ATK] Expose accessibility objects WAI-ARIA landmark roles
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -157,6 +157,7 @@
</span><span class="cx"> static int dumpTree = YES;
</span><span class="cx"> static int useTimeoutWatchdog = YES;
</span><span class="cx"> static int forceComplexText;
</span><ins>+static int useAcceleratedDrawing;
</ins><span class="cx"> static int gcBetweenTests;
</span><span class="cx"> static BOOL printSeparators;
</span><span class="cx"> static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
</span><span class="lines">@@ -654,7 +655,7 @@
</span><span class="cx"> [preferences setAcceleratedCompositingEnabled:YES];
</span><span class="cx"> #if USE(CA)
</span><span class="cx"> [preferences setCanvasUsesAcceleratedDrawing:YES];
</span><del>- [preferences setAcceleratedDrawingEnabled:NO];
</del><ins>+ [preferences setAcceleratedDrawingEnabled:useAcceleratedDrawing];
</ins><span class="cx"> #endif
</span><span class="cx"> [preferences setWebGLEnabled:NO];
</span><span class="cx"> [preferences setCSSRegionsEnabled:YES];
</span><span class="lines">@@ -787,6 +788,7 @@
</span><span class="cx"> {"tree", no_argument, &dumpTree, YES},
</span><span class="cx"> {"threaded", no_argument, &threaded, YES},
</span><span class="cx"> {"complex-text", no_argument, &forceComplexText, YES},
</span><ins>+ {"accelerated-drawing", no_argument, &useAcceleratedDrawing, YES},
</ins><span class="cx"> {"gc-between-tests", no_argument, &gcBetweenTests, YES},
</span><span class="cx"> {"no-timeout", no_argument, &useTimeoutWatchdog, NO},
</span><span class="cx"> {NULL, 0, NULL, 0}
</span></span></pre></div>
<a id="trunkToolsScriptscomparewebkitconfigurations"></a>
<div class="addfile"><h4>Added: trunk/Tools/Scripts/compare-webkit-configurations (0 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/compare-webkit-configurations         (rev 0)
+++ trunk/Tools/Scripts/compare-webkit-configurations        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+#!/usr/bin/env python
+
+# Copyright (C) 2013 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+import argparse
+import subprocess
+import sys
+import tempfile
+
+def main():
+ parser = argparse.ArgumentParser(description="Compare layout test results between two configurations of WebKit.")
+
+ parser.add_argument("--comparison", action="store", choices=["remote-layer-tree", "accelerated-drawing", "webkit2"], required=True, help="configuration to test")
+ parser.add_argument("-2", "--webkit2", action="store_true", default=False, help="use WebKit2 always (some configurations may force this)")
+ parser.add_argument('tests', metavar='TESTS', type=str, help='list of LayoutTest subdirectories to run', default=None, nargs="*")
+
+ args = parser.parse_args()
+
+ force_webkit2 = args.webkit2
+ if args.comparison == "remote-layer-tree":
+ print "Forcing use of WebKit2, as the remote layer tree depends on WebKit2."
+ force_webkit2 = True
+
+ if args.comparison == "webkit2" and force_webkit2:
+ print "It doesn't make sense to test WebKit1 vs. WebKit2 *and* force WebKit2 on."
+ sys.exit(1)
+
+ configuration_flag = flag_for_comparison(args.comparison)
+
+ results_directory = tempfile.mkdtemp(prefix="webkit-comparison-results-", suffix="-" + args.comparison)
+
+ # Run first in the default configuration, generating new baselines, then run
+ # again against those results in the configuration being tested.
+ run_webkit_tests(tests=args.tests, results_directory=results_directory, use_webkit2=force_webkit2, additional_arguments=["--no-show-results", "--new-baseline"])
+ run_webkit_tests(tests=args.tests, results_directory=results_directory, additional_arguments=[configuration_flag], use_webkit2=force_webkit2)
+
+def flag_for_comparison(comparison_name):
+ if comparison_name == "remote-layer-tree":
+ return "--remote-layer-tree"
+ if comparison_name == "accelerated-drawing":
+ return "--accelerated-drawing"
+ if comparison_name == "webkit2":
+ return "-2"
+
+ print "Unknown comparison:", comparison_name
+ sys.exit(1)
+
+def run_webkit_tests(tests, results_directory, use_webkit2, additional_arguments=[]):
+ if use_webkit2:
+ use_webkit2_arguments = ["-2"]
+ else:
+ use_webkit2_arguments = []
+
+ subprocess.call(["run-webkit-tests", "-p", "--force", "--treat-ref-tests-as-pixel-tests", "--additional-platform-directory=" + results_directory, "--run-singly", "--no-retry-failures"] + use_webkit2_arguments + additional_arguments + tests)
+
+if __name__ == '__main__':
+ main()
</ins><span class="cx">Property changes on: trunk/Tools/Scripts/compare-webkit-configurations
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="trunkToolsScriptswebkitpylayout_testsrun_webkit_testspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -104,15 +104,22 @@
</span><span class="cx"> default=False, help="Prefix used when spawning the Web process (Debug mode only)"),
</span><span class="cx"> ]))
</span><span class="cx">
</span><ins>+ option_group_definitions.append(("Feature Switches", [
+ optparse.make_option("--complex-text", action="store_true", default=False,
+ help="Use the complex text code path for all text (OS X and Windows only)"),
+ optparse.make_option("--accelerated-drawing", action="store_true", default=False,
+ help="Use accelerated drawing (OS X only)"),
+ optparse.make_option("--remote-layer-tree", action="store_true", default=False,
+ help="Use the remote layer tree drawing model (OS X WebKit2 only)"),
+ ]))
+
</ins><span class="cx"> option_group_definitions.append(("WebKit Options", [
</span><span class="cx"> optparse.make_option("--gc-between-tests", action="store_true", default=False,
</span><span class="cx"> help="Force garbage collection between each test"),
</span><del>- optparse.make_option("--complex-text", action="store_true", default=False,
- help="Use the complex text code path for all text (Mac OS X and Windows only)"),
</del><span class="cx"> optparse.make_option("-l", "--leaks", action="store_true", default=False,
</span><del>- help="Enable leaks checking (Mac OS X and Gtk+ only)"),
</del><ins>+ help="Enable leaks checking (OS X and Gtk+ only)"),
</ins><span class="cx"> optparse.make_option("-g", "--guard-malloc", action="store_true", default=False,
</span><del>- help="Enable Guard Malloc (Mac OS X only)"),
</del><ins>+ help="Enable Guard Malloc (OS X only)"),
</ins><span class="cx"> optparse.make_option("--threaded", action="store_true", default=False,
</span><span class="cx"> help="Run a concurrent JavaScript thread with each test"),
</span><span class="cx"> optparse.make_option("--webkit-test-runner", "-2", action="store_true",
</span><span class="lines">@@ -128,7 +135,7 @@
</span><span class="cx"> optparse.make_option("--no-pixel", "--no-pixel-tests", action="store_false",
</span><span class="cx"> dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),
</span><span class="cx"> optparse.make_option("--no-sample-on-timeout", action="store_false",
</span><del>- dest="sample_on_timeout", help="Don't run sample on timeout (Mac OS X only)"),
</del><ins>+ dest="sample_on_timeout", help="Don't run sample on timeout (OS X only)"),
</ins><span class="cx"> optparse.make_option("--no-ref-tests", action="store_true",
</span><span class="cx"> dest="no_ref_tests", help="Skip all ref tests"),
</span><span class="cx"> optparse.make_option("--tolerance",
</span><span class="lines">@@ -149,6 +156,8 @@
</span><span class="cx"> optparse.make_option("--no-new-test-results", action="store_false",
</span><span class="cx"> dest="new_test_results", default=True,
</span><span class="cx"> help="Don't create new baselines when no expected results exist"),
</span><ins>+ optparse.make_option("--treat-ref-tests-as-pixel-tests", action="store_true", default=False,
+ help="Run ref tests, but treat them as if they were traditional pixel tests"),
</ins><span class="cx">
</span><span class="cx"> #FIXME: we should support a comma separated list with --pixel-test-directory as well.
</span><span class="cx"> optparse.make_option("--pixel-test-directory", action="append", default=[], dest="pixel_test_directories",
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportbasepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/base.py (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/base.py        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/Scripts/webkitpy/port/base.py        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -542,6 +542,9 @@
</span><span class="cx"> def reference_files(self, test_name):
</span><span class="cx"> """Return a list of expectation (== or !=) and filename pairs"""
</span><span class="cx">
</span><ins>+ if self.get_option('treat_ref_tests_as_pixel_tests'):
+ return []
+
</ins><span class="cx"> reftest_list = self._get_reftest_list(test_name)
</span><span class="cx"> if not reftest_list:
</span><span class="cx"> reftest_list = []
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportdriverpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/driver.py        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -336,6 +336,10 @@
</span><span class="cx"> cmd.append('--gc-between-tests')
</span><span class="cx"> if self._port.get_option('complex_text'):
</span><span class="cx"> cmd.append('--complex-text')
</span><ins>+ if self._port.get_option('accelerated_drawing'):
+ cmd.append('--accelerated-drawing')
+ if self._port.get_option('remote_layer_tree'):
+ cmd.append('--remote-layer-tree')
</ins><span class="cx"> if self._port.get_option('threaded'):
</span><span class="cx"> cmd.append('--threaded')
</span><span class="cx"> if self._no_timeout:
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -111,6 +111,9 @@
</span><span class="cx"> , m_policyDelegatePermissive(false)
</span><span class="cx"> , m_handlesAuthenticationChallenges(false)
</span><span class="cx"> , m_shouldBlockAllPlugins(false)
</span><ins>+ , m_forceComplexText(false)
+ , m_shouldUseAcceleratedDrawing(false)
+ , m_shouldUseRemoteLayerTree(false)
</ins><span class="cx"> {
</span><span class="cx"> initialize(argc, argv);
</span><span class="cx"> controller = this;
</span><span class="lines">@@ -309,6 +312,18 @@
</span><span class="cx"> printSupportedFeatures = true;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ if (argument == "--complex-text") {
+ m_forceComplexText = true;
+ continue;
+ }
+ if (argument == "--accelerated-drawing") {
+ m_shouldUseAcceleratedDrawing = true;
+ continue;
+ }
+ if (argument == "--remote-layer-tree") {
+ m_shouldUseRemoteLayerTree = true;
+ continue;
+ }
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> // Skip any other arguments that begin with '--'.
</span><span class="lines">@@ -380,10 +395,21 @@
</span><span class="cx"> if (testPluginDirectory())
</span><span class="cx"> WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory());
</span><span class="cx">
</span><ins>+ if (m_forceComplexText)
+ WKContextSetAlwaysUsesComplexTextCodePath(m_context.get(), true);
+
</ins><span class="cx"> // Some preferences (notably mock scroll bars setting) currently cannot be re-applied to an existing view, so we need to set them now.
</span><span class="cx"> resetPreferencesToConsistentValues();
</span><span class="cx">
</span><del>- createWebViewWithOptions(0);
</del><ins>+ WKRetainPtr<WKMutableDictionaryRef> viewOptions;
+ if (m_shouldUseRemoteLayerTree) {
+ viewOptions = adoptWK(WKMutableDictionaryCreate());
+ WKRetainPtr<WKStringRef> useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString("RemoteLayerTree"));
+ WKRetainPtr<WKBooleanRef> useRemoteLayerTreeValue = adoptWK(WKBooleanCreate(m_shouldUseRemoteLayerTree));
+ WKDictionaryAddItem(viewOptions.get(), useRemoteLayerTreeKey.get(), useRemoteLayerTreeValue.get());
+ }
+
+ createWebViewWithOptions(viewOptions.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestController::createWebViewWithOptions(WKDictionaryRef options)
</span><span class="lines">@@ -557,6 +583,8 @@
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span><span class="cx"> WKPreferencesSetMediaSourceEnabled(preferences, true);
</span><span class="cx"> #endif
</span><ins>+
+ WKPreferencesSetAcceleratedDrawingEnabled(preferences, m_shouldUseAcceleratedDrawing);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool TestController::resetStateToConsistentValues()
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/WebKitTestRunner/TestController.h        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx"> EventSenderProxy* eventSenderProxy() { return m_eventSenderProxy.get(); }
</span><span class="cx">
</span><span class="cx"> void ensureViewSupportsOptions(WKDictionaryRef options);
</span><ins>+ bool shouldUseRemoteLayerTree() const { return m_shouldUseRemoteLayerTree; }
</ins><span class="cx">
</span><span class="cx"> // Runs the run loop until `done` is true or the timeout elapses.
</span><span class="cx"> enum TimeoutDuration { ShortTimeout, LongTimeout, NoTimeout, CustomTimeout };
</span><span class="lines">@@ -218,6 +219,10 @@
</span><span class="cx">
</span><span class="cx"> bool m_shouldBlockAllPlugins;
</span><span class="cx">
</span><ins>+ bool m_forceComplexText;
+ bool m_shouldUseAcceleratedDrawing;
+ bool m_shouldUseRemoteLayerTree;
+
</ins><span class="cx"> OwnPtr<EventSenderProxy> m_eventSenderProxy;
</span><span class="cx">
</span><span class="cx"> WorkQueueManager m_workQueueManager;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -151,6 +151,10 @@
</span><span class="cx"> WKRetainPtr<WKBooleanRef> useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(pathOrURL)));
</span><span class="cx"> WKDictionaryAddItem(viewOptions.get(), useThreadedScrollingKey.get(), useThreadedScrollingValue.get());
</span><span class="cx">
</span><ins>+ WKRetainPtr<WKStringRef> useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString("RemoteLayerTree"));
+ WKRetainPtr<WKBooleanRef> useRemoteLayerTreeValue = adoptWK(WKBooleanCreate(TestController::shared().shouldUseRemoteLayerTree()));
+ WKDictionaryAddItem(viewOptions.get(), useRemoteLayerTreeKey.get(), useRemoteLayerTreeValue.get());
+
</ins><span class="cx"> TestController::shared().ensureViewSupportsOptions(viewOptions.get());
</span><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(pathOrURL);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacPlatformWebViewMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (160458 => 160459)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2013-12-11 22:46:47 UTC (rev 160458)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2013-12-11 22:47:07 UTC (rev 160459)
</span><span class="lines">@@ -119,6 +119,7 @@
</span><span class="cx"> , m_options(options)
</span><span class="cx"> {
</span><span class="cx"> WKRetainPtr<WKStringRef> useThreadedScrollingKey(AdoptWK, WKStringCreateWithUTF8CString("ThreadedScrolling"));
</span><ins>+ WKRetainPtr<WKStringRef> useRemoteLayerTreeKey(AdoptWK, WKStringCreateWithUTF8CString("RemoteLayerTree"));
</ins><span class="cx"> WKTypeRef useThreadedScrollingValue = options ? WKDictionaryGetItemForKey(options, useThreadedScrollingKey.get()) : NULL;
</span><span class="cx"> bool useThreadedScrolling = useThreadedScrollingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useThreadedScrollingValue));
</span><span class="cx">
</span><span class="lines">@@ -126,6 +127,11 @@
</span><span class="cx"> WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroupRef);
</span><span class="cx"> WKPreferencesSetThreadedScrollingEnabled(preferences, useThreadedScrolling);
</span><span class="cx">
</span><ins>+ // FIXME: Not sure this is the best place for this; maybe we should have API to set this so we can do it from TestController?
+ WKTypeRef useRemoteLayerTreeValue = options ? WKDictionaryGetItemForKey(options, useRemoteLayerTreeKey.get()) : NULL;
+ if (useRemoteLayerTreeValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useRemoteLayerTreeValue)))
+ [[NSUserDefaults standardUserDefaults] setValue:@YES forKey:@"WebKit2UseRemoteLayerTreeDrawingArea"];
+
</ins><span class="cx"> NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight);
</span><span class="cx"> m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useThreadedScrolling:useThreadedScrolling];
</span><span class="cx"> [m_view setWindowOcclusionDetectionEnabled:NO];
</span></span></pre>
</div>
</div>
</body>
</html>