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

Side by Side Diff: chrome/browser/chromeos/login/update_screen_browsertest.cc

Issue 6899025: Show hardware addresses for wifi and ethernet networks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: z Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/cros/mock_login_library.h" 5 #include "chrome/browser/chromeos/cros/mock_login_library.h"
6 #include "chrome/browser/chromeos/cros/mock_network_library.h" 6 #include "chrome/browser/chromeos/cros/mock_network_library.h"
7 #include "chrome/browser/chromeos/cros/mock_update_library.h" 7 #include "chrome/browser/chromeos/cros/mock_update_library.h"
8 #include "chrome/browser/chromeos/login/mock_screen_observer.h" 8 #include "chrome/browser/chromeos/login/mock_screen_observer.h"
9 #include "chrome/browser/chromeos/login/update_screen.h" 9 #include "chrome/browser/chromeos/login/update_screen.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h" 10 #include "chrome/browser/chromeos/login/wizard_controller.h"
11 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" 11 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 using ::testing::_; 15 using ::testing::_;
16 using ::testing::AnyNumber;
16 using ::testing::AtLeast; 17 using ::testing::AtLeast;
17 using ::testing::Return; 18 using ::testing::Return;
18 using ::testing::ReturnRef; 19 using ::testing::ReturnRef;
19 using ::testing::Invoke; 20 using ::testing::Invoke;
20 21
21 static void RequestUpdateCheckSuccess(UpdateCallback callback, void* userdata) { 22 static void RequestUpdateCheckSuccess(UpdateCallback callback, void* userdata) {
22 callback(userdata, chromeos::UPDATE_RESULT_SUCCESS, NULL); 23 callback(userdata, chromeos::UPDATE_RESULT_SUCCESS, NULL);
23 } 24 }
24 25
25 class UpdateScreenTest : public WizardInProcessBrowserTest { 26 class UpdateScreenTest : public WizardInProcessBrowserTest {
(...skipping 30 matching lines...) Expand all
56 .WillOnce(Invoke(RequestUpdateCheckSuccess)); 57 .WillOnce(Invoke(RequestUpdateCheckSuccess));
57 58
58 mock_network_library_ = cros_mock_->mock_network_library(); 59 mock_network_library_ = cros_mock_->mock_network_library();
59 EXPECT_CALL(*mock_network_library_, Connected()) 60 EXPECT_CALL(*mock_network_library_, Connected())
60 .Times(1) // also called by NetworkMenu::InitMenuItems() 61 .Times(1) // also called by NetworkMenu::InitMenuItems()
61 .WillRepeatedly((Return(false))) 62 .WillRepeatedly((Return(false)))
62 .RetiresOnSaturation(); 63 .RetiresOnSaturation();
63 EXPECT_CALL(*mock_network_library_, AddNetworkManagerObserver(_)) 64 EXPECT_CALL(*mock_network_library_, AddNetworkManagerObserver(_))
64 .Times(1) 65 .Times(1)
65 .RetiresOnSaturation(); 66 .RetiresOnSaturation();
67 EXPECT_CALL(*mock_network_library_, FindWifiDevice())
68 .Times(AnyNumber());
69 EXPECT_CALL(*mock_network_library_, FindEthernetDevice())
70 .Times(AnyNumber());
66 } 71 }
67 72
68 virtual void TearDownInProcessBrowserTestFixture() { 73 virtual void TearDownInProcessBrowserTestFixture() {
69 cros_mock_->test_api()->SetUpdateLibrary(NULL, true); 74 cros_mock_->test_api()->SetUpdateLibrary(NULL, true);
70 WizardInProcessBrowserTest::TearDownInProcessBrowserTestFixture(); 75 WizardInProcessBrowserTest::TearDownInProcessBrowserTestFixture();
71 } 76 }
72 77
73 MockLoginLibrary* mock_login_library_; 78 MockLoginLibrary* mock_login_library_;
74 MockUpdateLibrary* mock_update_library_; 79 MockUpdateLibrary* mock_update_library_;
75 MockNetworkLibrary* mock_network_library_; 80 MockNetworkLibrary* mock_network_library_;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 .WillRepeatedly(ReturnRef(status)); 254 .WillRepeatedly(ReturnRef(status));
250 EXPECT_CALL(*mock_screen_observer, 255 EXPECT_CALL(*mock_screen_observer,
251 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) 256 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING))
252 .Times(1); 257 .Times(1);
253 update_screen->UpdateStatusChanged(mock_update_library_); 258 update_screen->UpdateStatusChanged(mock_update_library_);
254 259
255 controller()->set_observer(NULL); 260 controller()->set_observer(NULL);
256 } 261 }
257 262
258 } // namespace chromeos 263 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698