Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1809)

Unified Diff: content/browser/service_worker/service_worker_browsertest.cc

Issue 2478783002: Resolve FetchEvent.preloadResponse with undefined when Navigation Preload is disabled. (Closed)
Patch Set: ScriptPromiseProperty::resolveWithUndefined() Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_browsertest.cc
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
index b128e2ad765410e26e57557f3b8e99a918c1db05..3333a8a8dfb7534139342ca7972fadbc5acf9979 100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -1764,7 +1764,7 @@ IN_PROC_BROWSER_TEST_P(ServiceWorkerNavigationPreloadTest, SetHeaderValue) {
NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl1));
EXPECT_EQ(title1, title_watcher1.WaitAndGetTitle());
// When the navigation started, the navigation preload was not enabled yet.
- EXPECT_EQ("null", GetTextContent());
+ EXPECT_EQ("undefined", GetTextContent());
ASSERT_EQ(0, GetRequestCount(kPageUrl1));
const std::string kPageUrl2 = kPageUrl + "?change";
@@ -1799,7 +1799,7 @@ IN_PROC_BROWSER_TEST_P(ServiceWorkerNavigationPreloadTest, SetHeaderValue) {
NavigateToURL(shell(), embedded_test_server()->GetURL(kPageUrl4));
EXPECT_EQ(title4, title_watcher4.WaitAndGetTitle());
// When the navigation started, the navigation preload must be disabled.
- EXPECT_EQ("null", GetTextContent());
+ EXPECT_EQ("undefined", GetTextContent());
ASSERT_EQ(0, GetRequestCount(kPageUrl4));
}
@@ -2051,7 +2051,7 @@ IN_PROC_BROWSER_TEST_P(ServiceWorkerNavigationPreloadTest, NotEnabled) {
// The page request must not be sent, since the worker responded with a
// generated Response and the navigation preload isn't enabled.
EXPECT_EQ(0, GetRequestCount(kPageUrl));
- EXPECT_EQ("Resolved with null.", GetTextContent());
+ EXPECT_EQ("Resolved with undefined.", GetTextContent());
}
IN_PROC_BROWSER_TEST_P(ServiceWorkerNavigationPreloadTest,

Powered by Google App Engine
This is Rietveld 408576698