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