Chromium Code Reviews| Index: third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| diff --git a/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp b/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| index 74a6124771ef1daadb8a28fde97b00f77cebe9f6..69508f46f6e60641c8f828d7d872376003c573e3 100644 |
| --- a/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| +++ b/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| @@ -104,6 +104,14 @@ void NetworkStateNotifier::removeObserver(NetworkStateObserver* observer, Execut |
| void NetworkStateNotifier::setTestUpdatesOnly(bool updatesOnly) |
| { |
| ASSERT(isMainThread()); |
| + |
| + // Reset state to default when entering or leaving test mode. |
| + if (updatesOnly || m_testUpdatesOnly) { |
|
philipj_slow
2015/10/01 09:24:07
Should this say updatesOnly != m_testUpdatseOnly i
DaleCurtis
2015/10/01 19:25:54
w/o this if I disable the setWebConnectionFortest(
DaleCurtis
2015/10/20 21:56:51
Done.
|
| + m_isOnLine = true; |
| + m_type = WebConnectionTypeOther; |
| + m_maxBandwidthMbps = std::numeric_limits<double>::infinity(); |
| + } |
| + |
| m_testUpdatesOnly = updatesOnly; |
| } |