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

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

Issue 1381153004: Service Worker: Change the criteria for bumping the last update check time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the condition to check if SWRegistration is stored Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/embedded_worker_test_helper.cc
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc
index e8cbe2df76b7c6e1dc0c545501092361eb8c516c..7336ea9dd0a39e311b20ad4455b8fb850b7a5935 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -120,8 +120,8 @@ void EmbeddedWorkerTestHelper::OnStartWorker(int embedded_worker_id,
SimulateWorkerReadyForInspection(embedded_worker_id);
SimulateWorkerScriptCached(embedded_worker_id);
SimulateWorkerScriptLoaded(embedded_worker_id);
- SimulateWorkerThreadStarted(next_thread_id_++, embedded_worker_id);
- SimulateWorkerScriptEvaluated(embedded_worker_id);
+ SimulateWorkerThreadStarted(GetNextThreadId(), embedded_worker_id);
+ SimulateWorkerScriptEvaluated(embedded_worker_id, true /* success */);
SimulateWorkerStarted(embedded_worker_id);
}
@@ -229,11 +229,12 @@ void EmbeddedWorkerTestHelper::SimulateWorkerThreadStarted(
}
void EmbeddedWorkerTestHelper::SimulateWorkerScriptEvaluated(
- int embedded_worker_id) {
+ int embedded_worker_id,
+ bool success) {
EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
ASSERT_TRUE(worker != NULL);
- registry()->OnWorkerScriptEvaluated(
- worker->process_id(), embedded_worker_id, true /* success */);
+ registry()->OnWorkerScriptEvaluated(worker->process_id(), embedded_worker_id,
+ success);
}
void EmbeddedWorkerTestHelper::SimulateWorkerStarted(

Powered by Google App Engine
This is Rietveld 408576698