<!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>[188851] trunk</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/188851">188851</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2015-08-23 23:48:28 -0700 (Sun, 23 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Content Filtering] REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/182356">r182356</a>): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
https://bugs.webkit.org/show_bug.cgi?id=147872
rdar://problem/22044000

Reviewed by Dan Bernstein.
Source/WebCore:

Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().

New API test: ContentFiltering.ServerRedirect

* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
* testing/Internals.cpp:
(WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
* testing/MockContentFilterSettings.cpp:
(WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
mock is installed whenever the filter is enabled.
* testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Set provisionalURL using the URL argument.

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Added the URL argument.
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Added an API test.

* TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Linked libWebCoreTestSupport in order to use MockContentFilter.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm: Added.
(-[ServerRedirectNavigationDelegate webView:didStartProvisionalNavigation:]): Expect the initial request URL.
(-[ServerRedirectNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]): Expect the redirect URL.
(-[ServerRedirectNavigationDelegate webView:didCommitNavigation:]):
(TEST): Tested that -[WKWebView URL] is updated after a redirect when content filtering is enabled.
* TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: Added.
(+[ServerRedirectPlugIn initialize]): Enable MockContentFilter.
* TestWebKitAPI/cocoa/TestProtocol.h: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.h.
* TestWebKitAPI/cocoa/TestProtocol.mm: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.mm.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoaderClienth">trunk/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingMockContentFilterSettingscpp">trunk/Source/WebCore/testing/MockContentFilterSettings.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingMockContentFilterSettingsh">trunk/Source/WebCore/testing/MockContentFilterSettings.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPIConfigurationsWebProcessPlugInxcconfig">trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaContentFilteringmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaContentFilteringPlugInmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaTestProtocolh">trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.h</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaTestProtocolmm">trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPImacTestProtocolh">trunk/Tools/TestWebKitAPI/mac/TestProtocol.h</a></li>
<li><a href="#trunkToolsTestWebKitAPImacTestProtocolmm">trunk/Tools/TestWebKitAPI/mac/TestProtocol.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/ChangeLog        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-08-23  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=147872
+        rdar://problem/22044000
+
+        Reviewed by Dan Bernstein.
+
+        Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
+
+        New API test: ContentFiltering.ServerRedirect
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/EmptyClients.h:
+        * loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
+        * testing/Internals.cpp:
+        (WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
+        * testing/MockContentFilterSettings.cpp:
+        (WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
+        mock is installed whenever the filter is enabled.
+        * testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.
+
</ins><span class="cx"> 2015-08-23  Geoffrey Garen  &lt;ggaren@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling back in r188803.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -3924,7 +3924,7 @@
</span><span class="cx">                 A19D934A1AA11B1E00B46C24 /* NetworkExtensionContentFilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = A19D93481AA11B1E00B46C24 /* NetworkExtensionContentFilter.mm */; };
</span><span class="cx">                 A19D934B1AA11B1E00B46C24 /* NetworkExtensionContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A19D93491AA11B1E00B46C24 /* NetworkExtensionContentFilter.h */; };
</span><span class="cx">                 A1B5B29E1AAA846E008B6042 /* MockContentFilterSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1B5B29C1AAA846E008B6042 /* MockContentFilterSettings.cpp */; };
</span><del>-                A1B5B29F1AAA846F008B6042 /* MockContentFilterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = A1B5B29D1AAA846E008B6042 /* MockContentFilterSettings.h */; };
</del><ins>+                A1B5B29F1AAA846F008B6042 /* MockContentFilterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = A1B5B29D1AAA846E008B6042 /* MockContentFilterSettings.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 A1BF6B821AA96C7D00AF4A8A /* MockContentFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1BF6B801AA96C7D00AF4A8A /* MockContentFilter.cpp */; };
</span><span class="cx">                 A1BF6B831AA96C7D00AF4A8A /* MockContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A1BF6B811AA96C7D00AF4A8A /* MockContentFilter.h */; };
</span><span class="cx">                 A1C797181883DD82000F5E1F /* DOMGestureEvent.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 0F54DCDD1880F901003EEDBB /* DOMGestureEvent.h */; };
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx">     virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&amp;, const ResourceResponse&amp;, int) override { return false; }
</span><span class="cx"> 
</span><span class="cx">     virtual void dispatchDidHandleOnloadEvents() override { }
</span><del>-    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override { }
</del><ins>+    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(const URL&amp;) override { }
</ins><span class="cx">     virtual void dispatchDidCancelClientRedirect() override { }
</span><span class="cx">     virtual void dispatchWillPerformClientRedirect(const URL&amp;, double, double) override { }
</span><span class="cx">     virtual void dispatchDidChangeLocationWithinPage() override { }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoaderClient.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">         virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&amp;, const ResourceResponse&amp;, int length) = 0;
</span><span class="cx"> 
</span><span class="cx">         virtual void dispatchDidHandleOnloadEvents() = 0;
</span><del>-        virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
</del><ins>+        virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(const URL&amp;) = 0;
</ins><span class="cx">         virtual void dispatchDidChangeProvisionalURL() { }
</span><span class="cx">         virtual void dispatchDidCancelClientRedirect() = 0;
</span><span class="cx">         virtual void dispatchWillPerformClientRedirect(const URL&amp;, double interval, double fireDate) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -365,7 +365,7 @@
</span><span class="cx">     m_request = request;
</span><span class="cx"> 
</span><span class="cx">     if (!redirectResponse.isNull() &amp;&amp; !m_documentLoader-&gt;isCommitted())
</span><del>-        frameLoader()-&gt;client().dispatchDidReceiveServerRedirectForProvisionalLoad();
</del><ins>+        frameLoader()-&gt;client().dispatchDidReceiveServerRedirectForProvisionalLoad(m_request.url());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceLoader::willSendRequest(ResourceRequest&amp;&amp; request, const ResourceResponse&amp; redirectResponse, std::function&lt;void(ResourceRequest&amp;&amp;)&gt;&amp;&amp; callback)
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><del>-#include &quot;MockContentFilter.h&quot;
</del><ins>+#include &quot;MockContentFilterSettings.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span><span class="lines">@@ -358,10 +358,6 @@
</span><span class="cx">     enableMockRTCPeerConnectionHandler();
</span><span class="cx">     WebCore::provideUserMediaTo(document-&gt;page(), new UserMediaClientMock());
</span><span class="cx"> #endif
</span><del>-
-#if ENABLE(CONTENT_FILTERING)
-    MockContentFilter::ensureInstalled();
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Document* Internals::contextDocument() const
</span></span></pre></div>
<a id="trunkSourceWebCoretestingMockContentFilterSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/MockContentFilterSettings.cpp (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockContentFilterSettings.cpp        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/testing/MockContentFilterSettings.cpp        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ContentFilter.h&quot;
</span><span class="cx"> #include &quot;ContentFilterUnblockHandler.h&quot;
</span><ins>+#include &quot;MockContentFilter.h&quot;
</ins><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -45,6 +46,12 @@
</span><span class="cx">     singleton() = MockContentFilterSettings();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MockContentFilterSettings::setEnabled(bool enabled)
+{
+    MockContentFilter::ensureInstalled();
+    m_enabled = enabled;
+}
+
</ins><span class="cx"> const String&amp; MockContentFilterSettings::unblockRequestURL() const
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;String&gt; unblockRequestURL = makeString(ContentFilter::urlScheme(), &quot;://&quot;, unblockURLHost());
</span></span></pre></div>
<a id="trunkSourceWebCoretestingMockContentFilterSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/MockContentFilterSettings.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockContentFilterSettings.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebCore/testing/MockContentFilterSettings.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">         Block
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    static MockContentFilterSettings&amp; singleton();
</del><ins>+    WTF_EXPORT_PRIVATE static MockContentFilterSettings&amp; singleton();
</ins><span class="cx">     static void reset();
</span><span class="cx">     static const char* unblockURLHost() { return &quot;mock-unblock&quot;; }
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     void deref() { }
</span><span class="cx"> 
</span><span class="cx">     bool enabled() const { return m_enabled; }
</span><del>-    void setEnabled(bool enabled) { m_enabled = enabled; }
</del><ins>+    WTF_EXPORT_PRIVATE void setEnabled(bool);
</ins><span class="cx"> 
</span><span class="cx">     const String&amp; blockedString() const { return m_blockedString; }
</span><span class="cx">     void setBlockedString(const String&amp; blockedString) { m_blockedString = blockedString; }
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-08-23  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=147872
+        rdar://problem/22044000
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Set provisionalURL using the URL argument.
+
</ins><span class="cx"> 2015-08-23  Geoffrey Garen  &lt;ggaren@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling back in r188803.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     virtual NSCachedURLResponse* willCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual void dispatchDidHandleOnloadEvents() override;
</span><del>-    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override;
</del><ins>+    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(const WebCore::URL&amp;) override;
</ins><span class="cx">     virtual void dispatchDidCancelClientRedirect() override;
</span><span class="cx">     virtual void dispatchWillPerformClientRedirect(const WebCore::URL&amp;, double interval, double fireDate) override;
</span><span class="cx">     virtual void dispatchDidChangeLocationWithinPage() override;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -578,9 +578,9 @@
</span><span class="cx">         CallFrameLoadDelegate(implementations-&gt;didHandleOnloadEventsForFrameFunc, webView, @selector(webView:didHandleOnloadEventsForFrame:), m_webFrame.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
</del><ins>+void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad(const URL&amp; url)
</ins><span class="cx"> {
</span><del>-    m_webFrame-&gt;_private-&gt;provisionalURL = core(m_webFrame.get())-&gt;loader().provisionalDocumentLoader()-&gt;url().string();
</del><ins>+    m_webFrame-&gt;_private-&gt;provisionalURL = url.string();
</ins><span class="cx"> 
</span><span class="cx">     WebView *webView = getWebView(m_webFrame.get());
</span><span class="cx">     WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit/win/ChangeLog        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-08-23  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=147872
+        rdar://problem/22044000
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Added the URL argument.
+        * WebCoreSupport/WebFrameLoaderClient.h:
+
</ins><span class="cx"> 2015-08-21  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         document.getElementsByTagName should return an HTMLCollection
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">         frameLoadDelegatePriv-&gt;didHandleOnloadEventsForFrame(webView, m_webFrame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
</del><ins>+void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad(const URL&amp;)
</ins><span class="cx"> {
</span><span class="cx">     WebView* webView = m_webFrame-&gt;webView();
</span><span class="cx">     COMPtr&lt;IWebFrameLoadDelegate&gt; frameLoadDelegate;
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     virtual bool shouldCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&amp;, const unsigned char* data, unsigned long long length);
</span><span class="cx"> 
</span><span class="cx">     virtual void dispatchDidHandleOnloadEvents() override;
</span><del>-    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override;
</del><ins>+    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(const WebCore::URL&amp;) override;
</ins><span class="cx">     virtual void dispatchDidCancelClientRedirect() override;
</span><span class="cx">     virtual void dispatchWillPerformClientRedirect(const WebCore::URL&amp;, double interval, double fireDate) override;
</span><span class="cx">     virtual void dispatchDidChangeLocationWithinPage() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit2/ChangeLog        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-08-23  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=147872
+        rdar://problem/22044000
+
+        Reviewed by Dan Bernstein.
+        
+        The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
+        the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
+        Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
</ins><span class="cx"> 2015-08-23  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Typo fix after r188842.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -278,21 +278,20 @@
</span><span class="cx">     webPage-&gt;injectedBundleLoaderClient().didHandleOnloadEventsForFrame(webPage, m_frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
</del><ins>+void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad(const URL&amp; url)
</ins><span class="cx"> {
</span><span class="cx">     WebPage* webPage = m_frame-&gt;page();
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     WebDocumentLoader&amp; documentLoader = static_cast&lt;WebDocumentLoader&amp;&gt;(*m_frame-&gt;coreFrame()-&gt;loader().provisionalDocumentLoader());
</span><del>-    const String&amp; url = documentLoader.url().string();
</del><span class="cx">     RefPtr&lt;API::Object&gt; userData;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><span class="cx">     webPage-&gt;injectedBundleLoaderClient().didReceiveServerRedirectForProvisionalLoadForFrame(webPage, m_frame, userData);
</span><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><del>-    webPage-&gt;send(Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame(m_frame-&gt;frameID(), documentLoader.navigationID(), url, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</del><ins>+    webPage-&gt;send(Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame(m_frame-&gt;frameID(), documentLoader.navigationID(), url.string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchDidChangeProvisionalURL()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&amp;, const WebCore::ResourceResponse&amp;, int length) override;
</span><span class="cx">     
</span><span class="cx">     virtual void dispatchDidHandleOnloadEvents() override;
</span><del>-    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() override;
</del><ins>+    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(const WebCore::URL&amp;) override;
</ins><span class="cx">     virtual void dispatchDidChangeProvisionalURL() override;
</span><span class="cx">     virtual void dispatchDidCancelClientRedirect() override;
</span><span class="cx">     virtual void dispatchWillPerformClientRedirect(const WebCore::URL&amp;, double interval, double fireDate) override;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Tools/ChangeLog        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,5 +1,27 @@
</span><span class="cx"> 2015-08-23  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=147872
+        rdar://problem/22044000
+
+        Reviewed by Dan Bernstein.
+        
+        Added an API test.
+
+        * TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Linked libWebCoreTestSupport in order to use MockContentFilter.
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm: Added.
+        (-[ServerRedirectNavigationDelegate webView:didStartProvisionalNavigation:]): Expect the initial request URL.
+        (-[ServerRedirectNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]): Expect the redirect URL.
+        (-[ServerRedirectNavigationDelegate webView:didCommitNavigation:]):
+        (TEST): Tested that -[WKWebView URL] is updated after a redirect when content filtering is enabled.
+        * TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: Added.
+        (+[ServerRedirectPlugIn initialize]): Enable MockContentFilter.
+        * TestWebKitAPI/cocoa/TestProtocol.h: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.h.
+        * TestWebKitAPI/cocoa/TestProtocol.mm: Renamed from Tools/TestWebKitAPI/mac/TestProtocol.mm.
+
+2015-08-23  Andy Estes  &lt;aestes@apple.com&gt;
+
</ins><span class="cx">         Fixed the 32-bit Mac build after r188844.
</span><span class="cx"> 
</span><span class="cx">         * TestWebKitAPI/WKWebViewConfigurationExtras.h:
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIConfigurationsWebProcessPlugInxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Tools/TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -27,4 +27,6 @@
</span><span class="cx"> PRODUCT_NAME = TestWebKitAPI;
</span><span class="cx"> EXECUTABLE_SUFFIX = .bundle;
</span><span class="cx"> WRAPPER_EXTENSION = wkbundle;
</span><del>-OTHER_LDFLAGS = $(inherited) -framework JavaScriptCore -framework WebKit;
</del><ins>+HEADER_SEARCH_PATHS = $(inherited) $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport;
+OTHER_LDFLAGS = $(inherited) -framework JavaScriptCore -framework WebKit -lWebCoreTestSupport;
+LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = &quot;@loader_path/../../..&quot;;
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -90,7 +90,6 @@
</span><span class="cx">                 7CCE7EA71A411A1300447C4C /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC90955C125548AA00083756 /* PlatformWebViewMac.mm */; };
</span><span class="cx">                 7CCE7EA81A411A1900447C4C /* SyntheticBackingScaleFactorWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = C081224413FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m */; };
</span><span class="cx">                 7CCE7EA91A411A1D00447C4C /* TestBrowsingContextLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29AB8AA2164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm */; };
</span><del>-                7CCE7EAA1A411A2400447C4C /* TestProtocol.mm in Sources */ = {isa = PBXBuildFile; fileRef = 290F4279172A23A500939FF0 /* TestProtocol.mm */; };
</del><span class="cx">                 7CCE7EAB1A411A2400447C4C /* WebKitAgnosticTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = C08587BD13FE956C001EF4E5 /* WebKitAgnosticTest.mm */; };
</span><span class="cx">                 7CCE7EAC1A411A3400447C4C /* Counters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C6BBD8B19CEA63000C1F5E0 /* Counters.cpp */; };
</span><span class="cx">                 7CCE7EAD1A411A3400447C4C /* JavaScriptTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0ADBE7A12FCA4D000D2C129 /* JavaScriptTest.cpp */; };
</span><span class="lines">@@ -269,6 +268,9 @@
</span><span class="cx">                 A13EBBB01B87436F00097110 /* BundleParametersPlugIn.mm in Sources */ = {isa = PBXBuildFile; fileRef = A13EBBAE1B87436F00097110 /* BundleParametersPlugIn.mm */; };
</span><span class="cx">                 A13EBBB11B87438000097110 /* BundleParameters.mm in Sources */ = {isa = PBXBuildFile; fileRef = A13EBBAC1B87436F00097110 /* BundleParameters.mm */; };
</span><span class="cx">                 A14FC5851B89739100D107EB /* WKWebViewConfigurationExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = A14FC5831B89739100D107EB /* WKWebViewConfigurationExtras.mm */; };
</span><ins>+                A14FC5881B8991BF00D107EB /* ContentFiltering.mm in Sources */ = {isa = PBXBuildFile; fileRef = A14FC5861B8991B600D107EB /* ContentFiltering.mm */; };
+                A14FC58B1B89927100D107EB /* ContentFilteringPlugIn.mm in Sources */ = {isa = PBXBuildFile; fileRef = A14FC5891B89927100D107EB /* ContentFilteringPlugIn.mm */; };
+                A14FC5901B8AE36F00D107EB /* TestProtocol.mm in Sources */ = {isa = PBXBuildFile; fileRef = A14FC58E1B8AE36500D107EB /* TestProtocol.mm */; };
</ins><span class="cx">                 A57A34F216AF6B2B00C2501F /* PageVisibilityStateWithWindowChanges.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = A57A34F116AF69E200C2501F /* PageVisibilityStateWithWindowChanges.html */; };
</span><span class="cx">                 A5E2027515B21F6E00C13E14 /* WindowlessWebViewWithMedia.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = A5E2027015B2180600C13E14 /* WindowlessWebViewWithMedia.html */; };
</span><span class="cx">                 B55AD1D5179F3B3000AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55AD1D3179F3ABF00AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp */; };
</span><span class="lines">@@ -487,8 +489,6 @@
</span><span class="cx">                 290A9BB81735F42300D71BBC /* OpenNewWindow.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OpenNewWindow.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;custom-protocol-sync-xhr.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 290F4276172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomProtocolsSyncXHRTest.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                290F4279172A23A500939FF0 /* TestProtocol.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestProtocol.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
-                290F427A172A23A500939FF0 /* TestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestProtocol.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 291861FD17BD4DC700D4E41E /* StopLoadingFromDidFinishLoading.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StopLoadingFromDidFinishLoading.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2943BE84161DFEB800999E3D /* UserContentTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UserContentTest.mm; path = WebKit2ObjC/UserContentTest.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 297234B2173AD04800983601 /* CustomProtocolsInvalidScheme.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CustomProtocolsInvalidScheme.mm; path = WebKit2ObjC/CustomProtocolsInvalidScheme.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -639,6 +639,10 @@
</span><span class="cx">                 A13EBBAE1B87436F00097110 /* BundleParametersPlugIn.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BundleParametersPlugIn.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A14FC5831B89739100D107EB /* WKWebViewConfigurationExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewConfigurationExtras.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A14FC5841B89739100D107EB /* WKWebViewConfigurationExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewConfigurationExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A14FC5861B8991B600D107EB /* ContentFiltering.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentFiltering.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A14FC5891B89927100D107EB /* ContentFilteringPlugIn.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentFilteringPlugIn.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A14FC58D1B8AE36500D107EB /* TestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProtocol.h; path = cocoa/TestProtocol.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A14FC58E1B8AE36500D107EB /* TestProtocol.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestProtocol.mm; path = cocoa/TestProtocol.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A1A4FE5D18DD3DB700B5EA8A /* Download.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Download.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A1FDFD2E19C288BB005148A4 /* WKImageCreateCGImageCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKImageCreateCGImageCrash.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A57A34EF16AF677200C2501F /* PageVisibilityStateWithWindowChanges.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PageVisibilityStateWithWindowChanges.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -858,6 +862,8 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 A13EBB441B87332B00097110 /* WebProcessPlugIn */,
</span><span class="cx">                                 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */,
</span><ins>+                                A14FC58D1B8AE36500D107EB /* TestProtocol.h */,
+                                A14FC58E1B8AE36500D107EB /* TestProtocol.mm */,
</ins><span class="cx">                                 A14FC5841B89739100D107EB /* WKWebViewConfigurationExtras.h */,
</span><span class="cx">                                 A14FC5831B89739100D107EB /* WKWebViewConfigurationExtras.mm */,
</span><span class="cx">                         );
</span><span class="lines">@@ -889,6 +895,8 @@
</span><span class="cx">                                 7CEFA9641AC0B9E200B910FD /* _WKUserContentExtensionStore.mm */,
</span><span class="cx">                                 A13EBBAC1B87436F00097110 /* BundleParameters.mm */,
</span><span class="cx">                                 A13EBBAE1B87436F00097110 /* BundleParametersPlugIn.mm */,
</span><ins>+                                A14FC5861B8991B600D107EB /* ContentFiltering.mm */,
+                                A14FC5891B89927100D107EB /* ContentFilteringPlugIn.mm */,
</ins><span class="cx">                                 A1A4FE5D18DD3DB700B5EA8A /* Download.mm */,
</span><span class="cx">                                 2D1FE0AF1AD465C1006CD9E6 /* FixedLayoutSize.mm */,
</span><span class="cx">                                 37D36ED61AF42ECD00BAF5D9 /* LoadAlternateHTMLString.mm */,
</span><span class="lines">@@ -1234,8 +1242,6 @@
</span><span class="cx">                                 C081224413FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m */,
</span><span class="cx">                                 29AB8AA3164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.h */,
</span><span class="cx">                                 29AB8AA2164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm */,
</span><del>-                                290F427A172A23A500939FF0 /* TestProtocol.h */,
-                                290F4279172A23A500939FF0 /* TestProtocol.mm */,
</del><span class="cx">                                 C08587BE13FE956C001EF4E5 /* WebKitAgnosticTest.h */,
</span><span class="cx">                                 C08587BD13FE956C001EF4E5 /* WebKitAgnosticTest.mm */,
</span><span class="cx">                         );
</span><span class="lines">@@ -1596,6 +1602,7 @@
</span><span class="cx">                                 7CCE7F3A1A411B8E00447C4C /* MathExtras.cpp in Sources */,
</span><span class="cx">                                 7C89D2AC1A69B80D003A5FDE /* WKPageConfiguration.cpp in Sources */,
</span><span class="cx">                                 7CCE7F391A411B8E00447C4C /* MD5.cpp in Sources */,
</span><ins>+                                A14FC5901B8AE36F00D107EB /* TestProtocol.mm in Sources */,
</ins><span class="cx">                                 7CCE7F3B1A411B8E00447C4C /* MediaTime.cpp in Sources */,
</span><span class="cx">                                 7CCE7EB21A411A5100447C4C /* MemoryCacheAddImageToCacheIOS.mm in Sources */,
</span><span class="cx">                                 7CCE7EC51A411A7E00447C4C /* MemoryCacheDisableWithinResourceLoadDelegate.mm in Sources */,
</span><span class="lines">@@ -1603,6 +1610,7 @@
</span><span class="cx">                                 7CCE7F3C1A411B8E00447C4C /* MetaAllocator.cpp in Sources */,
</span><span class="cx">                                 7CCE7F011A411AE600447C4C /* MouseMoveAfterCrash.cpp in Sources */,
</span><span class="cx">                                 7CCE7F241A411AF600447C4C /* Navigation.mm in Sources */,
</span><ins>+                                A14FC5881B8991BF00D107EB /* ContentFiltering.mm in Sources */,
</ins><span class="cx">                                 7CCE7F021A411AE600447C4C /* NewFirstVisuallyNonEmptyLayout.cpp in Sources */,
</span><span class="cx">                                 7CCE7F031A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutFails.cpp in Sources */,
</span><span class="cx">                                 7CCE7F041A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutForImages.cpp in Sources */,
</span><span class="lines">@@ -1669,7 +1677,6 @@
</span><span class="cx">                                 7CCE7F491A411B8E00447C4C /* TemporaryChange.cpp in Sources */,
</span><span class="cx">                                 7CCE7F161A411AE600447C4C /* TerminateTwice.cpp in Sources */,
</span><span class="cx">                                 7CCE7EA91A411A1D00447C4C /* TestBrowsingContextLoadDelegate.mm in Sources */,
</span><del>-                                7CCE7EAA1A411A2400447C4C /* TestProtocol.mm in Sources */,
</del><span class="cx">                                 7CCE7EAE1A411A3400447C4C /* TestsController.cpp in Sources */,
</span><span class="cx">                                 CE3524F91B1441C40028A7C5 /* TextFieldDidBeginAndEndEditing.cpp in Sources */,
</span><span class="cx">                                 7CCE7EDD1A411A9200447C4C /* TimeRanges.cpp in Sources */,
</span><span class="lines">@@ -1736,6 +1743,7 @@
</span><span class="cx">                                 A13EBBAA1B87428D00097110 /* WebProcessPlugIn.mm in Sources */,
</span><span class="cx">                                 A13EBBB01B87436F00097110 /* BundleParametersPlugIn.mm in Sources */,
</span><span class="cx">                                 A13EBBAB1B87434600097110 /* PlatformUtilitiesCocoa.mm in Sources */,
</span><ins>+                                A14FC58B1B89927100D107EB /* ContentFilteringPlugIn.mm in Sources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaContentFilteringmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm (0 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &quot;config.h&quot;
+
+#if WK_API_ENABLED
+
+#import &quot;PlatformUtilities.h&quot;
+#import &quot;TestProtocol.h&quot;
+#import &quot;WKWebViewConfigurationExtras.h&quot;
+#import &lt;WebKit/WKBrowsingContextController.h&gt;
+#import &lt;WebKit/WKNavigationDelegate.h&gt;
+#import &lt;WebKit/WKWebView.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+static bool isDone = false;
+
+@interface ServerRedirectNavigationDelegate : NSObject &lt;WKNavigationDelegate&gt;
+@end
+
+@implementation ServerRedirectNavigationDelegate
+
+- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
+{
+    EXPECT_WK_STREQ(webView.URL.absoluteString, @&quot;http://redirect/?pass&quot;);
+}
+
+- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation
+{
+    EXPECT_WK_STREQ(webView.URL.absoluteString, @&quot;http://pass/&quot;);
+}
+
+- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation
+{
+    isDone = true;
+}
+
+@end
+
+TEST(ContentFiltering, ServerRedirect)
+{
+    [NSURLProtocol registerClass:[TestProtocol class]];
+    [WKBrowsingContextController registerSchemeForCustomProtocol:[TestProtocol scheme]];
+
+    auto configuration = retainPtr([WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:@&quot;ServerRedirectPlugIn&quot;]);
+    auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]);
+    auto navigationDelegate = adoptNS([[ServerRedirectNavigationDelegate alloc] init]);
+    [webView setNavigationDelegate:navigationDelegate.get()];
+    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@&quot;http://redirect?pass&quot;]]];
+    TestWebKitAPI::Util::run(&amp;isDone);
+
+    [WKBrowsingContextController unregisterSchemeForCustomProtocol:[TestProtocol scheme]];
+    [NSURLProtocol unregisterClass:[TestProtocol class]];
+}
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaContentFilteringPlugInmmfromrev188845trunkSourceWebCoretestingMockContentFilterSettingscpp"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm (from rev 188845, trunk/Source/WebCore/testing/MockContentFilterSettings.cpp) (0 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &quot;config.h&quot;
+
+#if WK_API_ENABLED
+
+#import &quot;MockContentFilterSettings.h&quot;
+#import &lt;WebKit/WKWebProcessPlugIn.h&gt;
+
+@interface ServerRedirectPlugIn : NSObject &lt;WKWebProcessPlugIn&gt;
+@end
+
+@implementation ServerRedirectPlugIn
+
++ (void)initialize
+{
+    using MockContentFilterSettings = WebCore::MockContentFilterSettings;
+    using Decision = MockContentFilterSettings::Decision;
+    using DecisionPoint = MockContentFilterSettings::DecisionPoint;
+    MockContentFilterSettings&amp; settings = MockContentFilterSettings::singleton();
+    settings.setEnabled(true);
+    settings.setDecision(Decision::Allow);
+    settings.setDecisionPoint(DecisionPoint::AfterAddData);
+}
+
+@end
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaTestProtocolhfromrev188845trunkToolsTestWebKitAPImacTestProtocolh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.h (from rev 188845, trunk/Tools/TestWebKitAPI/mac/TestProtocol.h) (0 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.h                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * 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.
+ */
+
+#ifndef TestProtocol_h
+#define TestProtocol_h
+
+@interface TestProtocol : NSURLProtocol {
+}
++ (NSString *)scheme;
+@end
+
+#endif // TestProtocol_h
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaTestProtocolmmfromrev188845trunkToolsTestWebKitAPImacTestProtocolmm"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.mm (from rev 188845, trunk/Tools/TestWebKitAPI/mac/TestProtocol.mm) (0 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.mm                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestProtocol.mm        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/*
+ * 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 &quot;config.h&quot;
+#import &quot;TestProtocol.h&quot;
+
+#import &lt;wtf/RetainPtr.h&gt;
+
+// Even though NSURLProtocol is capable of generating redirect responses for any protocol, WebCore asserts if a redirect is not in the http family.
+// See http://webkit.org/b/147870 for details.
+static NSString *testScheme = @&quot;http&quot;;
+
+@implementation TestProtocol
+
++ (BOOL)canInitWithRequest:(NSURLRequest *)request
+{
+    return [request.URL.scheme caseInsensitiveCompare:testScheme] == NSOrderedSame;
+}
+
++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
+{
+    return request;
+}
+
++ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b
+{
+    return NO;
+}
+
++ (NSString *)scheme
+{
+    return testScheme;
+}
+
+- (void)startLoading
+{
+    NSURL *requestURL = self.request.URL;
+    EXPECT_TRUE([requestURL.scheme isEqualToString:testScheme]);
+
+    NSData *data = [@&quot;PASS&quot; dataUsingEncoding:NSASCIIStringEncoding];
+    RetainPtr&lt;NSURLResponse&gt; response = adoptNS([[NSURLResponse alloc] initWithURL:requestURL MIMEType:@&quot;text/html&quot; expectedContentLength:data.length textEncodingName:nil]);
+
+    if ([requestURL.host isEqualToString:@&quot;redirect&quot;]) {
+        NSURL *redirectURL = [NSURL URLWithString:[NSString stringWithFormat:@&quot;%@://%@&quot;, testScheme, requestURL.query]];
+        [self.client URLProtocol:self wasRedirectedToRequest:[NSURLRequest requestWithURL:redirectURL] redirectResponse:response.get()];
+        return;
+    }
+
+    [self.client URLProtocol:self didReceiveResponse:response.get() cacheStoragePolicy:NSURLCacheStorageNotAllowed];
+    [self.client URLProtocol:self didLoadData:data];
+    [self.client URLProtocolDidFinishLoading:self];
+}
+
+- (void)stopLoading
+{
+}
+
+@end
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPImacTestProtocolh"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/mac/TestProtocol.h (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/mac/TestProtocol.h        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Tools/TestWebKitAPI/mac/TestProtocol.h        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,34 +0,0 @@
</span><del>-/*
- * 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.
- */
-
-#ifndef TestProtocol_h
-#define TestProtocol_h
-
-@interface TestProtocol : NSURLProtocol {
-}
-+ (NSString *)scheme;
-@end
-
-#endif // TestProtocol_h
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPImacTestProtocolmm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/mac/TestProtocol.mm (188850 => 188851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/mac/TestProtocol.mm        2015-08-24 06:19:49 UTC (rev 188850)
+++ trunk/Tools/TestWebKitAPI/mac/TestProtocol.mm        2015-08-24 06:48:28 UTC (rev 188851)
</span><span class="lines">@@ -1,80 +0,0 @@
</span><del>-/*
- * 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 &quot;config.h&quot;
-#import &quot;TestProtocol.h&quot;
-
-#import &lt;wtf/RetainPtr.h&gt;
-
-// Even though NSURLProtocol is capable of generating redirect responses for any protocol, WebCore asserts if a redirect is not in the http family.
-// See http://webkit.org/b/147870 for details.
-static NSString *testScheme = @&quot;http&quot;;
-
-@implementation TestProtocol
-
-+ (BOOL)canInitWithRequest:(NSURLRequest *)request
-{
-    return [request.URL.scheme caseInsensitiveCompare:testScheme] == NSOrderedSame;
-}
-
-+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
-{
-    return request;
-}
-
-+ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b
-{
-    return NO;
-}
-
-+ (NSString *)scheme
-{
-    return testScheme;
-}
-
-- (void)startLoading
-{
-    NSURL *requestURL = self.request.URL;
-    EXPECT_TRUE([requestURL.scheme isEqualToString:testScheme]);
-
-    NSData *data = [@&quot;PASS&quot; dataUsingEncoding:NSASCIIStringEncoding];
-    RetainPtr&lt;NSURLResponse&gt; response = adoptNS([[NSURLResponse alloc] initWithURL:requestURL MIMEType:@&quot;text/html&quot; expectedContentLength:data.length textEncodingName:nil]);
-
-    if ([requestURL.host isEqualToString:@&quot;redirect&quot;]) {
-        NSURL *redirectURL = [NSURL URLWithString:[NSString stringWithFormat:@&quot;%@://%@&quot;, testScheme, requestURL.query]];
-        [self.client URLProtocol:self wasRedirectedToRequest:[NSURLRequest requestWithURL:redirectURL] redirectResponse:response.get()];
-        return;
-    }
-
-    [self.client URLProtocol:self didReceiveResponse:response.get() cacheStoragePolicy:NSURLCacheStorageNotAllowed];
-    [self.client URLProtocol:self didLoadData:data];
-    [self.client URLProtocolDidFinishLoading:self];
-}
-
-- (void)stopLoading
-{
-}
-
-@end
</del></span></pre>
</div>
</div>

</body>
</html>