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

Unified Diff: chrome/browser/chromeos/network_state_notifier_browsertest.cc

Issue 2931005: Show offline interstitial page when offline and reload when reconnected to network. (Closed)
Patch Set: " Created 10 years, 5 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: chrome/browser/chromeos/network_state_notifier_browsertest.cc
diff --git a/chrome/browser/chromeos/network_state_notifier_browsertest.cc b/chrome/browser/chromeos/network_state_notifier_browsertest.cc
index bf2019c0df5cc2b891e85e517d602809a25d7dff..b9174137cca81163b05692440cb5d5840fa58dfe 100644
--- a/chrome/browser/chromeos/network_state_notifier_browsertest.cc
+++ b/chrome/browser/chromeos/network_state_notifier_browsertest.cc
@@ -30,6 +30,8 @@ class NetworkStateNotifierTest : public CrosInProcessBrowserTest,
InitStatusAreaMocks();
SetStatusAreaMocksExpectations();
// Initialize network state notifier.
+ ASSERT_TRUE(CrosLibrary::Get()->EnsureLoaded());
+ ASSERT_TRUE(mock_network_library_);
EXPECT_CALL(*mock_network_library_, Connected())
.Times(1)
.WillRepeatedly((Return(true)))
@@ -71,7 +73,6 @@ IN_PROC_BROWSER_TEST_F(NetworkStateNotifierTest, TestConnected) {
.WillRepeatedly((Return(true)))
.RetiresOnSaturation();
NetworkStateNotifier* notifier = NetworkStateNotifier::Get();
- DCHECK(CrosLibrary::Get()->EnsureLoaded());
notifier->NetworkChanged(mock_network_library_);
WaitForNotification();
EXPECT_EQ(chromeos::NetworkStateDetails::CONNECTED, state_);
@@ -90,7 +91,6 @@ IN_PROC_BROWSER_TEST_F(NetworkStateNotifierTest, TestConnecting) {
.WillOnce((Return(true)))
.RetiresOnSaturation();
NetworkStateNotifier* notifier = NetworkStateNotifier::Get();
- DCHECK(CrosLibrary::Get()->EnsureLoaded());
notifier->NetworkChanged(mock_network_library_);
WaitForNotification();
EXPECT_EQ(chromeos::NetworkStateDetails::CONNECTING, state_);
@@ -109,7 +109,6 @@ IN_PROC_BROWSER_TEST_F(NetworkStateNotifierTest, TestDisconnected) {
.WillOnce((Return(false)))
.RetiresOnSaturation();
NetworkStateNotifier* notifier = NetworkStateNotifier::Get();
- DCHECK(CrosLibrary::Get()->EnsureLoaded());
notifier->NetworkChanged(mock_network_library_);
WaitForNotification();
EXPECT_EQ(chromeos::NetworkStateDetails::DISCONNECTED, state_);
« no previous file with comments | « chrome/browser/chromeos/network_state_notifier.cc ('k') | chrome/browser/chromeos/offline/offline_load_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698