<!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>[169845] 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/169845">169845</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-06-11 15:08:34 -0700 (Wed, 11 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>WTR cleanup: push per-test viewport configuration into TestController, where platforms can customize it
https://bugs.webkit.org/show_bug.cgi?id=133770

Reviewed by Anders Carlsson.

Push the per-test view configuration up to TestController, so that platforms
can modify the behavior. This also allows platform-specific changes (e.g.
for threaded scrolling) to made without #ifefs.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::updateWebViewSizeForTest):
(WTR::TestController::updateWindowScaleForTest):
(WTR::shouldUseFixedLayout):
(WTR::TestController::updateLayoutTypeForTest):
(WTR::TestController::platformConfigureViewForTest):
(WTR::TestController::configureViewForTest):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::sizeWebViewForCurrentTest): Deleted.
(WTR::changeWindowScaleIfNeeded): Deleted.
(WTR::shouldUseThreadedScrolling): Deleted.
(WTR::updateThreadedScrollingForCurrentTest): Deleted.
(WTR::shouldUseFixedLayout): Deleted.
(WTR::updateLayoutType): Deleted.
* WebKitTestRunner/TestInvocation.h:
(WTR::TestInvocation::pathOrURL):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::shouldMakeViewportFlexible):
(WTR::TestController::platformConfigureViewForTest):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::shouldUseThreadedScrolling):
(WTR::TestController::platformConfigureViewForTest):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</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="#trunkToolsWebKitTestRunnerTestInvocationh">trunk/Tools/WebKitTestRunner/TestInvocation.h</a></li>
<li><a href="#trunkToolsWebKitTestRunneriosTestControllerIOSmm">trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacTestControllerMacmm">trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/ChangeLog        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-06-11  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        WTR cleanup: push per-test viewport configuration into TestController, where platforms can customize it
+        https://bugs.webkit.org/show_bug.cgi?id=133770
+
+        Reviewed by Anders Carlsson.
+        
+        Push the per-test view configuration up to TestController, so that platforms
+        can modify the behavior. This also allows platform-specific changes (e.g.
+        for threaded scrolling) to made without #ifefs.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::updateWebViewSizeForTest):
+        (WTR::TestController::updateWindowScaleForTest):
+        (WTR::shouldUseFixedLayout):
+        (WTR::TestController::updateLayoutTypeForTest):
+        (WTR::TestController::platformConfigureViewForTest):
+        (WTR::TestController::configureViewForTest):
+        * WebKitTestRunner/TestController.h:
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::invoke):
+        (WTR::sizeWebViewForCurrentTest): Deleted.
+        (WTR::changeWindowScaleIfNeeded): Deleted.
+        (WTR::shouldUseThreadedScrolling): Deleted.
+        (WTR::updateThreadedScrollingForCurrentTest): Deleted.
+        (WTR::shouldUseFixedLayout): Deleted.
+        (WTR::updateLayoutType): Deleted.
+        * WebKitTestRunner/TestInvocation.h:
+        (WTR::TestInvocation::pathOrURL):
+        * WebKitTestRunner/ios/TestControllerIOS.mm:
+        (WTR::shouldMakeViewportFlexible):
+        (WTR::TestController::platformConfigureViewForTest):
+        * WebKitTestRunner/mac/TestControllerMac.mm:
+        (WTR::shouldUseThreadedScrolling):
+        (WTR::TestController::platformConfigureViewForTest):
+
</ins><span class="cx"> 2014-06-11  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Add dependencies packages to efl install-dependencies file
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -668,6 +668,70 @@
</span><span class="cx">     return m_doneResetting;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
+void TestController::updateWebViewSizeForTest(const TestInvocation&amp; test)
+{
+    bool isSVGW3CTest = strstr(test.pathOrURL(), &quot;svg/W3C-SVG-1.1&quot;) || strstr(test.pathOrURL(), &quot;svg\\W3C-SVG-1.1&quot;);
+
+    unsigned width = viewWidth;
+    unsigned height = viewHeight;
+    if (isSVGW3CTest) {
+        width = w3cSVGViewWidth;
+        height = w3cSVGViewHeight;
+    }
+
+    mainWebView()-&gt;resizeTo(width, height);
+}
+
+void TestController::updateWindowScaleForTest(const TestInvocation&amp; test)
+{
+    WTF::String localPathOrUrl = String(test.pathOrURL());
+    bool needsHighDPIWindow = localPathOrUrl.findIgnoringCase(&quot;hidpi-&quot;) != notFound;
+    mainWebView()-&gt;changeWindowScaleIfNeeded(needsHighDPIWindow ? 2 : 1);
+}
+
+// FIXME: move into relevant platformConfigureViewForTest()?
+static bool shouldUseFixedLayout(const char* pathOrURL)
+{
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+    if (strstr(pathOrURL, &quot;device-adapt/&quot;) || strstr(pathOrURL, &quot;device-adapt\\&quot;))
+        return true;
+#endif
+
+#if USE(TILED_BACKING_STORE) &amp;&amp; PLATFORM(EFL)
+    if (strstr(pathOrURL, &quot;sticky/&quot;) || strstr(pathOrURL, &quot;sticky\\&quot;))
+        return true;
+#endif
+    return false;
+
+    UNUSED_PARAM(pathOrURL);
+}
+
+void TestController::updateLayoutTypeForTest(const TestInvocation&amp; test)
+{
+    auto viewOptions = adoptWK(WKMutableDictionaryCreate());
+    auto useFixedLayoutKey = adoptWK(WKStringCreateWithUTF8CString(&quot;UseFixedLayout&quot;));
+    auto useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(test.pathOrURL())));
+    WKDictionarySetItem(viewOptions.get(), useFixedLayoutKey.get(), useFixedLayoutValue.get());
+
+    ensureViewSupportsOptions(viewOptions.get());
+}
+
+#if !PLATFORM(COCOA)
+void TestController::platformConfigureViewForTest(const TestInvocation&amp;)
+{
+}
+#endif
+
+void TestController::configureViewForTest(const TestInvocation&amp; test)
+{
+    updateWebViewSizeForTest(test);
+    updateWindowScaleForTest(test);
+    updateLayoutTypeForTest(test);
+
+    platformConfigureViewForTest(test);
+}
+
</ins><span class="cx"> struct TestCommand {
</span><span class="cx">     TestCommand() : shouldDumpPixels(false), timeout(0) { }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/WebKitTestRunner/TestController.h        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -72,6 +72,8 @@
</span><span class="cx">     bool useWaitToDumpWatchdogTimer() { return m_useWaitToDumpWatchdogTimer; }
</span><span class="cx">     void runUntil(bool&amp; done, TimeoutDuration);
</span><span class="cx">     void notifyDone();
</span><ins>+    
+    void configureViewForTest(const TestInvocation&amp;);
</ins><span class="cx"> 
</span><span class="cx">     int getCustomTimeout();
</span><span class="cx">     
</span><span class="lines">@@ -116,12 +118,17 @@
</span><span class="cx">     void platformInitialize();
</span><span class="cx">     void platformDestroy();
</span><span class="cx">     void platformInitializeContext();
</span><ins>+    void platformConfigureViewForTest(const TestInvocation&amp;);
</ins><span class="cx">     void platformWillRunTest(const TestInvocation&amp;);
</span><span class="cx">     void platformRunUntil(bool&amp; done, double timeout);
</span><span class="cx">     void platformDidCommitLoadForFrame(WKPageRef, WKFrameRef);
</span><span class="cx">     void initializeInjectedBundlePath();
</span><span class="cx">     void initializeTestPluginDirectory();
</span><span class="cx"> 
</span><ins>+    void updateWebViewSizeForTest(const TestInvocation&amp;);
+    void updateWindowScaleForTest(const TestInvocation&amp;);
+    void updateLayoutTypeForTest(const TestInvocation&amp;);
+
</ins><span class="cx">     void decidePolicyForGeolocationPermissionRequestIfPossible();
</span><span class="cx"> 
</span><span class="cx">     // WKContextInjectedBundleClient
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -122,91 +122,19 @@
</span><span class="cx">     m_timeout = timeout;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void sizeWebViewForCurrentTest(const char* pathOrURL)
-{
-    bool isSVGW3CTest = strstr(pathOrURL, &quot;svg/W3C-SVG-1.1&quot;) || strstr(pathOrURL, &quot;svg\\W3C-SVG-1.1&quot;);
-
-    if (isSVGW3CTest)
-        TestController::shared().mainWebView()-&gt;resizeTo(TestController::w3cSVGViewWidth, TestController::w3cSVGViewHeight);
-    else
-        TestController::shared().mainWebView()-&gt;resizeTo(TestController::viewWidth, TestController::viewHeight);
-}
-
-static void changeWindowScaleIfNeeded(const char* pathOrURL)
-{
-    WTF::String localPathOrUrl = String(pathOrURL);
-    bool needsHighDPIWindow = localPathOrUrl.findIgnoringCase(&quot;hidpi-&quot;) != notFound;
-    TestController::shared().mainWebView()-&gt;changeWindowScaleIfNeeded(needsHighDPIWindow ? 2 : 1);
-}
-
</del><span class="cx"> static bool shouldLogFrameLoadDelegates(const char* pathOrURL)
</span><span class="cx"> {
</span><span class="cx">     return strstr(pathOrURL, &quot;loading/&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
-static bool shouldUseThreadedScrolling(const char* pathOrURL)
-{
-    return strstr(pathOrURL, &quot;tiled-drawing/&quot;);
-}
-#endif
-
</del><span class="cx"> static bool shouldLogHistoryClientCallbacks(const char* pathOrURL)
</span><span class="cx"> {
</span><span class="cx">     return strstr(pathOrURL, &quot;globalhistory/&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void updateThreadedScrollingForCurrentTest(const char* pathOrURL)
-{
-#if PLATFORM(COCOA)
-    WKRetainPtr&lt;WKMutableDictionaryRef&gt; viewOptions = adoptWK(WKMutableDictionaryCreate());
-    WKRetainPtr&lt;WKStringRef&gt; useThreadedScrollingKey = adoptWK(WKStringCreateWithUTF8CString(&quot;ThreadedScrolling&quot;));
-    WKRetainPtr&lt;WKBooleanRef&gt; useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(pathOrURL)));
-    WKDictionarySetItem(viewOptions.get(), useThreadedScrollingKey.get(), useThreadedScrollingValue.get());
-
-    WKRetainPtr&lt;WKStringRef&gt; useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString(&quot;RemoteLayerTree&quot;));
-    WKRetainPtr&lt;WKBooleanRef&gt; useRemoteLayerTreeValue = adoptWK(WKBooleanCreate(TestController::shared().shouldUseRemoteLayerTree()));
-    WKDictionarySetItem(viewOptions.get(), useRemoteLayerTreeKey.get(), useRemoteLayerTreeValue.get());
-
-    TestController::shared().ensureViewSupportsOptions(viewOptions.get());
-#else
-    UNUSED_PARAM(pathOrURL);
-#endif
-}
-
-static bool shouldUseFixedLayout(const char* pathOrURL)
-{
-#if ENABLE(CSS_DEVICE_ADAPTATION)
-    if (strstr(pathOrURL, &quot;device-adapt/&quot;) || strstr(pathOrURL, &quot;device-adapt\\&quot;))
-        return true;
-#endif
-
-#if USE(TILED_BACKING_STORE) &amp;&amp; PLATFORM(EFL)
-    if (strstr(pathOrURL, &quot;sticky/&quot;) || strstr(pathOrURL, &quot;sticky\\&quot;))
-        return true;
-#endif
-    return false;
-
-    UNUSED_PARAM(pathOrURL);
-}
-
-static void updateLayoutType(const char* pathOrURL)
-{
-    WKRetainPtr&lt;WKMutableDictionaryRef&gt; viewOptions = adoptWK(WKMutableDictionaryCreate());
-    WKRetainPtr&lt;WKStringRef&gt; useFixedLayoutKey = adoptWK(WKStringCreateWithUTF8CString(&quot;UseFixedLayout&quot;));
-    WKRetainPtr&lt;WKBooleanRef&gt; useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(pathOrURL)));
-    WKDictionarySetItem(viewOptions.get(), useFixedLayoutKey.get(), useFixedLayoutValue.get());
-
-    TestController::shared().ensureViewSupportsOptions(viewOptions.get());
-}
-
</del><span class="cx"> void TestInvocation::invoke()
</span><span class="cx"> {
</span><del>-    TestController::TimeoutDuration timeoutToUse = TestController::LongTimeout;
-    changeWindowScaleIfNeeded(m_pathOrURL.c_str());
-    sizeWebViewForCurrentTest(m_pathOrURL.c_str());
-    updateLayoutType(m_pathOrURL.c_str());
-    updateThreadedScrollingForCurrentTest(m_pathOrURL.c_str());
</del><ins>+    TestController::shared().configureViewForTest(*this);
</ins><span class="cx"> 
</span><span class="cx">     WKPageSetAddsVisitedLinks(TestController::shared().mainWebView()-&gt;page(), false);
</span><span class="cx"> 
</span><span class="lines">@@ -235,6 +163,8 @@
</span><span class="cx"> 
</span><span class="cx">     WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), beginTestMessageBody.get());
</span><span class="cx"> 
</span><ins>+    TestController::TimeoutDuration timeoutToUse = TestController::LongTimeout;
+
</ins><span class="cx">     TestController::shared().runUntil(m_gotInitialResponse, TestController::ShortTimeout);
</span><span class="cx">     if (!m_gotInitialResponse) {
</span><span class="cx">         m_errorMessage = &quot;Timed out waiting for initial response from web process\n&quot;;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.h        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx">     ~TestInvocation();
</span><span class="cx"> 
</span><span class="cx">     WKURLRef url() const;
</span><ins>+    const char* pathOrURL() const { return m_pathOrURL.c_str(); }
</ins><span class="cx"> 
</span><span class="cx">     void setIsPixelTest(const std::string&amp; expectedPixelHash);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunneriosTestControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -62,6 +62,22 @@
</span><span class="cx">     setCrashReportApplicationSpecificInformationToURL(testInvocation.url());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool shouldMakeViewportFlexible(const char* pathOrURL)
+{
+    return strstr(pathOrURL, &quot;viewport/&quot;);
+}
+
+void TestController::platformConfigureViewForTest(const TestInvocation&amp; test)
+{
+    if (shouldMakeViewportFlexible(test.pathOrURL())) {
+        const unsigned phoneViewHeight = 480;
+        const unsigned phoneViewWidth = 320;
+
+        mainWebView()-&gt;resizeTo(phoneViewWidth, phoneViewHeight);
+        // FIXME: more viewport config to do here.
+    }
+}
+
</ins><span class="cx"> void TestController::platformRunUntil(bool&amp; done, double timeout)
</span><span class="cx"> {
</span><span class="cx">     NSDate *endDate = (timeout &gt; 0) ? [NSDate dateWithTimeIntervalSinceNow:timeout] : [NSDate distantFuture];
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacTestControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm (169844 => 169845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm        2014-06-11 22:01:03 UTC (rev 169844)
+++ trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm        2014-06-11 22:08:34 UTC (rev 169845)
</span><span class="lines">@@ -73,6 +73,25 @@
</span><span class="cx">     setCrashReportApplicationSpecificInformationToURL(testInvocation.url());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool shouldUseThreadedScrolling(const char* pathOrURL)
+{
+    return strstr(pathOrURL, &quot;tiled-drawing/&quot;);
+}
+
+void TestController::platformConfigureViewForTest(const TestInvocation&amp; test)
+{
+    auto viewOptions = adoptWK(WKMutableDictionaryCreate());
+    auto useThreadedScrollingKey = adoptWK(WKStringCreateWithUTF8CString(&quot;ThreadedScrolling&quot;));
+    auto useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(test.pathOrURL())));
+    WKDictionarySetItem(viewOptions.get(), useThreadedScrollingKey.get(), useThreadedScrollingValue.get());
+
+    auto useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString(&quot;RemoteLayerTree&quot;));
+    auto useRemoteLayerTreeValue = adoptWK(WKBooleanCreate(shouldUseRemoteLayerTree()));
+    WKDictionarySetItem(viewOptions.get(), useRemoteLayerTreeKey.get(), useRemoteLayerTreeValue.get());
+
+    ensureViewSupportsOptions(viewOptions.get());
+}
+
</ins><span class="cx"> void TestController::platformRunUntil(bool&amp; done, double timeout)
</span><span class="cx"> {
</span><span class="cx">     NSDate *endDate = (timeout &gt; 0) ? [NSDate dateWithTimeIntervalSinceNow:timeout] : [NSDate distantFuture];
</span></span></pre>
</div>
</div>

</body>
</html>