<!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>[180636] 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/180636">180636</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-02-25 13:27:37 -0800 (Wed, 25 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of TestInvocation::pathOrURL
https://bugs.webkit.org/show_bug.cgi?id=142021

Reviewed by Tim Horton.

The pathOrURL string is a relative path used as an argument to WebKitTestRunner,
but most code that uses it expected an absolute path.

This gets rid of the member and replaces all uses with a more descriptive &quot;urlContains&quot; method.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::updateWebViewSizeForTest):
(WTR::TestController::updateWindowScaleForTest):
(WTR::shouldUseFixedLayout):
(WTR::TestController::updateLayoutTypeForTest):

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::urlContains):
(WTR::TestInvocation::shouldLogFrameLoadDelegates):
(WTR::TestInvocation::shouldLogHistoryClientCallbacks):
(WTR::TestInvocation::invoke):
(WTR::shouldLogFrameLoadDelegates): Deleted.
(WTR::shouldLogHistoryClientCallbacks): Deleted.
* WebKitTestRunner/TestInvocation.h:
(WTR::TestInvocation::pathOrURL): Deleted.

* 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="#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 (180635 => 180636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-02-25 21:05:34 UTC (rev 180635)
+++ trunk/Tools/ChangeLog        2015-02-25 21:27:37 UTC (rev 180636)
</span><span class="lines">@@ -11,6 +11,43 @@
</span><span class="cx"> 
</span><span class="cx"> 2015-02-25  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Get rid of TestInvocation::pathOrURL
+        https://bugs.webkit.org/show_bug.cgi?id=142021
+
+        Reviewed by Tim Horton.
+
+        The pathOrURL string is a relative path used as an argument to WebKitTestRunner,
+        but most code that uses it expected an absolute path.
+
+        This gets rid of the member and replaces all uses with a more descriptive &quot;urlContains&quot; method.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::updateWebViewSizeForTest):
+        (WTR::TestController::updateWindowScaleForTest):
+        (WTR::shouldUseFixedLayout):
+        (WTR::TestController::updateLayoutTypeForTest):
+
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::TestInvocation):
+        (WTR::TestInvocation::urlContains):
+        (WTR::TestInvocation::shouldLogFrameLoadDelegates):
+        (WTR::TestInvocation::shouldLogHistoryClientCallbacks):
+        (WTR::TestInvocation::invoke):
+        (WTR::shouldLogFrameLoadDelegates): Deleted.
+        (WTR::shouldLogHistoryClientCallbacks): Deleted.
+        * WebKitTestRunner/TestInvocation.h:
+        (WTR::TestInvocation::pathOrURL): Deleted.
+
+        * WebKitTestRunner/ios/TestControllerIOS.mm:
+        (WTR::shouldMakeViewportFlexible):
+        (WTR::TestController::platformConfigureViewForTest):
+
+        * WebKitTestRunner/mac/TestControllerMac.mm:
+        (WTR::shouldUseThreadedScrolling):
+        (WTR::TestController::platformConfigureViewForTest):
+
+2015-02-25  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Layout test support for user content filters
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=142018
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (180635 => 180636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2015-02-25 21:05:34 UTC (rev 180635)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2015-02-25 21:27:37 UTC (rev 180636)
</span><span class="lines">@@ -717,7 +717,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TestController::updateWebViewSizeForTest(const TestInvocation&amp; test)
</span><span class="cx"> {
</span><del>-    bool isSVGW3CTest = strstr(test.pathOrURL(), &quot;svg/W3C-SVG-1.1&quot;) || strstr(test.pathOrURL(), &quot;svg\\W3C-SVG-1.1&quot;);
</del><ins>+    bool isSVGW3CTest = test.urlContains(&quot;svg/W3C-SVG-1.1&quot;) || test.urlContains(&quot;svg\\W3C-SVG-1.1&quot;);
</ins><span class="cx"> 
</span><span class="cx">     unsigned width = viewWidth;
</span><span class="cx">     unsigned height = viewHeight;
</span><span class="lines">@@ -731,33 +731,32 @@
</span><span class="cx"> 
</span><span class="cx"> void TestController::updateWindowScaleForTest(PlatformWebView* view, const TestInvocation&amp; test)
</span><span class="cx"> {
</span><del>-    WTF::String localPathOrUrl = String(test.pathOrURL());
-    bool needsHighDPIWindow = localPathOrUrl.findIgnoringCase(&quot;/hidpi-&quot;) != notFound;
</del><ins>+    bool needsHighDPIWindow = test.urlContains(&quot;/hidpi-&quot;);
</ins><span class="cx">     view-&gt;changeWindowScaleIfNeeded(needsHighDPIWindow ? 2 : 1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: move into relevant platformConfigureViewForTest()?
</span><del>-static bool shouldUseFixedLayout(const char* pathOrURL)
</del><ins>+static bool shouldUseFixedLayout(const TestInvocation&amp; test)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><del>-    if (strstr(pathOrURL, &quot;device-adapt/&quot;) || strstr(pathOrURL, &quot;device-adapt\\&quot;))
</del><ins>+    if (test.urlContains(&quot;device-adapt/&quot;) || test.urlContains(&quot;device-adapt\\&quot;))
</ins><span class="cx">         return true;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(TILED_BACKING_STORE) &amp;&amp; PLATFORM(EFL)
</span><del>-    if (strstr(pathOrURL, &quot;sticky/&quot;) || strstr(pathOrURL, &quot;sticky\\&quot;))
</del><ins>+    if (test.urlContains(&quot;sticky/&quot;) || test.urlContains(&quot;sticky\\&quot;))
</ins><span class="cx">         return true;
</span><span class="cx"> #endif
</span><span class="cx">     return false;
</span><span class="cx"> 
</span><del>-    UNUSED_PARAM(pathOrURL);
</del><ins>+    UNUSED_PARAM(test);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestController::updateLayoutTypeForTest(const TestInvocation&amp; test)
</span><span class="cx"> {
</span><span class="cx">     auto viewOptions = adoptWK(WKMutableDictionaryCreate());
</span><span class="cx">     auto useFixedLayoutKey = adoptWK(WKStringCreateWithUTF8CString(&quot;UseFixedLayout&quot;));
</span><del>-    auto useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(test.pathOrURL())));
</del><ins>+    auto useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(test)));
</ins><span class="cx">     WKDictionarySetItem(viewOptions.get(), useFixedLayoutKey.get(), useFixedLayoutValue.get());
</span><span class="cx"> 
</span><span class="cx">     ensureViewSupportsOptions(viewOptions.get());
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (180635 => 180636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2015-02-25 21:05:34 UTC (rev 180635)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2015-02-25 21:27:37 UTC (rev 180636)
</span><span class="lines">@@ -91,7 +91,6 @@
</span><span class="cx"> 
</span><span class="cx"> TestInvocation::TestInvocation(const std::string&amp; pathOrURL)
</span><span class="cx">     : m_url(AdoptWK, createWKURL(pathOrURL.c_str()))
</span><del>-    , m_pathOrURL(pathOrURL)
</del><span class="cx">     , m_dumpPixels(false)
</span><span class="cx">     , m_timeout(0)
</span><span class="cx">     , m_gotInitialResponse(false)
</span><span class="lines">@@ -100,6 +99,16 @@
</span><span class="cx">     , m_error(false)
</span><span class="cx">     , m_webProcessIsUnresponsive(false)
</span><span class="cx"> {
</span><ins>+    WKRetainPtr&lt;WKStringRef&gt; urlString = adoptWK(WKURLCopyString(m_url.get()));
+
+    size_t stringLength = WKStringGetLength(urlString.get());
+
+    Vector&lt;char&gt; urlVector;
+    urlVector.resize(stringLength + 1);
+
+    WKStringGetUTF8CString(urlString.get(), urlVector.data(), stringLength + 1);
+
+    m_urlString = String(urlVector.data(), stringLength);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestInvocation::~TestInvocation()
</span><span class="lines">@@ -111,20 +120,25 @@
</span><span class="cx">     return m_url.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool TestInvocation::urlContains(const char* searchString) const
+{
+    return m_urlString.contains(searchString, false);
+}
+
</ins><span class="cx"> void TestInvocation::setIsPixelTest(const std::string&amp; expectedPixelHash)
</span><span class="cx"> {
</span><span class="cx">     m_dumpPixels = true;
</span><span class="cx">     m_expectedPixelHash = expectedPixelHash;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool shouldLogFrameLoadDelegates(const char* pathOrURL)
</del><ins>+bool TestInvocation::shouldLogFrameLoadDelegates()
</ins><span class="cx"> {
</span><del>-    return strstr(pathOrURL, &quot;loading/&quot;);
</del><ins>+    return urlContains(&quot;loading/&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool shouldLogHistoryClientCallbacks(const char* pathOrURL)
</del><ins>+bool TestInvocation::shouldLogHistoryClientCallbacks()
</ins><span class="cx"> {
</span><del>-    return strstr(pathOrURL, &quot;globalhistory/&quot;);
</del><ins>+    return urlContains(&quot;globalhistory/&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestInvocation::invoke()
</span><span class="lines">@@ -135,7 +149,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_textOutput.clear();
</span><span class="cx"> 
</span><del>-    TestController::singleton().setShouldLogHistoryClientCallbacks(shouldLogHistoryClientCallbacks(m_pathOrURL.c_str()));
</del><ins>+    TestController::singleton().setShouldLogHistoryClientCallbacks(shouldLogHistoryClientCallbacks());
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: We should clear out visited links here.
</span><span class="cx"> 
</span><span class="lines">@@ -143,7 +157,7 @@
</span><span class="cx">     WKRetainPtr&lt;WKMutableDictionaryRef&gt; beginTestMessageBody = adoptWK(WKMutableDictionaryCreate());
</span><span class="cx"> 
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; dumpFrameLoadDelegatesKey = adoptWK(WKStringCreateWithUTF8CString(&quot;DumpFrameLoadDelegates&quot;));
</span><del>-    WKRetainPtr&lt;WKBooleanRef&gt; dumpFrameLoadDelegatesValue = adoptWK(WKBooleanCreate(shouldLogFrameLoadDelegates(m_pathOrURL.c_str())));
</del><ins>+    WKRetainPtr&lt;WKBooleanRef&gt; dumpFrameLoadDelegatesValue = adoptWK(WKBooleanCreate(shouldLogFrameLoadDelegates()));
</ins><span class="cx">     WKDictionarySetItem(beginTestMessageBody.get(), dumpFrameLoadDelegatesKey.get(), dumpFrameLoadDelegatesValue.get());
</span><span class="cx"> 
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; dumpPixelsKey = adoptWK(WKStringCreateWithUTF8CString(&quot;DumpPixels&quot;));
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (180635 => 180636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.h        2015-02-25 21:05:34 UTC (rev 180635)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h        2015-02-25 21:27:37 UTC (rev 180636)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     ~TestInvocation();
</span><span class="cx"> 
</span><span class="cx">     WKURLRef url() const;
</span><del>-    const char* pathOrURL() const { return m_pathOrURL.c_str(); }
</del><ins>+    bool urlContains(const char*) const;
</ins><span class="cx"> 
</span><span class="cx">     void setIsPixelTest(const std::string&amp; expectedPixelHash);
</span><span class="cx"> 
</span><span class="lines">@@ -63,9 +63,12 @@
</span><span class="cx"> 
</span><span class="cx">     static void forceRepaintDoneCallback(WKErrorRef, void* context);
</span><span class="cx"> 
</span><ins>+    bool shouldLogFrameLoadDelegates();
+    bool shouldLogHistoryClientCallbacks();
+
</ins><span class="cx">     WKRetainPtr&lt;WKURLRef&gt; m_url;
</span><del>-    std::string m_pathOrURL;
-    
</del><ins>+    WTF::String m_urlString;
+
</ins><span class="cx">     bool m_dumpPixels;
</span><span class="cx">     std::string m_expectedPixelHash;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunneriosTestControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (180635 => 180636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm        2015-02-25 21:05:34 UTC (rev 180635)
+++ trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm        2015-02-25 21:27:37 UTC (rev 180636)
</span><span class="lines">@@ -75,9 +75,9 @@
</span><span class="cx">     setCrashReportApplicationSpecificInformationToURL(testInvocation.url());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool shouldMakeViewportFlexible(const char* pathOrURL)
</del><ins>+static bool shouldMakeViewportFlexible(const TestInvocation&amp; test)
</ins><span class="cx"> {
</span><del>-    return strstr(pathOrURL, &quot;viewport/&quot;);
</del><ins>+    return test.urlContains(&quot;viewport/&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestController::platformResetPreferencesToConsistentValues()
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TestController::platformConfigureViewForTest(const TestInvocation&amp; test)
</span><span class="cx"> {
</span><del>-    if (shouldMakeViewportFlexible(test.pathOrURL())) {
</del><ins>+    if (shouldMakeViewportFlexible(test)) {
</ins><span class="cx">         const unsigned phoneViewHeight = 480;
</span><span class="cx">         const unsigned phoneViewWidth = 320;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacTestControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm (180635 => 180636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm        2015-02-25 21:05:34 UTC (rev 180635)
+++ trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm        2015-02-25 21:27:37 UTC (rev 180636)
</span><span class="lines">@@ -75,9 +75,9 @@
</span><span class="cx">     setCrashReportApplicationSpecificInformationToURL(testInvocation.url());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool shouldUseThreadedScrolling(const char* pathOrURL)
</del><ins>+static bool shouldUseThreadedScrolling(const TestInvocation&amp; test)
</ins><span class="cx"> {
</span><del>-    return strstr(pathOrURL, &quot;tiled-drawing/&quot;);
</del><ins>+    return test.urlContains(&quot;tiled-drawing/&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestController::platformResetPreferencesToConsistentValues()
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> {
</span><span class="cx">     auto viewOptions = adoptWK(WKMutableDictionaryCreate());
</span><span class="cx">     auto useThreadedScrollingKey = adoptWK(WKStringCreateWithUTF8CString(&quot;ThreadedScrolling&quot;));
</span><del>-    auto useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(test.pathOrURL())));
</del><ins>+    auto useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(test)));
</ins><span class="cx">     WKDictionarySetItem(viewOptions.get(), useThreadedScrollingKey.get(), useThreadedScrollingValue.get());
</span><span class="cx"> 
</span><span class="cx">     auto useRemoteLayerTreeKey = adoptWK(WKStringCreateWithUTF8CString(&quot;RemoteLayerTree&quot;));
</span><span class="lines">@@ -97,15 +97,10 @@
</span><span class="cx"> 
</span><span class="cx">     ensureViewSupportsOptions(viewOptions.get());
</span><span class="cx"> 
</span><del>-    WKURLRef url = test.url();
-    WKRetainPtr&lt;WKStringRef&gt; urlString = adoptWK(WKURLCopyString(url));
-
-    char urlCString[16384];
-    WKStringGetUTF8CString(urlString.get(), urlCString, 16384);
-    if (!strstr(urlCString, &quot;usercontentfilter/&quot;))
</del><ins>+    if (!test.urlContains(&quot;usercontentfilter/&quot;))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RetainPtr&lt;CFURLRef&gt; testURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, url));
</del><ins>+    RetainPtr&lt;CFURLRef&gt; testURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, test.url()));
</ins><span class="cx">     NSURL *filterURL = [(NSURL *)testURL.get() URLByAppendingPathExtension:@&quot;json&quot;];
</span><span class="cx"> 
</span><span class="cx">     NSStringEncoding encoding;
</span></span></pre>
</div>
</div>

</body>
</html>