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

Side by Side Diff: content/browser/service_worker/embedded_worker_test_helper.h

Issue 1342733002: ServiceWorker: log when the script's loaded separately from thread start (chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 int request_id, 100 int request_id,
101 const ServiceWorkerFetchRequest& request); 101 const ServiceWorkerFetchRequest& request);
102 virtual void OnPushEvent(int embedded_worker_id, 102 virtual void OnPushEvent(int embedded_worker_id,
103 int request_id, 103 int request_id,
104 const std::string& data); 104 const std::string& data);
105 105
106 // These functions simulate sending an EmbeddedHostMsg message to the 106 // These functions simulate sending an EmbeddedHostMsg message to the
107 // browser. 107 // browser.
108 void SimulateWorkerReadyForInspection(int embedded_worker_id); 108 void SimulateWorkerReadyForInspection(int embedded_worker_id);
109 void SimulateWorkerScriptCached(int embedded_worker_id); 109 void SimulateWorkerScriptCached(int embedded_worker_id);
110 void SimulateWorkerScriptLoaded(int thread_id, int embedded_worker_id); 110 void SimulateWorkerScriptLoaded(int embedded_worker_id);
111 void SimulateWorkerThreadStarted(int thread_id, int embedded_worker_id);
111 void SimulateWorkerScriptEvaluated(int embedded_worker_id); 112 void SimulateWorkerScriptEvaluated(int embedded_worker_id);
112 void SimulateWorkerStarted(int embedded_worker_id); 113 void SimulateWorkerStarted(int embedded_worker_id);
113 void SimulateWorkerStopped(int embedded_worker_id); 114 void SimulateWorkerStopped(int embedded_worker_id);
114 void SimulateSend(IPC::Message* message); 115 void SimulateSend(IPC::Message* message);
115 116
116 EmbeddedWorkerRegistry* registry(); 117 EmbeddedWorkerRegistry* registry();
117 118
118 private: 119 private:
119 void OnStartWorkerStub(const EmbeddedWorkerMsg_StartWorker_Params& params); 120 void OnStartWorkerStub(const EmbeddedWorkerMsg_StartWorker_Params& params);
120 void OnStopWorkerStub(int embedded_worker_id); 121 void OnStopWorkerStub(int embedded_worker_id);
(...skipping 25 matching lines...) Expand all
146 message_port_message_filters_; 147 message_port_message_filters_;
147 148
148 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_; 149 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_;
149 150
150 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper); 151 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper);
151 }; 152 };
152 153
153 } // namespace content 154 } // namespace content
154 155
155 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 156 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698