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

Side by Side Diff: chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h" 5 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/captive_portal/captive_portal_service.h" 9 #include "chrome/browser/captive_portal/captive_portal_service.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 private: 78 private:
79 // InterstitialPageDelegate implementation: 79 // InterstitialPageDelegate implementation:
80 std::string GetHTMLContents() override { return "HTML Contents"; } 80 std::string GetHTMLContents() override { return "HTML Contents"; }
81 81
82 DISALLOW_COPY_AND_ASSIGN(MockInterstitialPageDelegate); 82 DISALLOW_COPY_AND_ASSIGN(MockInterstitialPageDelegate);
83 }; 83 };
84 84
85 class CaptivePortalTabReloaderTest : public ChromeRenderViewHostTestHarness { 85 class CaptivePortalTabReloaderTest : public ChromeRenderViewHostTestHarness {
86 public: 86 public:
87 // testing::Test: 87 // testing::Test:
88 virtual void SetUp() override { 88 void SetUp() override {
89 ChromeRenderViewHostTestHarness::SetUp(); 89 ChromeRenderViewHostTestHarness::SetUp();
90 tab_reloader_.reset(new testing::StrictMock<TestCaptivePortalTabReloader>( 90 tab_reloader_.reset(new testing::StrictMock<TestCaptivePortalTabReloader>(
91 web_contents())); 91 web_contents()));
92 92
93 // Most tests don't run the message loop, so don't use a timer for them. 93 // Most tests don't run the message loop, so don't use a timer for them.
94 tab_reloader_->set_slow_ssl_load_time(base::TimeDelta()); 94 tab_reloader_->set_slow_ssl_load_time(base::TimeDelta());
95 } 95 }
96 96
97 virtual void TearDown() override { 97 void TearDown() override {
98 EXPECT_FALSE(tab_reloader().TimerRunning()); 98 EXPECT_FALSE(tab_reloader().TimerRunning());
99 tab_reloader_.reset(NULL); 99 tab_reloader_.reset(NULL);
100 ChromeRenderViewHostTestHarness::TearDown(); 100 ChromeRenderViewHostTestHarness::TearDown();
101 } 101 }
102 102
103 TestCaptivePortalTabReloader& tab_reloader() { return *tab_reloader_.get(); } 103 TestCaptivePortalTabReloader& tab_reloader() { return *tab_reloader_.get(); }
104 104
105 private: 105 private:
106 scoped_ptr<TestCaptivePortalTabReloader> tab_reloader_; 106 scoped_ptr<TestCaptivePortalTabReloader> tab_reloader_;
107 }; 107 };
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 696
697 // There should be no captive portal check pending after the redirect. 697 // There should be no captive portal check pending after the redirect.
698 base::MessageLoop::current()->RunUntilIdle(); 698 base::MessageLoop::current()->RunUntilIdle();
699 699
700 // Logging in shouldn't do anything. 700 // Logging in shouldn't do anything.
701 tab_reloader().OnCaptivePortalResults( 701 tab_reloader().OnCaptivePortalResults(
702 captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL, 702 captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL,
703 captive_portal::RESULT_INTERNET_CONNECTED); 703 captive_portal::RESULT_INTERNET_CONNECTED);
704 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state()); 704 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, tab_reloader().state());
705 } 705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698