OLD | NEW |
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 "modules/webaudio/AudioWorkletThread.h" | 5 #include "modules/webaudio/AudioWorkletThread.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "bindings/core/v8/ScriptSourceCode.h" | 8 #include "bindings/core/v8/ScriptSourceCode.h" |
8 #include "bindings/core/v8/SourceLocation.h" | 9 #include "bindings/core/v8/SourceLocation.h" |
9 #include "bindings/core/v8/V8GCController.h" | 10 #include "bindings/core/v8/V8GCController.h" |
10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" | 11 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
11 #include "core/inspector/ConsoleMessage.h" | 12 #include "core/inspector/ConsoleMessage.h" |
12 #include "core/workers/WorkerBackingThread.h" | 13 #include "core/workers/WorkerBackingThread.h" |
13 #include "core/workers/WorkerLoaderProxy.h" | 14 #include "core/workers/WorkerLoaderProxy.h" |
14 #include "core/workers/WorkerOrWorkletGlobalScope.h" | 15 #include "core/workers/WorkerOrWorkletGlobalScope.h" |
15 #include "core/workers/WorkerReportingProxy.h" | 16 #include "core/workers/WorkerReportingProxy.h" |
16 #include "core/workers/WorkerThreadStartupData.h" | 17 #include "core/workers/WorkerThreadStartupData.h" |
17 #include "platform/CrossThreadFunctional.h" | 18 #include "platform/CrossThreadFunctional.h" |
18 #include "platform/WaitableEvent.h" | 19 #include "platform/WaitableEvent.h" |
19 #include "platform/WebThreadSupportingGC.h" | 20 #include "platform/WebThreadSupportingGC.h" |
20 #include "platform/heap/Handle.h" | 21 #include "platform/heap/Handle.h" |
21 #include "platform/testing/TestingPlatformSupport.h" | 22 #include "platform/testing/TestingPlatformSupport.h" |
22 #include "platform/testing/UnitTestHelpers.h" | 23 #include "platform/testing/UnitTestHelpers.h" |
23 #include "public/platform/Platform.h" | 24 #include "public/platform/Platform.h" |
24 #include "public/platform/WebAddressSpace.h" | 25 #include "public/platform/WebAddressSpace.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "wtf/PtrUtil.h" | 27 #include "wtf/PtrUtil.h" |
27 #include <memory> | |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // A null WorkerReportingProxy, supplied when creating AudioWorkletThreads. | 33 // A null WorkerReportingProxy, supplied when creating AudioWorkletThreads. |
34 class TestAudioWorkletReportingProxy : public WorkerReportingProxy { | 34 class TestAudioWorkletReportingProxy : public WorkerReportingProxy { |
35 public: | 35 public: |
36 static std::unique_ptr<TestAudioWorkletReportingProxy> create() { | 36 static std::unique_ptr<TestAudioWorkletReportingProxy> create() { |
37 return WTF::wrapUnique(new TestAudioWorkletReportingProxy()); | 37 return WTF::wrapUnique(new TestAudioWorkletReportingProxy()); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ASSERT_TRUE(secondIsolate); | 190 ASSERT_TRUE(secondIsolate); |
191 EXPECT_EQ(firstIsolate, secondIsolate); | 191 EXPECT_EQ(firstIsolate, secondIsolate); |
192 | 192 |
193 // Verify that the isolate can run some scripts correctly in the second | 193 // Verify that the isolate can run some scripts correctly in the second |
194 // worklet. | 194 // worklet. |
195 checkWorkletCanExecuteScript(secondWorklet.get()); | 195 checkWorkletCanExecuteScript(secondWorklet.get()); |
196 secondWorklet->terminateAndWait(); | 196 secondWorklet->terminateAndWait(); |
197 } | 197 } |
198 | 198 |
199 } // namespace blink | 199 } // namespace blink |
OLD | NEW |