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

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

Issue 1022363002: ServiceWorker: Run ServiceWorkerContextTest.DeleteAndStartOver on disk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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
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 "content/browser/service_worker/service_worker_request_handler.h" 5 #include "content/browser/service_worker/service_worker_request_handler.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/fileapi/mock_url_request_delegate.h" 8 #include "content/browser/fileapi/mock_url_request_delegate.h"
9 #include "content/browser/service_worker/embedded_worker_test_helper.h" 9 #include "content/browser/service_worker/embedded_worker_test_helper.h"
10 #include "content/browser/service_worker/service_worker_context_core.h" 10 #include "content/browser/service_worker/service_worker_context_core.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 } 33 }
34 34
35 class ServiceWorkerRequestHandlerTest : public testing::Test { 35 class ServiceWorkerRequestHandlerTest : public testing::Test {
36 public: 36 public:
37 ServiceWorkerRequestHandlerTest() 37 ServiceWorkerRequestHandlerTest()
38 : browser_thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) {} 38 : browser_thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) {}
39 39
40 void SetUp() override { 40 void SetUp() override {
41 helper_.reset(new EmbeddedWorkerTestHelper(kMockRenderProcessId)); 41 helper_.reset(
42 new EmbeddedWorkerTestHelper(base::FilePath(), kMockRenderProcessId));
42 43
43 // A new unstored registration/version. 44 // A new unstored registration/version.
44 registration_ = new ServiceWorkerRegistration( 45 registration_ = new ServiceWorkerRegistration(
45 GURL("http://host/scope/"), 1L, context()->AsWeakPtr()); 46 GURL("http://host/scope/"), 1L, context()->AsWeakPtr());
46 version_ = new ServiceWorkerVersion(registration_.get(), 47 version_ = new ServiceWorkerVersion(registration_.get(),
47 GURL("http://host/script.js"), 48 GURL("http://host/script.js"),
48 1L, 49 1L,
49 context()->AsWeakPtr()); 50 context()->AsWeakPtr());
50 51
51 // An empty host. 52 // An empty host.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 provider_host_->SetDocumentUrl(GURL("")); 156 provider_host_->SetDocumentUrl(GURL(""));
156 EXPECT_FALSE(InitializeHandlerCheck( 157 EXPECT_FALSE(InitializeHandlerCheck(
157 "http://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); 158 "http://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE));
158 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); 159 EXPECT_STREQ("", provider_host_->document_url().spec().c_str());
159 EXPECT_FALSE(InitializeHandlerCheck( 160 EXPECT_FALSE(InitializeHandlerCheck(
160 "https://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE)); 161 "https://host/scope/doc", "GET", true, RESOURCE_TYPE_IMAGE));
161 EXPECT_STREQ("", provider_host_->document_url().spec().c_str()); 162 EXPECT_STREQ("", provider_host_->document_url().spec().c_str());
162 } 163 }
163 164
164 } // namespace content 165 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698