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

Side by Side Diff: content/browser/service_worker/service_worker_browsertest.cc

Issue 373713003: [ServiceWorker] Fills the referrer of WebServiceWorkerRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_fetch_dispatcher.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/fileapi/chrome_blob_storage_context.h" 10 #include "content/browser/fileapi/chrome_blob_storage_context.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 version_->DispatchActivateEvent( 449 version_->DispatchActivateEvent(
450 CreateReceiver(BrowserThread::UI, done, result)); 450 CreateReceiver(BrowserThread::UI, done, result));
451 } 451 }
452 452
453 void FetchOnIOThread(const base::Closure& done, FetchResult* result) { 453 void FetchOnIOThread(const base::Closure& done, FetchResult* result) {
454 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); 454 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
455 ServiceWorkerFetchRequest request( 455 ServiceWorkerFetchRequest request(
456 embedded_test_server()->GetURL("/service_worker/empty.html"), 456 embedded_test_server()->GetURL("/service_worker/empty.html"),
457 "GET", 457 "GET",
458 std::map<std::string, std::string>(), 458 std::map<std::string, std::string>(),
459 GURL(""),
459 false); 460 false);
460 version_->SetStatus(ServiceWorkerVersion::ACTIVATED); 461 version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
461 version_->DispatchFetchEvent( 462 version_->DispatchFetchEvent(
462 request, CreateResponseReceiver(BrowserThread::UI, done, 463 request, CreateResponseReceiver(BrowserThread::UI, done,
463 blob_context_, result)); 464 blob_context_, result));
464 } 465 }
465 466
466 void StopOnIOThread(const base::Closure& done, 467 void StopOnIOThread(const base::Closure& done,
467 ServiceWorkerStatusCode* result) { 468 ServiceWorkerStatusCode* result) {
468 ASSERT_TRUE(version_); 469 ASSERT_TRUE(version_);
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, 821 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO,
821 this, 822 this,
822 embedded_test_server()->GetURL("/service_worker/empty.html"), 823 embedded_test_server()->GetURL("/service_worker/empty.html"),
823 &status, 824 &status,
824 &script_url)); 825 &script_url));
825 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); 826 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status);
826 } 827 }
827 } 828 }
828 829
829 } // namespace content 830 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_fetch_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698