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

Side by Side Diff: content/browser/browsing_data/clear_site_data_throttle_browsertest.cc

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix IPC Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/service_worker/link_header_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browsing_data/clear_site_data_throttle.h" 5 #include "content/browser/browsing_data/clear_site_data_throttle.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 GURL scope_url = https_server()->GetURL(origin, "/"); 249 GURL scope_url = https_server()->GetURL(origin, "/");
250 GURL js_url = https_server()->GetURL(origin, "/?file=worker.js"); 250 GURL js_url = https_server()->GetURL(origin, "/?file=worker.js");
251 251
252 // Register the worker. 252 // Register the worker.
253 BrowserThread::PostTask( 253 BrowserThread::PostTask(
254 BrowserThread::IO, FROM_HERE, 254 BrowserThread::IO, FROM_HERE,
255 base::BindOnce( 255 base::BindOnce(
256 &ServiceWorkerContextWrapper::RegisterServiceWorker, 256 &ServiceWorkerContextWrapper::RegisterServiceWorker,
257 base::Unretained(service_worker_context), scope_url, js_url, 257 base::Unretained(service_worker_context), scope_url, js_url,
258 blink::WebServiceWorkerUpdateViaCache::kImports,
258 base::Bind( 259 base::Bind(
259 &ClearSiteDataThrottleBrowserTest::AddServiceWorkerCallback, 260 &ClearSiteDataThrottleBrowserTest::AddServiceWorkerCallback,
260 base::Unretained(this)))); 261 base::Unretained(this))));
261 262
262 // Wait for its activation. 263 // Wait for its activation.
263 base::RunLoop run_loop; 264 base::RunLoop run_loop;
264 BrowserThread::PostTask( 265 BrowserThread::PostTask(
265 BrowserThread::IO, FROM_HERE, 266 BrowserThread::IO, FROM_HERE,
266 base::Bind(&ServiceWorkerActivationObserver::SignalActivation, 267 base::Bind(&ServiceWorkerActivationObserver::SignalActivation,
267 base::Unretained(service_worker_context), 268 base::Unretained(service_worker_context),
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 // Tests that closing the tab right after executing Clear-Site-Data does 882 // Tests that closing the tab right after executing Clear-Site-Data does
882 // not crash. 883 // not crash.
883 IN_PROC_BROWSER_TEST_F(ClearSiteDataThrottleBrowserTest, ClosedTab) { 884 IN_PROC_BROWSER_TEST_F(ClearSiteDataThrottleBrowserTest, ClosedTab) {
884 GURL url = https_server()->GetURL("example.com", "/"); 885 GURL url = https_server()->GetURL("example.com", "/");
885 AddQuery(&url, "header", kClearCookiesHeader); 886 AddQuery(&url, "header", kClearCookiesHeader);
886 shell()->LoadURL(url); 887 shell()->LoadURL(url);
887 shell()->Close(); 888 shell()->Close();
888 } 889 }
889 890
890 } // namespace content 891 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/service_worker/link_header_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698