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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp

Issue 2337253005: Worker: Canonicalize names of WorkerThread lifecycle events in WorkerReportingProxy (Closed)
Patch Set: fix comments Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/compositorworker/CompositorWorkerThread.h" 5 #include "modules/compositorworker/CompositorWorkerThread.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/SourceLocation.h" 8 #include "bindings/core/v8/SourceLocation.h"
9 #include "bindings/core/v8/V8GCController.h" 9 #include "bindings/core/v8/V8GCController.h"
10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
(...skipping 26 matching lines...) Expand all
37 static std::unique_ptr<TestCompositorWorkerObjectProxy> create(ExecutionCont ext* context) 37 static std::unique_ptr<TestCompositorWorkerObjectProxy> create(ExecutionCont ext* context)
38 { 38 {
39 return wrapUnique(new TestCompositorWorkerObjectProxy(context)); 39 return wrapUnique(new TestCompositorWorkerObjectProxy(context));
40 } 40 }
41 41
42 // (Empty) WorkerReportingProxy implementation: 42 // (Empty) WorkerReportingProxy implementation:
43 virtual void dispatchErrorEvent(const String& errorMessage, std::unique_ptr< SourceLocation>, int exceptionId) {} 43 virtual void dispatchErrorEvent(const String& errorMessage, std::unique_ptr< SourceLocation>, int exceptionId) {}
44 void reportConsoleMessage(MessageSource, MessageLevel, const String& message , SourceLocation*) override {} 44 void reportConsoleMessage(MessageSource, MessageLevel, const String& message , SourceLocation*) override {}
45 void postMessageToPageInspector(const String&) override {} 45 void postMessageToPageInspector(const String&) override {}
46 46
47 void didCreateWorkerGlobalScope(WorkerOrWorkletGlobalScope*) override {}
47 void didEvaluateWorkerScript(bool success) override {} 48 void didEvaluateWorkerScript(bool success) override {}
48 void workerGlobalScopeStarted(WorkerOrWorkletGlobalScope*) override {} 49 void didCloseWorkerGlobalScope() override {}
49 void workerGlobalScopeClosed() override {}
50 void workerThreadTerminated() override {}
51 void willDestroyWorkerGlobalScope() override {} 50 void willDestroyWorkerGlobalScope() override {}
51 void didTerminateWorkerThread() override {}
52 52
53 ExecutionContext* getExecutionContext() override { return m_executionContext .get(); } 53 ExecutionContext* getExecutionContext() override { return m_executionContext .get(); }
54 54
55 private: 55 private:
56 TestCompositorWorkerObjectProxy(ExecutionContext* context) 56 TestCompositorWorkerObjectProxy(ExecutionContext* context)
57 : InProcessWorkerObjectProxy(nullptr) 57 : InProcessWorkerObjectProxy(nullptr)
58 , m_executionContext(context) 58 , m_executionContext(context)
59 { 59 {
60 } 60 }
61 61
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 v8::Isolate* secondIsolate = secondWorker->isolate(); 238 v8::Isolate* secondIsolate = secondWorker->isolate();
239 ASSERT_TRUE(secondIsolate); 239 ASSERT_TRUE(secondIsolate);
240 EXPECT_EQ(firstIsolate, secondIsolate); 240 EXPECT_EQ(firstIsolate, secondIsolate);
241 241
242 // Verify that the isolate can run some scripts correctly in the second work er. 242 // Verify that the isolate can run some scripts correctly in the second work er.
243 checkWorkerCanExecuteScript(secondWorker.get()); 243 checkWorkerCanExecuteScript(secondWorker.get());
244 secondWorker->terminateAndWait(); 244 secondWorker->terminateAndWait();
245 } 245 }
246 246
247 } // namespace blink 247 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698