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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h

Issue 2141673002: [DevTools] Always send a copy of worker message through the page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "bindings/core/v8/SourceLocation.h" 5 #include "bindings/core/v8/SourceLocation.h"
6 #include "bindings/core/v8/V8CacheOptions.h" 6 #include "bindings/core/v8/V8CacheOptions.h"
7 #include "bindings/core/v8/V8GCController.h" 7 #include "bindings/core/v8/V8GCController.h"
8 #include "core/frame/csp/ContentSecurityPolicy.h" 8 #include "core/frame/csp/ContentSecurityPolicy.h"
9 #include "core/inspector/ConsoleMessage.h" 9 #include "core/inspector/ConsoleMessage.h"
10 #include "core/workers/WorkerBackingThread.h" 10 #include "core/workers/WorkerBackingThread.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 MockWorkerReportingProxy() { } 54 MockWorkerReportingProxy() { }
55 ~MockWorkerReportingProxy() override { } 55 ~MockWorkerReportingProxy() override { }
56 56
57 MOCK_METHOD2(reportExceptionMock, void(const String& errorMessage, SourceLoc ation*)); 57 MOCK_METHOD2(reportExceptionMock, void(const String& errorMessage, SourceLoc ation*));
58 void reportException(const String& errorMessage, std::unique_ptr<SourceLocat ion> location) 58 void reportException(const String& errorMessage, std::unique_ptr<SourceLocat ion> location)
59 { 59 {
60 reportExceptionMock(errorMessage, location.get()); 60 reportExceptionMock(errorMessage, location.get());
61 } 61 }
62 MOCK_METHOD1(reportConsoleMessage, void(ConsoleMessage*)); 62 MOCK_METHOD1(reportConsoleMessage, void(ConsoleMessage*));
63 MOCK_METHOD1(postMessageToPageInspector, void(const String&)); 63 MOCK_METHOD1(postMessageToPageInspector, void(const String&));
64 MOCK_METHOD0(postWorkerConsoleAgentEnabled, void());
65 MOCK_METHOD1(didEvaluateWorkerScript, void(bool success)); 64 MOCK_METHOD1(didEvaluateWorkerScript, void(bool success));
66 MOCK_METHOD1(workerGlobalScopeStarted, void(WorkerGlobalScope*)); 65 MOCK_METHOD1(workerGlobalScopeStarted, void(WorkerGlobalScope*));
67 MOCK_METHOD0(workerGlobalScopeClosed, void()); 66 MOCK_METHOD0(workerGlobalScopeClosed, void());
68 MOCK_METHOD0(workerThreadTerminated, void()); 67 MOCK_METHOD0(workerThreadTerminated, void());
69 MOCK_METHOD0(willDestroyWorkerGlobalScope, void()); 68 MOCK_METHOD0(willDestroyWorkerGlobalScope, void());
70 }; 69 };
71 70
72 class MockWorkerThreadLifecycleObserver final : public GarbageCollectedFinalized <MockWorkerThreadLifecycleObserver>, public WorkerThreadLifecycleObserver { 71 class MockWorkerThreadLifecycleObserver final : public GarbageCollectedFinalized <MockWorkerThreadLifecycleObserver>, public WorkerThreadLifecycleObserver {
73 USING_GARBAGE_COLLECTED_MIXIN(MockWorkerThreadLifecycleObserver); 72 USING_GARBAGE_COLLECTED_MIXIN(MockWorkerThreadLifecycleObserver);
74 WTF_MAKE_NONCOPYABLE(MockWorkerThreadLifecycleObserver); 73 WTF_MAKE_NONCOPYABLE(MockWorkerThreadLifecycleObserver);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 private: 170 private:
172 WorkerThreadForTest* m_thread; 171 WorkerThreadForTest* m_thread;
173 }; 172 };
174 173
175 inline WorkerGlobalScope* WorkerThreadForTest::createWorkerGlobalScope(std::uniq ue_ptr<WorkerThreadStartupData> startupData) 174 inline WorkerGlobalScope* WorkerThreadForTest::createWorkerGlobalScope(std::uniq ue_ptr<WorkerThreadStartupData> startupData)
176 { 175 {
177 return new FakeWorkerGlobalScope(startupData->m_scriptURL, startupData->m_us erAgent, this, std::move(startupData->m_starterOriginPrivilegeData), std::move(s tartupData->m_workerClients)); 176 return new FakeWorkerGlobalScope(startupData->m_scriptURL, startupData->m_us erAgent, this, std::move(startupData->m_starterOriginPrivilegeData), std::move(s tartupData->m_workerClients));
178 } 177 }
179 178
180 } // namespace blink 179 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698