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

Side by Side Diff: third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp

Issue 2649923007: Revert of Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: Created 3 years, 11 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 "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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 WTF::makeUnique<Vector<CSPHeaderAndType>>(); 117 WTF::makeUnique<Vector<CSPHeaderAndType>>();
118 CSPHeaderAndType headerAndType("contentSecurityPolicy", 118 CSPHeaderAndType headerAndType("contentSecurityPolicy",
119 ContentSecurityPolicyHeaderTypeReport); 119 ContentSecurityPolicyHeaderTypeReport);
120 headers->push_back(headerAndType); 120 headers->push_back(headerAndType);
121 workerThread()->start(WorkerThreadStartupData::create( 121 workerThread()->start(WorkerThreadStartupData::create(
122 scriptURL, "fake user agent", source, nullptr /* cachedMetaData */, 122 scriptURL, "fake user agent", source, nullptr /* cachedMetaData */,
123 DontPauseWorkerGlobalScopeOnStart, headers.get(), 123 DontPauseWorkerGlobalScopeOnStart, headers.get(),
124 "" /* referrerPolicy */, m_securityOrigin.get(), 124 "" /* referrerPolicy */, m_securityOrigin.get(),
125 nullptr /* workerClients */, WebAddressSpaceLocal, 125 nullptr /* workerClients */, WebAddressSpaceLocal,
126 nullptr /* originTrialTokens */, nullptr /* workerSettings */, 126 nullptr /* originTrialTokens */, nullptr /* workerSettings */,
127 WorkerV8Settings::Default(), false /* inspectorNetworkCapability */)); 127 WorkerV8Settings::Default()));
128 128
129 workerInspectorProxy()->workerThreadCreated( 129 workerInspectorProxy()->workerThreadCreated(
130 toDocument(getExecutionContext()), m_workerThread.get(), scriptURL); 130 toDocument(getExecutionContext()), m_workerThread.get(), scriptURL);
131 workerThreadCreated(); 131 workerThreadCreated();
132 } 132 }
133 133
134 enum class Notification { 134 enum class Notification {
135 MessageConfirmed, 135 MessageConfirmed,
136 PendingActivityReported, 136 PendingActivityReported,
137 ThreadTerminated, 137 ThreadTerminated,
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 EXPECT_FALSE(UseCounter::isCounted(document(), feature2)); 399 EXPECT_FALSE(UseCounter::isCounted(document(), feature2));
400 workerThread()->postTask( 400 workerThread()->postTask(
401 BLINK_FROM_HERE, 401 BLINK_FROM_HERE,
402 crossThreadBind(&DedicatedWorkerThreadForTest::countDeprecation, 402 crossThreadBind(&DedicatedWorkerThreadForTest::countDeprecation,
403 crossThreadUnretained(workerThread()), feature2)); 403 crossThreadUnretained(workerThread()), feature2));
404 testing::enterRunLoop(); 404 testing::enterRunLoop();
405 EXPECT_TRUE(UseCounter::isCounted(document(), feature2)); 405 EXPECT_TRUE(UseCounter::isCounted(document(), feature2));
406 } 406 }
407 407
408 } // namespace blink 408 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698