OLD | NEW |
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/chromeos/login/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 user_data_dir.Append(chrome::kLocalStateFilename); | 1005 user_data_dir.Append(chrome::kLocalStateFilename); |
1006 | 1006 |
1007 // Set webview disabled flag only when local state file does not exist. | 1007 // Set webview disabled flag only when local state file does not exist. |
1008 // Otherwise, we break PRE tests that leave state in it. | 1008 // Otherwise, we break PRE tests that leave state in it. |
1009 if (!base::PathExists(local_state_path)) { | 1009 if (!base::PathExists(local_state_path)) { |
1010 base::DictionaryValue local_state_dict; | 1010 base::DictionaryValue local_state_dict; |
1011 | 1011 |
1012 if (!GetParam()) | 1012 if (!GetParam()) |
1013 local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true); | 1013 local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true); |
1014 | 1014 |
1015 // TODO(paulmeyer): Re-enable webview version of this test | |
1016 // (drop this condition) once http://crbug.com/452452 is fixed. | |
1017 if (GetParam()) | |
1018 local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true); | |
1019 | |
1020 CHECK(JSONFileValueSerializer(local_state_path) | 1015 CHECK(JSONFileValueSerializer(local_state_path) |
1021 .Serialize(local_state_dict)); | 1016 .Serialize(local_state_dict)); |
1022 } | 1017 } |
1023 | 1018 |
1024 return WizardControllerTest::SetUpUserDataDirectory(); | 1019 return WizardControllerTest::SetUpUserDataDirectory(); |
1025 } | 1020 } |
1026 | 1021 |
1027 net::SpawnedTestServer& proxy_server() { return proxy_server_; } | 1022 net::SpawnedTestServer& proxy_server() { return proxy_server_; } |
1028 | 1023 |
1029 private: | 1024 private: |
1030 net::SpawnedTestServer proxy_server_; | 1025 net::SpawnedTestServer proxy_server_; |
1031 | 1026 |
1032 DISALLOW_COPY_AND_ASSIGN(WizardControllerProxyAuthOnSigninTest); | 1027 DISALLOW_COPY_AND_ASSIGN(WizardControllerProxyAuthOnSigninTest); |
1033 }; | 1028 }; |
1034 | 1029 |
1035 IN_PROC_BROWSER_TEST_P(WizardControllerProxyAuthOnSigninTest, | 1030 IN_PROC_BROWSER_TEST_P(WizardControllerProxyAuthOnSigninTest, |
1036 ProxyAuthDialogOnSigninScreen) { | 1031 ProxyAuthDialogOnSigninScreen) { |
1037 content::WindowedNotificationObserver auth_needed_waiter( | 1032 content::WindowedNotificationObserver auth_needed_waiter( |
1038 chrome::NOTIFICATION_AUTH_NEEDED, | 1033 chrome::NOTIFICATION_AUTH_NEEDED, |
1039 content::NotificationService::AllSources()); | 1034 content::NotificationService::AllSources()); |
1040 | 1035 |
1041 CheckCurrentScreen(WizardController::kNetworkScreenName); | 1036 CheckCurrentScreen(WizardController::kNetworkScreenName); |
1042 | 1037 |
1043 LoginDisplayHostImpl::default_host()->StartSignInScreen(LoginScreenContext()); | 1038 LoginDisplayHostImpl::default_host()->StartSignInScreen(LoginScreenContext()); |
1044 auth_needed_waiter.Wait(); | 1039 auth_needed_waiter.Wait(); |
1045 } | 1040 } |
1046 | 1041 |
| 1042 // TODO(paulmeyer): Re-enable webview version of this test |
| 1043 // (drop this condition) once http://crbug.com/452452 is fixed. |
1047 INSTANTIATE_TEST_CASE_P(WizardControllerProxyAuthOnSigninSuite, | 1044 INSTANTIATE_TEST_CASE_P(WizardControllerProxyAuthOnSigninSuite, |
1048 WizardControllerProxyAuthOnSigninTest, | 1045 WizardControllerProxyAuthOnSigninTest, |
1049 testing::Bool()); | 1046 testing::Values(false)); |
1050 | 1047 |
1051 class WizardControllerKioskFlowTest : public WizardControllerFlowTest { | 1048 class WizardControllerKioskFlowTest : public WizardControllerFlowTest { |
1052 protected: | 1049 protected: |
1053 WizardControllerKioskFlowTest() {} | 1050 WizardControllerKioskFlowTest() {} |
1054 | 1051 |
1055 // Overridden from InProcessBrowserTest: | 1052 // Overridden from InProcessBrowserTest: |
1056 void SetUpCommandLine(base::CommandLine* command_line) override { | 1053 void SetUpCommandLine(base::CommandLine* command_line) override { |
1057 base::FilePath test_data_dir; | 1054 base::FilePath test_data_dir; |
1058 ASSERT_TRUE(chromeos::test_utils::GetTestDataPath( | 1055 ASSERT_TRUE(chromeos::test_utils::GetTestDataPath( |
1059 "app_mode", "kiosk_manifest", &test_data_dir)); | 1056 "app_mode", "kiosk_manifest", &test_data_dir)); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when | 1263 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when |
1267 // UI and logic is ready. http://crbug.com/127016 | 1264 // UI and logic is ready. http://crbug.com/127016 |
1268 | 1265 |
1269 // TODO(dzhioev): Add tests for controller/host pairing flow. | 1266 // TODO(dzhioev): Add tests for controller/host pairing flow. |
1270 // http://crbug.com/375191 | 1267 // http://crbug.com/375191 |
1271 | 1268 |
1272 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, | 1269 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, |
1273 "tests for new control flow are missing"); | 1270 "tests for new control flow are missing"); |
1274 | 1271 |
1275 } // namespace chromeos | 1272 } // namespace chromeos |
OLD | NEW |