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

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

Issue 1308943005: [NetInfo] Add Blink support for connection.change, connection.downlinkMax, and wimax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 9f74a9d4ce3e9adf073b25b34bc011b508aabe5d..da6fa74aa4d6974a84b1350c52127dbb0493c862 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -2388,7 +2388,7 @@ void Internals::setNetworkStateNotifierTestOnly(bool testOnly)
networkStateNotifier().setTestUpdatesOnly(testOnly);
}
-void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exceptionState)
+void Internals::setNetworkConnectionInfo(const String& type, double downlinkMaxMbps, ExceptionState& exceptionState)
{
WebConnectionType webtype;
if (type == "cellular") {
@@ -2399,6 +2399,8 @@ void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exc
webtype = ConnectionTypeEthernet;
} else if (type == "wifi") {
webtype = ConnectionTypeWifi;
+ } else if (type == "wimax") {
+ webtype = ConnectionTypeWimax;
} else if (type == "other") {
webtype = ConnectionTypeOther;
} else if (type == "none") {
@@ -2409,7 +2411,7 @@ void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exc
exceptionState.throwDOMException(NotFoundError, ExceptionMessages::failedToEnumerate("connection type", type));
return;
}
- networkStateNotifier().setWebConnectionTypeForTest(webtype);
+ networkStateNotifier().setWebConnectionForTest(webtype, downlinkMaxMbps);
}
unsigned Internals::countHitRegions(CanvasRenderingContext* context)
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698