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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2087293003: [DevTools] Network.emulateNetworkConditions now affects NetworkStateNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 8e0197044b71033f39cfd08f0d42173a1a5e01a6..1bae332cfb79cae90fc1d397f29f0792d6ea1986 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -2377,12 +2377,7 @@ bool Internals::ignoreLayoutWithPendingStylesheets(Document* document)
return document->ignoreLayoutWithPendingStylesheets();
}
-void Internals::setNetworkStateNotifierTestOnly(bool testOnly)
-{
- networkStateNotifier().setTestUpdatesOnly(testOnly);
-}
-
-void Internals::setNetworkConnectionInfo(const String& type, double downlinkMaxMbps, ExceptionState& exceptionState)
+void Internals::setNetworkConnectionInfoOverride(bool onLine, const String& type, double downlinkMaxMbps, ExceptionState& exceptionState)
{
WebConnectionType webtype;
if (type == "cellular2g") {
@@ -2409,7 +2404,12 @@ void Internals::setNetworkConnectionInfo(const String& type, double downlinkMaxM
exceptionState.throwDOMException(NotFoundError, ExceptionMessages::failedToEnumerate("connection type", type));
return;
}
- networkStateNotifier().setWebConnectionForTest(webtype, downlinkMaxMbps);
+ networkStateNotifier().setOverride(onLine, webtype, downlinkMaxMbps);
+}
+
+void Internals::clearNetworkConnectionInfoOverride()
+{
+ networkStateNotifier().clearOverride();
}
unsigned Internals::countHitRegions(CanvasRenderingContext* context)

Powered by Google App Engine
This is Rietveld 408576698