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

Side by Side Diff: content/browser/service_worker/embedded_worker_instance_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/browser/service_worker/embedded_worker_instance.h" 8 #include "content/browser/service_worker/embedded_worker_instance.h"
9 #include "content/browser/service_worker/embedded_worker_registry.h" 9 #include "content/browser/service_worker/embedded_worker_registry.h"
10 #include "content/browser/service_worker/embedded_worker_test_helper.h" 10 #include "content/browser/service_worker/embedded_worker_test_helper.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 32
33 class EmbeddedWorkerInstanceTest : public testing::Test { 33 class EmbeddedWorkerInstanceTest : public testing::Test {
34 protected: 34 protected:
35 EmbeddedWorkerInstanceTest() 35 EmbeddedWorkerInstanceTest()
36 : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) {} 36 : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) {}
37 37
38 void SetUp() override { 38 void SetUp() override {
39 helper_.reset(new EmbeddedWorkerTestHelper(kRenderProcessId)); 39 helper_.reset(
40 new EmbeddedWorkerTestHelper(base::FilePath(), kRenderProcessId));
40 } 41 }
41 42
42 void TearDown() override { helper_.reset(); } 43 void TearDown() override { helper_.reset(); }
43 44
44 ServiceWorkerStatusCode StartWorker(EmbeddedWorkerInstance* worker, 45 ServiceWorkerStatusCode StartWorker(EmbeddedWorkerInstance* worker,
45 int id, const GURL& pattern, 46 int id, const GURL& pattern,
46 const GURL& url) { 47 const GURL& url) {
47 ServiceWorkerStatusCode status; 48 ServiceWorkerStatusCode status;
48 base::RunLoop run_loop; 49 base::RunLoop run_loop;
49 worker->Start(id, pattern, url, false, 50 worker->Start(id, pattern, url, false,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 worker.reset(); 184 worker.reset();
184 run_loop.Run(); 185 run_loop.Run();
185 EXPECT_EQ(SERVICE_WORKER_ERROR_ABORT, status); 186 EXPECT_EQ(SERVICE_WORKER_ERROR_ABORT, status);
186 187
187 // Verify that we didn't send the message to start the worker. 188 // Verify that we didn't send the message to start the worker.
188 ASSERT_FALSE( 189 ASSERT_FALSE(
189 ipc_sink()->GetUniqueMessageMatching(EmbeddedWorkerMsg_StartWorker::ID)); 190 ipc_sink()->GetUniqueMessageMatching(EmbeddedWorkerMsg_StartWorker::ID));
190 } 191 }
191 192
192 } // namespace content 193 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698