| 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/events/MessageEvent.h" | 5 #include "core/events/MessageEvent.h" |
| 6 #include "core/inspector/ConsoleMessageStorage.h" | 6 #include "core/inspector/ConsoleMessageStorage.h" |
| 7 #include "core/testing/DummyPageHolder.h" | 7 #include "core/testing/DummyPageHolder.h" |
| 8 #include "core/workers/DedicatedWorkerGlobalScope.h" | 8 #include "core/workers/DedicatedWorkerGlobalScope.h" |
| 9 #include "core/workers/DedicatedWorkerThread.h" | 9 #include "core/workers/DedicatedWorkerThread.h" |
| 10 #include "core/workers/InProcessWorkerMessagingProxy.h" | 10 #include "core/workers/InProcessWorkerMessagingProxy.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 WTF::makeUnique<Vector<CSPHeaderAndType>>(); | 118 WTF::makeUnique<Vector<CSPHeaderAndType>>(); |
| 119 CSPHeaderAndType headerAndType("contentSecurityPolicy", | 119 CSPHeaderAndType headerAndType("contentSecurityPolicy", |
| 120 ContentSecurityPolicyHeaderTypeReport); | 120 ContentSecurityPolicyHeaderTypeReport); |
| 121 headers->push_back(headerAndType); | 121 headers->push_back(headerAndType); |
| 122 workerThread()->start(WorkerThreadStartupData::create( | 122 workerThread()->start(WorkerThreadStartupData::create( |
| 123 scriptURL, "fake user agent", source, nullptr /* cachedMetaData */, | 123 scriptURL, "fake user agent", source, nullptr /* cachedMetaData */, |
| 124 DontPauseWorkerGlobalScopeOnStart, headers.get(), | 124 DontPauseWorkerGlobalScopeOnStart, headers.get(), |
| 125 "" /* referrerPolicy */, m_securityOrigin.get(), | 125 "" /* referrerPolicy */, m_securityOrigin.get(), |
| 126 nullptr /* workerClients */, WebAddressSpaceLocal, | 126 nullptr /* workerClients */, WebAddressSpaceLocal, |
| 127 nullptr /* originTrialTokens */, nullptr /* workerSettings */, | 127 nullptr /* originTrialTokens */, nullptr /* workerSettings */, |
| 128 WorkerV8Settings::Default())); | 128 WorkerV8Settings::Default(), false /* inspectorNetworkCapability */)); |
| 129 | 129 |
| 130 workerInspectorProxy()->workerThreadCreated( | 130 workerInspectorProxy()->workerThreadCreated( |
| 131 toDocument(getExecutionContext()), m_workerThread.get(), scriptURL); | 131 toDocument(getExecutionContext()), m_workerThread.get(), scriptURL); |
| 132 workerThreadCreated(); | 132 workerThreadCreated(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 enum class Notification { | 135 enum class Notification { |
| 136 MessageConfirmed, | 136 MessageConfirmed, |
| 137 PendingActivityReported, | 137 PendingActivityReported, |
| 138 ThreadTerminated, | 138 ThreadTerminated, |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 EXPECT_FALSE(UseCounter::isCounted(document(), feature2)); | 400 EXPECT_FALSE(UseCounter::isCounted(document(), feature2)); |
| 401 workerThread()->postTask( | 401 workerThread()->postTask( |
| 402 BLINK_FROM_HERE, | 402 BLINK_FROM_HERE, |
| 403 crossThreadBind(&DedicatedWorkerThreadForTest::countDeprecation, | 403 crossThreadBind(&DedicatedWorkerThreadForTest::countDeprecation, |
| 404 crossThreadUnretained(workerThread()), feature2)); | 404 crossThreadUnretained(workerThread()), feature2)); |
| 405 testing::enterRunLoop(); | 405 testing::enterRunLoop(); |
| 406 EXPECT_TRUE(UseCounter::isCounted(document(), feature2)); | 406 EXPECT_TRUE(UseCounter::isCounted(document(), feature2)); |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace blink | 409 } // namespace blink |
| OLD | NEW |