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

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

Issue 2123183002: Move crossThreadBind() from platform/ to wtf/ Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_WTFCrossThreadCopier
Patch Set: Rebase 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 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 "core/dom/CompositorProxyClient.h" 10 #include "core/dom/CompositorProxyClient.h"
11 #include "core/inspector/ConsoleMessage.h" 11 #include "core/inspector/ConsoleMessage.h"
12 #include "core/testing/DummyPageHolder.h" 12 #include "core/testing/DummyPageHolder.h"
13 #include "core/workers/InProcessWorkerObjectProxy.h" 13 #include "core/workers/InProcessWorkerObjectProxy.h"
14 #include "core/workers/WorkerBackingThread.h" 14 #include "core/workers/WorkerBackingThread.h"
15 #include "core/workers/WorkerLoaderProxy.h" 15 #include "core/workers/WorkerLoaderProxy.h"
16 #include "core/workers/WorkerThreadStartupData.h" 16 #include "core/workers/WorkerThreadStartupData.h"
17 #include "platform/CrossThreadFunctional.h"
18 #include "platform/WaitableEvent.h" 17 #include "platform/WaitableEvent.h"
19 #include "platform/WebThreadSupportingGC.h" 18 #include "platform/WebThreadSupportingGC.h"
20 #include "platform/heap/Handle.h" 19 #include "platform/heap/Handle.h"
21 #include "platform/testing/TestingPlatformSupport.h" 20 #include "platform/testing/TestingPlatformSupport.h"
22 #include "platform/testing/UnitTestHelpers.h" 21 #include "platform/testing/UnitTestHelpers.h"
23 #include "public/platform/Platform.h" 22 #include "public/platform/Platform.h"
24 #include "public/platform/WebAddressSpace.h" 23 #include "public/platform/WebAddressSpace.h"
25 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
25 #include "wtf/Functional.h"
26 #include "wtf/PtrUtil.h" 26 #include "wtf/PtrUtil.h"
27 #include <memory> 27 #include <memory>
28 28
29 namespace blink { 29 namespace blink {
30 namespace { 30 namespace {
31 31
32 // A null InProcessWorkerObjectProxy, supplied when creating CompositorWorkerThr eads. 32 // A null InProcessWorkerObjectProxy, supplied when creating CompositorWorkerThr eads.
33 class TestCompositorWorkerObjectProxy : public InProcessWorkerObjectProxy { 33 class TestCompositorWorkerObjectProxy : public InProcessWorkerObjectProxy {
34 public: 34 public:
35 static std::unique_ptr<TestCompositorWorkerObjectProxy> create(ExecutionCont ext* context) 35 static std::unique_ptr<TestCompositorWorkerObjectProxy> create(ExecutionCont ext* context)
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 v8::Isolate* secondIsolate = secondWorker->isolate(); 235 v8::Isolate* secondIsolate = secondWorker->isolate();
236 ASSERT_TRUE(secondIsolate); 236 ASSERT_TRUE(secondIsolate);
237 EXPECT_EQ(firstIsolate, secondIsolate); 237 EXPECT_EQ(firstIsolate, secondIsolate);
238 238
239 // Verify that the isolate can run some scripts correctly in the second work er. 239 // Verify that the isolate can run some scripts correctly in the second work er.
240 checkWorkerCanExecuteScript(secondWorker.get()); 240 checkWorkerCanExecuteScript(secondWorker.get());
241 secondWorker->terminateAndWait(); 241 secondWorker->terminateAndWait();
242 } 242 }
243 243
244 } // namespace blink 244 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698