| OLD | NEW |
| 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" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class TestCompositorProxyClient | 62 class TestCompositorProxyClient |
| 63 : public GarbageCollected<TestCompositorProxyClient> | 63 : public GarbageCollected<TestCompositorProxyClient> |
| 64 , public CompositorProxyClient { | 64 , public CompositorProxyClient { |
| 65 USING_GARBAGE_COLLECTED_MIXIN(TestCompositorProxyClient); | 65 USING_GARBAGE_COLLECTED_MIXIN(TestCompositorProxyClient); |
| 66 public: | 66 public: |
| 67 TestCompositorProxyClient() {} | 67 TestCompositorProxyClient() {} |
| 68 | 68 |
| 69 void setGlobalScope(WorkerGlobalScope*) override {} | 69 void setGlobalScope(WorkerGlobalScope*) override {} |
| 70 void runAnimationFrameCallbacks() override {} | 70 void requestAnimationFrame() override {} |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 class CompositorWorkerTestPlatform : public TestingPlatformSupport { | 73 class CompositorWorkerTestPlatform : public TestingPlatformSupport { |
| 74 public: | 74 public: |
| 75 CompositorWorkerTestPlatform() | 75 CompositorWorkerTestPlatform() |
| 76 : m_thread(adoptPtr(m_oldPlatform->createThread("Compositor"))) | 76 : m_thread(adoptPtr(m_oldPlatform->createThread("Compositor"))) |
| 77 { | 77 { |
| 78 } | 78 } |
| 79 | 79 |
| 80 WebThread* compositorThread() const override | 80 WebThread* compositorThread() const override |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 v8::Isolate* secondIsolate = secondWorker->isolate(); | 234 v8::Isolate* secondIsolate = secondWorker->isolate(); |
| 235 ASSERT_TRUE(secondIsolate); | 235 ASSERT_TRUE(secondIsolate); |
| 236 EXPECT_EQ(firstIsolate, secondIsolate); | 236 EXPECT_EQ(firstIsolate, secondIsolate); |
| 237 | 237 |
| 238 // Verify that the isolate can run some scripts correctly in the second work
er. | 238 // Verify that the isolate can run some scripts correctly in the second work
er. |
| 239 checkWorkerCanExecuteScript(secondWorker.get()); | 239 checkWorkerCanExecuteScript(secondWorker.get()); |
| 240 secondWorker->terminateAndWait(); | 240 secondWorker->terminateAndWait(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace blink | 243 } // namespace blink |
| OLD | NEW |