Title: [248953] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (248952 => 248953)


--- trunk/LayoutTests/ChangeLog	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/ChangeLog	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,3 +1,15 @@
+2019-08-21  Russell Epstein  <repst...@apple.com>
+
+        Unreviewed, rolling out r248942.
+
+        Causes multiple layout test crashes on MacOS Bots
+
+        Reverted changeset:
+
+        "Verify Prefetch and credential behavior"
+        https://bugs.webkit.org/show_bug.cgi?id=200000
+        https://trac.webkit.org/changeset/248942
+
 2019-08-21  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Page: re-add enable/disable after r248454

Deleted: trunk/LayoutTests/http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie-expected.txt (248952 => 248953)


--- trunk/LayoutTests/http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie-expected.txt	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie-expected.txt	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,3 +0,0 @@
-
-PASS Verify that navigating to a prefetched main resource that sets Vary: Cookie does send cookies. 
-

Deleted: trunk/LayoutTests/http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html (248952 => 248953)


--- trunk/LayoutTests/http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/http/wpt/prefetch/link-prefetch-cross-origin-vary-cookie.html	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<script src=""
-<script src=""
-<script>
-
-const wait_for_message = () => {
-  return new Promise((resolve, reject) => {
-    window.addEventListener('message', e => {
-      resolve(e);
-    }, { once: true });
-  });
-};
-
-promise_test(async function(t) {
-  let url_from = "resources/navigate-cross-origin-vary-cookie.html";
-  var w = window.open(url_from);
-  let message = await wait_for_message();
-  assert_equals(message.data, 'foo=bar');
-  w.close();
-}, 'Verify that navigating to a prefetched main resource that sets Vary: Cookie does send cookies.');
-</script>

Deleted: trunk/LayoutTests/http/wpt/prefetch/resources/main-resource-cross-origin-set-cookie.py (248952 => 248953)


--- trunk/LayoutTests/http/wpt/prefetch/resources/main-resource-cross-origin-set-cookie.py	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/http/wpt/prefetch/resources/main-resource-cross-origin-set-cookie.py	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,7 +0,0 @@
-def main(request, response):
-    headers = [("Content-Type", "text/html"), ("Set-Cookie", "foo=bar")]
-
-    response.headers.set("Access-Control-Allow-Origin", "http://localhost:8800")
-    response.headers.set("Access-Control-Allow-Credentials", "true")
-
-    return headers, ""

Deleted: trunk/LayoutTests/http/wpt/prefetch/resources/main-resource-cross-origin-vary-cookie.py (248952 => 248953)


--- trunk/LayoutTests/http/wpt/prefetch/resources/main-resource-cross-origin-vary-cookie.py	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/http/wpt/prefetch/resources/main-resource-cross-origin-vary-cookie.py	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,15 +0,0 @@
-def main(request, response):
-    headers = [("Content-Type", "text/html"), ("Vary", "Cookie")]
-
-    document = """
-<!DOCTYPE html>
-<script>
-  function test() {
-    var result = '%(cookie)s';
-    window.opener.postMessage(result, '*');
-  }
-</script>
-<body _onload_="test()">
-"""
-
-    return headers, document % {'cookie': request.headers.get("Cookie", "") }

Deleted: trunk/LayoutTests/http/wpt/prefetch/resources/navigate-cross-origin-vary-cookie.html (248952 => 248953)


--- trunk/LayoutTests/http/wpt/prefetch/resources/navigate-cross-origin-vary-cookie.html	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/http/wpt/prefetch/resources/navigate-cross-origin-vary-cookie.html	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<script src=""
-<body _onload_="test()">
-<script>
-  if (window.testRunner)
-    testRunner.setAlwaysAcceptCookies(true);
-
-  async function test() {
-    var link = document.createElement("link");
-    link.rel = "prefetch";
-    link.href = "" + "/WebKit/prefetch/resources/main-resource-cross-origin-vary-cookie.py";
-    document.body.appendChild(link);
-
-    await fetch(get_host_info().HTTP_REMOTE_ORIGIN + "/WebKit/prefetch/resources/main-resource-cross-origin-set-cookie.py", { "credentials": "include" });
-
-    window.location = get_host_info().HTTP_REMOTE_ORIGIN + "/WebKit/prefetch/resources/main-resource-cross-origin-vary-cookie.py";
-  }
-</script>
-</body>

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (248952 => 248953)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2019-08-21 18:47:59 UTC (rev 248953)
@@ -736,9 +736,12 @@
 webkit.org/b/195623 http/tests/cache/link-prefetch-main-resource.html [ Skip ]
 webkit.org/b/195623 http/tests/cache/link-prefetch-main-resource-iframe.html [ Skip ]
 
-# prefetch not supported in WK1
-http/wpt/prefetch [ Skip ]
+webkit.org/b/197371 http/wpt/prefetch/link-prefetch-main-resource-redirect.html [ Skip ]
+webkit.org/b/199499 http/wpt/prefetch/link-prefetch-skip-disk-cache.html [ Skip ]
 
+webkit.org/b/199632 http/wpt/prefetch/beforeload.html [ Skip ]
+webkit.org/b/199632 http/wpt/prefetch/beforeload-dynamic.html [ Skip ]
+
 webkit.org/b/198177 pointerevents/mouse/compatibility-mouse-events-prevention-mouse-pressed.html [ Skip ]
 
 webkit.org/b/198459 [ HighSierra Debug ] inspector/canvas/recording-2d-full.html [ Slow ]

Modified: trunk/LayoutTests/platform/win/TestExpectations (248952 => 248953)


--- trunk/LayoutTests/platform/win/TestExpectations	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/LayoutTests/platform/win/TestExpectations	2019-08-21 18:47:59 UTC (rev 248953)
@@ -4422,9 +4422,12 @@
 webkit.org/b/195623 http/tests/cache/link-prefetch-main-resource.html [ Skip ]
 webkit.org/b/195623 http/tests/cache/link-prefetch-main-resource-iframe.html [ Skip ]
 
-# prefetch not supported in WK1
-http/wpt/prefetch [ Skip ]
+webkit.org/b/197371 http/wpt/prefetch/link-prefetch-main-resource-redirect.html [ Skip ]
+webkit.org/b/199499 http/wpt/prefetch/link-prefetch-skip-disk-cache.html [ Skip ]
 
+webkit.org/b/199632 http/wpt/prefetch/beforeload.html [ Skip ]
+webkit.org/b/199632 http/wpt/prefetch/beforeload-dynamic.html [ Skip ]
+
 webkit.org/b/198112 http/tests/security/showModalDialog-sync-cross-origin-page-load2.html [ Skip ]
 
 webkit.org/b/198679 fast/events/fire-mousedown-while-pressing-mouse-button.html [ Failure ]

Modified: trunk/Source/WebKit/ChangeLog (248952 => 248953)


--- trunk/Source/WebKit/ChangeLog	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/Source/WebKit/ChangeLog	2019-08-21 18:47:59 UTC (rev 248953)
@@ -1,3 +1,15 @@
+2019-08-21  Russell Epstein  <repst...@apple.com>
+
+        Unreviewed, rolling out r248942.
+
+        Causes multiple layout test crashes on MacOS Bots
+
+        Reverted changeset:
+
+        "Verify Prefetch and credential behavior"
+        https://bugs.webkit.org/show_bug.cgi?id=200000
+        https://trac.webkit.org/changeset/248942
+
 2019-08-21  Keith Rollin  <krol...@apple.com>
 
         Remove support for watchOS < 6.0

Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (248952 => 248953)


--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2019-08-21 18:47:59 UTC (rev 248953)
@@ -221,6 +221,7 @@
         ASSERT(m_parameters.options.mode == FetchOptions::Mode::Navigate);
         if (auto* session = m_connection->networkProcess().networkSession(sessionID())) {
             if (auto entry = session->prefetchCache().take(request.url())) {
+                // FIXME: Deal with credentials (https://bugs.webkit.org/show_bug.cgi?id=200000)
                 if (!entry->redirectRequest.isNull()) {
                     auto cacheEntry = m_cache->makeRedirectEntry(request, entry->response, entry->redirectRequest);
                     retrieveCacheEntryInternal(WTFMove(cacheEntry), ResourceRequest { request });
@@ -499,13 +500,8 @@
         return completionHandler(PolicyAction::Use);
     }
 
-    if (isCrossOriginPrefetch()) {
-        if (response.httpHeaderField(HTTPHeaderName::Vary).contains("Cookie")) {
-            abort();
-            return completionHandler(PolicyAction::Ignore);
-        }
+    if (isCrossOriginPrefetch())
         return completionHandler(PolicyAction::Use);
-    }
 
     // We wait to receive message NetworkResourceLoader::ContinueDidReceiveResponse before continuing a load for
     // a main resource because the embedding client must decide whether to allow the load.

Modified: trunk/Source/WebKit/NetworkProcess/cache/PrefetchCache.cpp (248952 => 248953)


--- trunk/Source/WebKit/NetworkProcess/cache/PrefetchCache.cpp	2019-08-21 18:19:23 UTC (rev 248952)
+++ trunk/Source/WebKit/NetworkProcess/cache/PrefetchCache.cpp	2019-08-21 18:47:59 UTC (rev 248953)
@@ -65,9 +65,7 @@
     m_sessionExpirationList.removeAllMatching([&url] (const auto& tuple) {
         return std::get<0>(tuple) == url;
     });
-    auto entry = resources->take(url);
-    ASSERT(!entry->response.httpHeaderField(WebCore::HTTPHeaderName::Vary).contains("Cookie"));
-    return entry;
+    return resources->take(url);
 }
 
 static const Seconds expirationTimeout { 5_s };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to