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

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: Update test expectations Created 5 years, 4 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: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 7904b658dee7d7d8b6835c345decef3672a5c03a..de8cd76e396424f4dc30197fe63753aec042f34c 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -2343,7 +2343,7 @@ void Internals::setNetworkStateNotifierTestOnly(bool testOnly)
networkStateNotifier().setTestUpdatesOnly(testOnly);
}
-void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exceptionState)
+void Internals::setNetworkConnectionInfo(const String& type, double downlinkMax, ExceptionState& exceptionState)
{
WebConnectionType webtype;
if (type == "cellular") {
@@ -2354,6 +2354,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") {
@@ -2364,7 +2366,7 @@ void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exc
exceptionState.throwDOMException(NotFoundError, ExceptionMessages::failedToEnumerate("connection type", type));
return;
}
- networkStateNotifier().setWebConnectionTypeForTest(webtype);
+ networkStateNotifier().setWebConnectionForTest(webtype, downlinkMax);
}
unsigned Internals::countHitRegions(CanvasRenderingContext* context)

Powered by Google App Engine
This is Rietveld 408576698