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 "core/inspector/ConsoleMessageStorage.h" | 5 #include "core/inspector/ConsoleMessageStorage.h" |
6 #include "core/testing/DummyPageHolder.h" | 6 #include "core/testing/DummyPageHolder.h" |
7 #include "core/workers/ThreadedWorkletGlobalScope.h" | 7 #include "core/workers/ThreadedWorkletGlobalScope.h" |
8 #include "core/workers/ThreadedWorkletMessagingProxy.h" | 8 #include "core/workers/ThreadedWorkletMessagingProxy.h" |
9 #include "core/workers/ThreadedWorkletObjectProxy.h" | 9 #include "core/workers/ThreadedWorkletObjectProxy.h" |
10 #include "core/workers/WorkerInspectorProxy.h" | 10 #include "core/workers/WorkerInspectorProxy.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 String referrerPolicy = ""; | 114 String referrerPolicy = ""; |
115 m_securityOrigin = SecurityOrigin::create(scriptURL); | 115 m_securityOrigin = SecurityOrigin::create(scriptURL); |
116 WorkerClients* workerClients = nullptr; | 116 WorkerClients* workerClients = nullptr; |
117 Vector<String> originTrialTokens; | 117 Vector<String> originTrialTokens; |
118 std::unique_ptr<WorkerSettings> workerSettings = nullptr; | 118 std::unique_ptr<WorkerSettings> workerSettings = nullptr; |
119 m_workerThread->start(WorkerThreadStartupData::create( | 119 m_workerThread->start(WorkerThreadStartupData::create( |
120 scriptURL, "fake user agent", "// fake source code", | 120 scriptURL, "fake user agent", "// fake source code", |
121 std::move(cachedMetaData), DontPauseWorkerGlobalScopeOnStart, | 121 std::move(cachedMetaData), DontPauseWorkerGlobalScopeOnStart, |
122 &contentSecurityPolicyHeaders, referrerPolicy, m_securityOrigin.get(), | 122 &contentSecurityPolicyHeaders, referrerPolicy, m_securityOrigin.get(), |
123 workerClients, WebAddressSpaceLocal, &originTrialTokens, | 123 workerClients, WebAddressSpaceLocal, &originTrialTokens, |
124 std::move(workerSettings), WorkerV8Settings::Default())); | 124 std::move(workerSettings), WorkerV8Settings::Default(), |
| 125 false /* inspectorNetworkCapability */)); |
125 workerInspectorProxy()->workerThreadCreated( | 126 workerInspectorProxy()->workerThreadCreated( |
126 toDocument(getExecutionContext()), m_workerThread.get(), scriptURL); | 127 toDocument(getExecutionContext()), m_workerThread.get(), scriptURL); |
127 } | 128 } |
128 | 129 |
129 protected: | 130 protected: |
130 std::unique_ptr<WorkerThread> createWorkerThread(double originTime) final { | 131 std::unique_ptr<WorkerThread> createWorkerThread(double originTime) final { |
131 NOTREACHED(); | 132 NOTREACHED(); |
132 return nullptr; | 133 return nullptr; |
133 } | 134 } |
134 | 135 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 EXPECT_FALSE(UseCounter::isCounted(document(), feature2)); | 189 EXPECT_FALSE(UseCounter::isCounted(document(), feature2)); |
189 workerThread()->postTask( | 190 workerThread()->postTask( |
190 BLINK_FROM_HERE, | 191 BLINK_FROM_HERE, |
191 crossThreadBind(&ThreadedWorkletThreadForTest::countDeprecation, | 192 crossThreadBind(&ThreadedWorkletThreadForTest::countDeprecation, |
192 crossThreadUnretained(workerThread()), feature2)); | 193 crossThreadUnretained(workerThread()), feature2)); |
193 testing::enterRunLoop(); | 194 testing::enterRunLoop(); |
194 EXPECT_TRUE(UseCounter::isCounted(document(), feature2)); | 195 EXPECT_TRUE(UseCounter::isCounted(document(), feature2)); |
195 } | 196 } |
196 | 197 |
197 } // namespace blink | 198 } // namespace blink |
OLD | NEW |