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

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

Issue 3023039: Disable EULA/update/register screens for non-official builds. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: test change Created 10 years, 4 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 | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/chromeos/login/account_screen.h" 7 #include "chrome/browser/chromeos/login/account_screen.h"
8 #include "chrome/browser/chromeos/login/eula_view.h" 8 #include "chrome/browser/chromeos/login/eula_view.h"
9 #include "chrome/browser/chromeos/login/language_switch_menu.h" 9 #include "chrome/browser/chromeos/login/language_switch_menu.h"
10 #include "chrome/browser/chromeos/login/login_screen.h" 10 #include "chrome/browser/chromeos/login/login_screen.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 EXPECT_NE(fr_str, ar_str); 98 EXPECT_NE(fr_str, ar_str);
99 } 99 }
100 100
101 class WizardControllerFlowTest : public WizardControllerTest { 101 class WizardControllerFlowTest : public WizardControllerTest {
102 protected: 102 protected:
103 WizardControllerFlowTest() {} 103 WizardControllerFlowTest() {}
104 // Overriden from InProcessBrowserTest: 104 // Overriden from InProcessBrowserTest:
105 virtual Browser* CreateBrowser(Profile* profile) { 105 virtual Browser* CreateBrowser(Profile* profile) {
106 Browser* ret = WizardControllerTest::CreateBrowser(profile); 106 Browser* ret = WizardControllerTest::CreateBrowser(profile);
107 107
108 // Make sure that OOBE is run as an "official" build.
109 WizardController::default_controller()->is_official_build_ = true;
110
108 // Set up the mocks for all screens. 111 // Set up the mocks for all screens.
109 MOCK(mock_account_screen_, account_screen_, chromeos::AccountScreen); 112 MOCK(mock_account_screen_, account_screen_, chromeos::AccountScreen);
110 MOCK(mock_login_screen_, login_screen_, chromeos::LoginScreen); 113 MOCK(mock_login_screen_, login_screen_, chromeos::LoginScreen);
111 MOCK(mock_network_screen_, network_screen_, chromeos::NetworkScreen); 114 MOCK(mock_network_screen_, network_screen_, chromeos::NetworkScreen);
112 MOCK(mock_update_screen_, update_screen_, MockUpdateScreen); 115 MOCK(mock_update_screen_, update_screen_, MockUpdateScreen);
113 MOCK(mock_eula_screen_, eula_screen_, chromeos::EulaScreen); 116 MOCK(mock_eula_screen_, eula_screen_, chromeos::EulaScreen);
114 117
115 // Switch to the initial screen. 118 // Switch to the initial screen.
116 EXPECT_EQ(NULL, controller()->current_screen()); 119 EXPECT_EQ(NULL, controller()->current_screen());
117 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); 120 EXPECT_CALL(*mock_network_screen_, Show()).Times(1);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_image_screen)); 225 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_image_screen));
223 EXPECT_EQ(controller()->GetUserImageScreen(), controller()->current_screen()); 226 EXPECT_EQ(controller()->GetUserImageScreen(), controller()->current_screen());
224 227
225 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); 228 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1);
226 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_eula_screen)); 229 EXPECT_TRUE(focus_manager->ProcessAccelerator(accel_eula_screen));
227 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen()); 230 EXPECT_EQ(controller()->GetEulaScreen(), controller()->current_screen());
228 } 231 }
229 232
230 COMPILE_ASSERT(chromeos::ScreenObserver::EXIT_CODES_COUNT == 17, 233 COMPILE_ASSERT(chromeos::ScreenObserver::EXIT_CODES_COUNT == 17,
231 add_tests_for_new_control_flow_you_just_introduced); 234 add_tests_for_new_control_flow_you_just_introduced);
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698