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

Unified Diff: content/browser/service_worker/embedded_worker_instance_unittest.cc

Issue 697593002: ServiceWorker: Registering a malformed script should fail [2/3] (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 6 years, 1 month 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
Index: content/browser/service_worker/embedded_worker_instance_unittest.cc
diff --git a/content/browser/service_worker/embedded_worker_instance_unittest.cc b/content/browser/service_worker/embedded_worker_instance_unittest.cc
index 5c1b853d56b806988f41646ea158ab16fbb0dc5e..c5f190eef42375c75139d573dcdd2827548c25b0 100644
--- a/content/browser/service_worker/embedded_worker_instance_unittest.cc
+++ b/content/browser/service_worker/embedded_worker_instance_unittest.cc
@@ -74,12 +74,12 @@ TEST_F(EmbeddedWorkerInstanceTest, StartAndStop) {
url,
false,
base::Bind(&SaveStatusAndCall, &status, run_loop.QuitClosure()));
+ EXPECT_EQ(EmbeddedWorkerInstance::STARTING, worker->status());
run_loop.Run();
EXPECT_EQ(SERVICE_WORKER_OK, status);
- EXPECT_EQ(EmbeddedWorkerInstance::STARTING, worker->status());
- base::RunLoop().RunUntilIdle();
- // Worker started message should be notified (by EmbeddedWorkerTestHelper).
+ // The 'WorkerStarted' message should have been sent by
+ // EmbeddedWorkerTestHelper.
EXPECT_EQ(EmbeddedWorkerInstance::RUNNING, worker->status());
EXPECT_EQ(kRenderProcessId, worker->process_id());
@@ -88,7 +88,8 @@ TEST_F(EmbeddedWorkerInstanceTest, StartAndStop) {
EXPECT_EQ(EmbeddedWorkerInstance::STOPPING, worker->status());
base::RunLoop().RunUntilIdle();
- // Worker stopped message should be notified (by EmbeddedWorkerTestHelper).
+ // The 'WorkerStopped' message should have been sent by
+ // EmbeddedWorkerTestHelper.
EXPECT_EQ(EmbeddedWorkerInstance::STOPPED, worker->status());
// Verify that we've sent two messages to start and terminate the worker.
« no previous file with comments | « content/browser/service_worker/embedded_worker_instance.cc ('k') | content/browser/service_worker/embedded_worker_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698