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

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

Issue 489253002: Allow the browser to Send messages to an embedded worker once the script as been loaded without hav… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 7f174829f4d95a71bdbbd910e0c4d9537d5ae5fb..a5773814534415bac8244fd0480109a036311c6a 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -91,14 +91,14 @@ void EmbeddedWorkerTestHelper::OnStartWorker(
return;
}
SimulateWorkerReadyForInspection(embedded_worker_id);
- SimulateWorkerScriptLoaded(embedded_worker_id);
- SimulateWorkerStarted(next_thread_id_++, embedded_worker_id);
+ SimulateWorkerScriptLoaded(next_thread_id_++, embedded_worker_id);
+ SimulateWorkerStarted(embedded_worker_id);
}
void EmbeddedWorkerTestHelper::OnResumeAfterDownload(int embedded_worker_id) {
SimulateWorkerReadyForInspection(embedded_worker_id);
- SimulateWorkerScriptLoaded(embedded_worker_id);
- SimulateWorkerStarted(next_thread_id_++, embedded_worker_id);
+ SimulateWorkerScriptLoaded(next_thread_id_++, embedded_worker_id);
+ SimulateWorkerStarted(embedded_worker_id);
}
void EmbeddedWorkerTestHelper::OnStopWorker(int embedded_worker_id) {
@@ -172,19 +172,19 @@ void EmbeddedWorkerTestHelper::SimulateWorkerReadyForInspection(
}
void EmbeddedWorkerTestHelper::SimulateWorkerScriptLoaded(
- int embedded_worker_id) {
+ int thread_id, int embedded_worker_id) {
EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
ASSERT_TRUE(worker != NULL);
- registry()->OnWorkerScriptLoaded(worker->process_id(), embedded_worker_id);
+ registry()->OnWorkerScriptLoaded(
+ worker->process_id(), thread_id, embedded_worker_id);
}
void EmbeddedWorkerTestHelper::SimulateWorkerStarted(
- int thread_id, int embedded_worker_id) {
+ int embedded_worker_id) {
EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
ASSERT_TRUE(worker != NULL);
registry()->OnWorkerStarted(
worker->process_id(),
- thread_id,
embedded_worker_id);
}

Powered by Google App Engine
This is Rietveld 408576698