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

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

Issue 140743012: Start EmbeddedWorker during registration - take 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update to ToT Created 6 years, 10 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 20b663ac95655eabd04f8ff24102e3e6764f9f7d..7af9f2ded9301b8b39ede6a81019006b04539858 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -23,6 +23,14 @@ EmbeddedWorkerTestHelper::EmbeddedWorkerTestHelper(
EmbeddedWorkerTestHelper::~EmbeddedWorkerTestHelper() {
}
+int EmbeddedWorkerTestHelper::SimulateCreateWorker(int process_id) {
+ scoped_ptr<EmbeddedWorkerInstance> worker = registry()->CreateWorker();
+
+ int embedded_worker_id = worker->embedded_worker_id();
+ SimulateAddProcess(embedded_worker_id, process_id);
+ return embedded_worker_id;
+}
+
void EmbeddedWorkerTestHelper::SimulateAddProcess(
int embedded_worker_id,
int process_id) {

Powered by Google App Engine
This is Rietveld 408576698