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

Unified Diff: chrome/browser/search/search_unittest.cc

Issue 2898313003: Ensure the NTP ServiceWorker has the proper site URL (Closed)
Patch Set: Ensure the NTP ServiceWorker has the proper site URL Created 3 years, 7 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: chrome/browser/search/search_unittest.cc
diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc
index a99098d27fa91ca5953d95b91d1600c5baadcccc..0f3f5db4bdefd18d4f7c516964bcb0eb1aa7c4d4 100644
--- a/chrome/browser/search/search_unittest.cc
+++ b/chrome/browser/search/search_unittest.cc
@@ -532,18 +532,21 @@ TEST_F(SearchTest, IsNTPURL) {
// No margin.
profile()->GetPrefs()->SetBoolean(prefs::kSearchSuggestEnabled, true);
GURL remote_ntp_url(GetInstantURL(profile(), false));
+ GURL remote_ntp_service_worker_url("https://foo.com/newtab-serviceworker.js");
GURL search_url_with_search_terms("https://foo.com/url?strk&bar=abc");
GURL search_url_without_search_terms("https://foo.com/url?strk&bar");
EXPECT_FALSE(IsNTPURL(ntp_url, profile()));
EXPECT_TRUE(IsNTPURL(local_ntp_url, profile()));
EXPECT_TRUE(IsNTPURL(remote_ntp_url, profile()));
+ EXPECT_TRUE(IsNTPURL(remote_ntp_service_worker_url, profile()));
EXPECT_FALSE(IsNTPURL(search_url_with_search_terms, profile()));
EXPECT_FALSE(IsNTPURL(search_url_without_search_terms, profile()));
EXPECT_FALSE(IsNTPURL(ntp_url, NULL));
EXPECT_FALSE(IsNTPURL(local_ntp_url, NULL));
EXPECT_FALSE(IsNTPURL(remote_ntp_url, NULL));
+ EXPECT_FALSE(IsNTPURL(remote_ntp_service_worker_url, NULL));
EXPECT_FALSE(IsNTPURL(search_url_with_search_terms, NULL));
EXPECT_FALSE(IsNTPURL(search_url_without_search_terms, NULL));
}

Powered by Google App Engine
This is Rietveld 408576698