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

Unified Diff: chrome/browser/chrome_service_worker_browsertest.cc

Issue 2158253002: Use WebContents::GetManifest in ServiceWorker FetchTest instead of RequestAppBannerFromDevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_service_worker_browsertest.cc
diff --git a/chrome/browser/chrome_service_worker_browsertest.cc b/chrome/browser/chrome_service_worker_browsertest.cc
index 8d054fc64659d88a29cd2d5840b2fade6b70de58..07fa1ad054cd3b382ef0cf0b1a48822adfde0bbd 100644
--- a/chrome/browser/chrome_service_worker_browsertest.cc
+++ b/chrome/browser/chrome_service_worker_browsertest.cc
@@ -241,11 +241,6 @@ class ChromeServiceWorkerManifestFetchTest
ChromeServiceWorkerManifestFetchTest() {}
~ChromeServiceWorkerManifestFetchTest() override {}
- void SetUpCommandLine(base::CommandLine* command_line) override {
- ChromeServiceWorkerFetchTest::SetUpCommandLine(command_line);
- command_line->AppendSwitch(switches::kEnableAddToShelf);
- }
-
std::string ExecuteManifestFetchTest(const std::string& url,
const std::string& cross_origin) {
std::string js(
@@ -273,12 +268,21 @@ class ChromeServiceWorkerManifestFetchTest
}
std::string RequestAppBannerAndGetIssuedRequests() {
dominickn 2016/07/19 03:06:27 Nit: rename this GetManifestAndIssuedRequests?
horo 2016/07/19 03:13:40 Done.
- browser()->RequestAppBannerFromDevTools(
- browser()->tab_strip_model()->GetActiveWebContents());
+ base::RunLoop run_loop;
+ browser()->tab_strip_model()->GetActiveWebContents()->GetManifest(
+ base::Bind(&ManifestCallbackAndRun, run_loop.QuitClosure()));
+ run_loop.Run();
return ExecuteScriptAndExtractString(
"if (issuedRequests.length != 0) reportRequests();"
"else reportOnFetch = true;");
}
+
+ static void ManifestCallbackAndRun(const base::Closure& continuation,
+ const GURL&,
+ const content::Manifest&) {
+ continuation.Run();
+ }
+
DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerManifestFetchTest);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698