<!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
&lt;rdar://problem/15199108&gt;

Reviewed by Darin Adler.

* Scripts/compare-webkit-configurations: Added.
Add a script that allows comparison between the &quot;normal&quot; 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 &quot;feature switches&quot; section.
Drive-by change &quot;Mac OS X&quot; to &quot;OS X&quot;.
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  &lt;timothy_horton@apple.com&gt;
+
+        Make it possible to compare layout test results between various configurations of WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=125212
+        &lt;rdar://problem/15199108&gt;
+
+        Reviewed by Darin Adler.
+
+        * Scripts/compare-webkit-configurations: Added.
+        Add a script that allows comparison between the &quot;normal&quot; 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 &quot;feature switches&quot; section.
+        Drive-by change &quot;Mac OS X&quot; to &quot;OS X&quot;.
+        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  &lt;mario.prada@samsung.com&gt;
</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&lt;CFStringRef&gt; 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">         {&quot;tree&quot;, no_argument, &amp;dumpTree, YES},
</span><span class="cx">         {&quot;threaded&quot;, no_argument, &amp;threaded, YES},
</span><span class="cx">         {&quot;complex-text&quot;, no_argument, &amp;forceComplexText, YES},
</span><ins>+        {&quot;accelerated-drawing&quot;, no_argument, &amp;useAcceleratedDrawing, YES},
</ins><span class="cx">         {&quot;gc-between-tests&quot;, no_argument, &amp;gcBetweenTests, YES},
</span><span class="cx">         {&quot;no-timeout&quot;, no_argument, &amp;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=&quot;Compare layout test results between two configurations of WebKit.&quot;)
+
+    parser.add_argument(&quot;--comparison&quot;, action=&quot;store&quot;, choices=[&quot;remote-layer-tree&quot;, &quot;accelerated-drawing&quot;, &quot;webkit2&quot;], required=True, help=&quot;configuration to test&quot;)
+    parser.add_argument(&quot;-2&quot;, &quot;--webkit2&quot;, action=&quot;store_true&quot;, default=False, help=&quot;use WebKit2 always (some configurations may force this)&quot;)
+    parser.add_argument('tests', metavar='TESTS', type=str, help='list of LayoutTest subdirectories to run', default=None, nargs=&quot;*&quot;)
+
+    args = parser.parse_args()
+
+    force_webkit2 = args.webkit2
+    if args.comparison == &quot;remote-layer-tree&quot;:
+        print &quot;Forcing use of WebKit2, as the remote layer tree depends on WebKit2.&quot;
+        force_webkit2 = True
+
+    if args.comparison == &quot;webkit2&quot; and force_webkit2:
+        print &quot;It doesn't make sense to test WebKit1 vs. WebKit2 *and* force WebKit2 on.&quot;
+        sys.exit(1)
+
+    configuration_flag = flag_for_comparison(args.comparison)
+
+    results_directory = tempfile.mkdtemp(prefix=&quot;webkit-comparison-results-&quot;, suffix=&quot;-&quot; + 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=[&quot;--no-show-results&quot;, &quot;--new-baseline&quot;])
+    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 == &quot;remote-layer-tree&quot;:
+        return &quot;--remote-layer-tree&quot;
+    if comparison_name == &quot;accelerated-drawing&quot;:
+        return &quot;--accelerated-drawing&quot;
+    if comparison_name == &quot;webkit2&quot;:
+        return &quot;-2&quot;
+
+    print &quot;Unknown comparison:&quot;, comparison_name
+    sys.exit(1)
+
+def run_webkit_tests(tests, results_directory, use_webkit2, additional_arguments=[]):
+    if use_webkit2:
+        use_webkit2_arguments = [&quot;-2&quot;]
+    else:
+        use_webkit2_arguments = []
+
+    subprocess.call([&quot;run-webkit-tests&quot;, &quot;-p&quot;, &quot;--force&quot;, &quot;--treat-ref-tests-as-pixel-tests&quot;, &quot;--additional-platform-directory=&quot; + results_directory, &quot;--run-singly&quot;, &quot;--no-retry-failures&quot;] + 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=&quot;Prefix used when spawning the Web process (Debug mode only)&quot;),
</span><span class="cx">     ]))
</span><span class="cx"> 
</span><ins>+    option_group_definitions.append((&quot;Feature Switches&quot;, [
+        optparse.make_option(&quot;--complex-text&quot;, action=&quot;store_true&quot;, default=False,
+            help=&quot;Use the complex text code path for all text (OS X and Windows only)&quot;),
+        optparse.make_option(&quot;--accelerated-drawing&quot;, action=&quot;store_true&quot;, default=False,
+            help=&quot;Use accelerated drawing (OS X only)&quot;),
+        optparse.make_option(&quot;--remote-layer-tree&quot;, action=&quot;store_true&quot;, default=False,
+            help=&quot;Use the remote layer tree drawing model (OS X WebKit2 only)&quot;),
+    ]))
+
</ins><span class="cx">     option_group_definitions.append((&quot;WebKit Options&quot;, [
</span><span class="cx">         optparse.make_option(&quot;--gc-between-tests&quot;, action=&quot;store_true&quot;, default=False,
</span><span class="cx">             help=&quot;Force garbage collection between each test&quot;),
</span><del>-        optparse.make_option(&quot;--complex-text&quot;, action=&quot;store_true&quot;, default=False,
-            help=&quot;Use the complex text code path for all text (Mac OS X and Windows only)&quot;),
</del><span class="cx">         optparse.make_option(&quot;-l&quot;, &quot;--leaks&quot;, action=&quot;store_true&quot;, default=False,
</span><del>-            help=&quot;Enable leaks checking (Mac OS X and Gtk+ only)&quot;),
</del><ins>+            help=&quot;Enable leaks checking (OS X and Gtk+ only)&quot;),
</ins><span class="cx">         optparse.make_option(&quot;-g&quot;, &quot;--guard-malloc&quot;, action=&quot;store_true&quot;, default=False,
</span><del>-            help=&quot;Enable Guard Malloc (Mac OS X only)&quot;),
</del><ins>+            help=&quot;Enable Guard Malloc (OS X only)&quot;),
</ins><span class="cx">         optparse.make_option(&quot;--threaded&quot;, action=&quot;store_true&quot;, default=False,
</span><span class="cx">             help=&quot;Run a concurrent JavaScript thread with each test&quot;),
</span><span class="cx">         optparse.make_option(&quot;--webkit-test-runner&quot;, &quot;-2&quot;, action=&quot;store_true&quot;,
</span><span class="lines">@@ -128,7 +135,7 @@
</span><span class="cx">         optparse.make_option(&quot;--no-pixel&quot;, &quot;--no-pixel-tests&quot;, action=&quot;store_false&quot;,
</span><span class="cx">             dest=&quot;pixel_tests&quot;, help=&quot;Disable pixel-to-pixel PNG comparisons&quot;),
</span><span class="cx">         optparse.make_option(&quot;--no-sample-on-timeout&quot;, action=&quot;store_false&quot;,
</span><del>-            dest=&quot;sample_on_timeout&quot;, help=&quot;Don't run sample on timeout (Mac OS X only)&quot;),
</del><ins>+            dest=&quot;sample_on_timeout&quot;, help=&quot;Don't run sample on timeout (OS X only)&quot;),
</ins><span class="cx">         optparse.make_option(&quot;--no-ref-tests&quot;, action=&quot;store_true&quot;,
</span><span class="cx">             dest=&quot;no_ref_tests&quot;, help=&quot;Skip all ref tests&quot;),
</span><span class="cx">         optparse.make_option(&quot;--tolerance&quot;,
</span><span class="lines">@@ -149,6 +156,8 @@
</span><span class="cx">         optparse.make_option(&quot;--no-new-test-results&quot;, action=&quot;store_false&quot;,
</span><span class="cx">             dest=&quot;new_test_results&quot;, default=True,
</span><span class="cx">             help=&quot;Don't create new baselines when no expected results exist&quot;),
</span><ins>+        optparse.make_option(&quot;--treat-ref-tests-as-pixel-tests&quot;, action=&quot;store_true&quot;, default=False,
+            help=&quot;Run ref tests, but treat them as if they were traditional pixel tests&quot;),
</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(&quot;--pixel-test-directory&quot;, action=&quot;append&quot;, default=[], dest=&quot;pixel_test_directories&quot;,
</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">         &quot;&quot;&quot;Return a list of expectation (== or !=) and filename pairs&quot;&quot;&quot;
</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 == &quot;--complex-text&quot;) {
+            m_forceComplexText = true;
+            continue;
+        }
+        if (argument == &quot;--accelerated-drawing&quot;) {
+            m_shouldUseAcceleratedDrawing = true;
+            continue;
+        }
+        if (argument == &quot;--remote-layer-tree&quot;) {
+            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&lt;WKMutableDictionaryRef&gt; viewOptions;
+    if (m_shouldUseRemoteLayerTree) {
+        viewOptions = adoptWK(WKMutableDictionaryCreate());
+        WKRetainPtr&lt;WKStringRef&gt; useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString(&quot;RemoteLayerTree&quot;));
+        WKRetainPtr&lt;WKBooleanRef&gt; 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&lt;EventSenderProxy&gt; 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&lt;WKBooleanRef&gt; useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(pathOrURL)));
</span><span class="cx">     WKDictionaryAddItem(viewOptions.get(), useThreadedScrollingKey.get(), useThreadedScrollingValue.get());
</span><span class="cx"> 
</span><ins>+    WKRetainPtr&lt;WKStringRef&gt; useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString(&quot;RemoteLayerTree&quot;));
+    WKRetainPtr&lt;WKBooleanRef&gt; 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&lt;WKStringRef&gt; useThreadedScrollingKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;ThreadedScrolling&quot;));
</span><ins>+    WKRetainPtr&lt;WKStringRef&gt; useRemoteLayerTreeKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;RemoteLayerTree&quot;));
</ins><span class="cx">     WKTypeRef useThreadedScrollingValue = options ? WKDictionaryGetItemForKey(options, useThreadedScrollingKey.get()) : NULL;
</span><span class="cx">     bool useThreadedScrolling = useThreadedScrollingValue &amp;&amp; WKBooleanGetValue(static_cast&lt;WKBooleanRef&gt;(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 &amp;&amp; WKBooleanGetValue(static_cast&lt;WKBooleanRef&gt;(useRemoteLayerTreeValue)))
+        [[NSUserDefaults standardUserDefaults] setValue:@YES forKey:@&quot;WebKit2UseRemoteLayerTreeDrawingArea&quot;];
+
</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>