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

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

Issue 2649923007: Revert of Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: Created 3 years, 10 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 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 void TearDown() override { AudioWorkletThread::clearSharedBackingThread(); } 79 void TearDown() override { AudioWorkletThread::clearSharedBackingThread(); }
80 80
81 std::unique_ptr<AudioWorkletThread> createAudioWorkletThread() { 81 std::unique_ptr<AudioWorkletThread> createAudioWorkletThread() {
82 std::unique_ptr<AudioWorkletThread> thread = 82 std::unique_ptr<AudioWorkletThread> thread =
83 AudioWorkletThread::create(nullptr, *m_reportingProxy); 83 AudioWorkletThread::create(nullptr, *m_reportingProxy);
84 thread->start(WorkerThreadStartupData::create( 84 thread->start(WorkerThreadStartupData::create(
85 KURL(ParsedURLString, "http://fake.url/"), "fake user agent", "", 85 KURL(ParsedURLString, "http://fake.url/"), "fake user agent", "",
86 nullptr, DontPauseWorkerGlobalScopeOnStart, nullptr, "", 86 nullptr, DontPauseWorkerGlobalScopeOnStart, nullptr, "",
87 m_securityOrigin.get(), nullptr, WebAddressSpaceLocal, nullptr, nullptr, 87 m_securityOrigin.get(), nullptr, WebAddressSpaceLocal, nullptr, nullptr,
88 WorkerV8Settings::Default(), false /* inspectorNetworkCapability */)); 88 WorkerV8Settings::Default()));
89 return thread; 89 return thread;
90 } 90 }
91 91
92 // Attempts to run some simple script for |thread|. 92 // Attempts to run some simple script for |thread|.
93 void checkWorkletCanExecuteScript(WorkerThread* thread) { 93 void checkWorkletCanExecuteScript(WorkerThread* thread) {
94 WaitableEvent waitEvent; 94 WaitableEvent waitEvent;
95 thread->workerBackingThread().backingThread().postTask( 95 thread->workerBackingThread().backingThread().postTask(
96 BLINK_FROM_HERE, 96 BLINK_FROM_HERE,
97 crossThreadBind(&AudioWorkletThreadTest::executeScriptInWorklet, 97 crossThreadBind(&AudioWorkletThreadTest::executeScriptInWorklet,
98 crossThreadUnretained(this), 98 crossThreadUnretained(this),
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ASSERT_TRUE(secondIsolate); 196 ASSERT_TRUE(secondIsolate);
197 EXPECT_EQ(firstIsolate, secondIsolate); 197 EXPECT_EQ(firstIsolate, secondIsolate);
198 198
199 // 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
200 // worklet. 200 // worklet.
201 checkWorkletCanExecuteScript(secondWorklet.get()); 201 checkWorkletCanExecuteScript(secondWorklet.get());
202 secondWorklet->terminateAndWait(); 202 secondWorklet->terminateAndWait();
203 } 203 }
204 204
205 } // namespace blink 205 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698