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/AnimationWorkletThread.h" | 5 #include "modules/compositorworker/AnimationWorkletThread.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "bindings/core/v8/ScriptSourceCode.h" | 8 #include "bindings/core/v8/ScriptSourceCode.h" |
9 #include "bindings/core/v8/SourceLocation.h" | 9 #include "bindings/core/v8/SourceLocation.h" |
10 #include "bindings/core/v8/V8GCController.h" | 10 #include "bindings/core/v8/V8GCController.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "public/platform/Platform.h" | 27 #include "public/platform/Platform.h" |
28 #include "public/platform/WebAddressSpace.h" | 28 #include "public/platform/WebAddressSpace.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 namespace { | 32 namespace { |
33 | 33 |
34 class AnimationWorkletTestPlatform : public TestingPlatformSupport { | 34 class AnimationWorkletTestPlatform : public TestingPlatformSupport { |
35 public: | 35 public: |
36 AnimationWorkletTestPlatform() | 36 AnimationWorkletTestPlatform() |
37 : thread_(WTF::WrapUnique(old_platform_->CreateThread("Compositor"))) {} | 37 : thread_(old_platform_->CreateThread("Compositor")) {} |
38 | 38 |
39 WebThread* CompositorThread() const override { return thread_.get(); } | 39 WebThread* CompositorThread() const override { return thread_.get(); } |
40 | 40 |
41 WebCompositorSupport* CompositorSupport() override { | 41 WebCompositorSupport* CompositorSupport() override { |
42 return &compositor_support_; | 42 return &compositor_support_; |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 std::unique_ptr<WebThread> thread_; | 46 std::unique_ptr<WebThread> thread_; |
47 TestingCompositorSupport compositor_support_; | 47 TestingCompositorSupport compositor_support_; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 ASSERT_TRUE(second_isolate); | 193 ASSERT_TRUE(second_isolate); |
194 EXPECT_EQ(first_isolate, second_isolate); | 194 EXPECT_EQ(first_isolate, second_isolate); |
195 | 195 |
196 // Verify that the isolate can run some scripts correctly in the second | 196 // Verify that the isolate can run some scripts correctly in the second |
197 // worklet. | 197 // worklet. |
198 CheckWorkletCanExecuteScript(second_worklet.get()); | 198 CheckWorkletCanExecuteScript(second_worklet.get()); |
199 second_worklet->TerminateAndWait(); | 199 second_worklet->TerminateAndWait(); |
200 } | 200 } |
201 | 201 |
202 } // namespace blink | 202 } // namespace blink |
OLD | NEW |