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

Side by Side Diff: net/base/network_change_notifier_win_unittest.cc

Issue 1088903008: Update {virtual,override} to follow C++11 style in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an override. Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « net/base/elements_upload_data_stream_unittest.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "net/base/network_change_notifier.h" 6 #include "net/base/network_change_notifier.h"
7 #include "net/base/network_change_notifier_factory.h" 7 #include "net/base/network_change_notifier_factory.h"
8 #include "net/base/network_change_notifier_win.h" 8 #include "net/base/network_change_notifier_win.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using ::testing::AtLeast; 12 using ::testing::AtLeast;
13 using ::testing::Invoke; 13 using ::testing::Invoke;
14 using ::testing::Return; 14 using ::testing::Return;
15 using ::testing::StrictMock; 15 using ::testing::StrictMock;
16 16
17 namespace net { 17 namespace net {
18 18
19 namespace { 19 namespace {
20 20
21 // Subclass of NetworkChangeNotifierWin that overrides functions so that no 21 // Subclass of NetworkChangeNotifierWin that overrides functions so that no
22 // Windows API networking functions are ever called. 22 // Windows API networking functions are ever called.
23 class TestNetworkChangeNotifierWin : public NetworkChangeNotifierWin { 23 class TestNetworkChangeNotifierWin : public NetworkChangeNotifierWin {
24 public: 24 public:
25 TestNetworkChangeNotifierWin() {} 25 TestNetworkChangeNotifierWin() {}
26 26
27 virtual ~TestNetworkChangeNotifierWin() { 27 ~TestNetworkChangeNotifierWin() override {
28 // This is needed so we don't try to stop watching for IP address changes, 28 // This is needed so we don't try to stop watching for IP address changes,
29 // as we never actually started. 29 // as we never actually started.
30 set_is_watching(false); 30 set_is_watching(false);
31 } 31 }
32 32
33 // From NetworkChangeNotifierWin. 33 // From NetworkChangeNotifierWin.
34 virtual NetworkChangeNotifier::ConnectionType 34 NetworkChangeNotifier::ConnectionType RecomputeCurrentConnectionType()
35 RecomputeCurrentConnectionType() const override { 35 const override {
36 return NetworkChangeNotifier::CONNECTION_UNKNOWN; 36 return NetworkChangeNotifier::CONNECTION_UNKNOWN;
37 } 37 }
38 38
39 // From NetworkChangeNotifierWin. 39 // From NetworkChangeNotifierWin.
40 MOCK_METHOD0(WatchForAddressChangeInternal, bool()); 40 MOCK_METHOD0(WatchForAddressChangeInternal, bool());
41 41
42 private: 42 private:
43 DISALLOW_COPY_AND_ASSIGN(TestNetworkChangeNotifierWin); 43 DISALLOW_COPY_AND_ASSIGN(TestNetworkChangeNotifierWin);
44 }; 44 };
45 45
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 TEST_F(NetworkChangeNotifierWinTest, NetChangeWinFailSignalTwice) { 253 TEST_F(NetworkChangeNotifierWinTest, NetChangeWinFailSignalTwice) {
254 StartWatchingAndSucceed(); 254 StartWatchingAndSucceed();
255 SignalAndFail(); 255 SignalAndFail();
256 RetryAndFail(); 256 RetryAndFail();
257 RetryAndSucceed(); 257 RetryAndSucceed();
258 } 258 }
259 259
260 } // namespace net 260 } // namespace net
OLDNEW
« no previous file with comments | « net/base/elements_upload_data_stream_unittest.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698