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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp

Issue 2535093003: Worker: Connect UseCounter to workers and worklets (Closed)
Patch Set: Created 4 years 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 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 "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 21 matching lines...) Expand all
32 namespace { 32 namespace {
33 33
34 // A null WorkerReportingProxy, supplied when creating AudioWorkletThreads. 34 // A null WorkerReportingProxy, supplied when creating AudioWorkletThreads.
35 class TestAudioWorkletReportingProxy : public WorkerReportingProxy { 35 class TestAudioWorkletReportingProxy : public WorkerReportingProxy {
36 public: 36 public:
37 static std::unique_ptr<TestAudioWorkletReportingProxy> create() { 37 static std::unique_ptr<TestAudioWorkletReportingProxy> create() {
38 return wrapUnique(new TestAudioWorkletReportingProxy()); 38 return wrapUnique(new TestAudioWorkletReportingProxy());
39 } 39 }
40 40
41 // (Empty) WorkerReportingProxy implementation: 41 // (Empty) WorkerReportingProxy implementation:
42 void countFeature(UseCounter::Feature) override {}
43 void countDeprecation(UseCounter::Feature) override {}
42 void reportException(const String& errorMessage, 44 void reportException(const String& errorMessage,
43 std::unique_ptr<SourceLocation>, 45 std::unique_ptr<SourceLocation>,
44 int exceptionId) override {} 46 int exceptionId) override {}
45 void reportConsoleMessage(MessageSource, 47 void reportConsoleMessage(MessageSource,
46 MessageLevel, 48 MessageLevel,
47 const String& message, 49 const String& message,
48 SourceLocation*) override {} 50 SourceLocation*) override {}
49 void postMessageToPageInspector(const String&) override {} 51 void postMessageToPageInspector(const String&) override {}
50 ParentFrameTaskRunners* getParentFrameTaskRunners() override { 52 ParentFrameTaskRunners* getParentFrameTaskRunners() override {
51 return m_parentFrameTaskRunners.get(); 53 return m_parentFrameTaskRunners.get();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ASSERT_TRUE(secondIsolate); 196 ASSERT_TRUE(secondIsolate);
195 EXPECT_EQ(firstIsolate, secondIsolate); 197 EXPECT_EQ(firstIsolate, secondIsolate);
196 198
197 // Verify that the isolate can run some scripts correctly in the second 199 // Verify that the isolate can run some scripts correctly in the second
198 // worklet. 200 // worklet.
199 checkWorkletCanExecuteScript(secondWorklet.get()); 201 checkWorkletCanExecuteScript(secondWorklet.get());
200 secondWorklet->terminateAndWait(); 202 secondWorklet->terminateAndWait();
201 } 203 }
202 204
203 } // namespace blink 205 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698