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

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

Issue 380093002: Update installed ServiceWorkers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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.h
diff --git a/content/browser/service_worker/embedded_worker_test_helper.h b/content/browser/service_worker/embedded_worker_test_helper.h
index 7cd817df6b9ee7d4eff3145904285b77eb675b5b..e9418b0b11051bc9f94e3c5fd4f87e6c1938ae8a 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.h
+++ b/content/browser/service_worker/embedded_worker_test_helper.h
@@ -67,6 +67,8 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
ServiceWorkerContextWrapper* context_wrapper() { return wrapper_.get(); }
void ShutdownContext();
+ int mock_render_process_id() const { return mock_render_process_id_ ;}
falken 2014/07/18 05:13:25 space before semicolon
+
protected:
// Called when StartWorker, StopWorker and SendMessageToWorker message
// is sent to the embedded worker. Override if necessary. By default
@@ -77,7 +79,9 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
virtual void OnStartWorker(int embedded_worker_id,
int64 service_worker_version_id,
const GURL& scope,
- const GURL& script_url);
+ const GURL& script_url,
+ bool pause_after_download);
+ virtual void OnResumeAfterDownload(int embedded_worker_id);
virtual void OnStopWorker(int embedded_worker_id);
virtual bool OnMessageToWorker(int thread_id,
int embedded_worker_id,
@@ -97,15 +101,17 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
// These functions simulate sending an EmbeddedHostMsg message to the
// browser.
+ void SimulatePausedAfterDownload(int embedded_worker_id);
+ void SimulateWorkerScriptLoaded(int embedded_worker_id);
void SimulateWorkerStarted(int thread_id, int embedded_worker_id);
void SimulateWorkerStopped(int embedded_worker_id);
void SimulateSend(IPC::Message* message);
- protected:
EmbeddedWorkerRegistry* registry();
private:
void OnStartWorkerStub(const EmbeddedWorkerMsg_StartWorker_Params& params);
+ void OnResumeAfterDownloadStub(int embedded_worker_id);
void OnStopWorkerStub(int embedded_worker_id);
void OnMessageToWorkerStub(int thread_id,
int embedded_worker_id,
@@ -121,6 +127,7 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
IPC::TestSink inner_sink_;
int next_thread_id_;
+ int mock_render_process_id_;
// Updated each time MessageToWorker message is received.
int current_embedded_worker_id_;

Powered by Google App Engine
This is Rietveld 408576698