| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/chrome_notification_types.h" | 5 #include "chrome/browser/chrome_notification_types.h" |
| 6 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" | 6 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" |
| 7 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 7 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
| 8 #include "chromeos/chromeos_switches.h" | 8 #include "chromeos/chromeos_switches.h" |
| 9 #include "content/public/test/browser_test_utils.h" | 9 #include "content/public/test/browser_test_utils.h" |
| 10 #include "content/public/test/test_utils.h" | 10 #include "content/public/test/test_utils.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 content::WindowedNotificationObserver session_start_waiter( | 38 content::WindowedNotificationObserver session_start_waiter( |
| 39 chrome::NOTIFICATION_SESSION_STARTED, | 39 chrome::NOTIFICATION_SESSION_STARTED, |
| 40 content::NotificationService::AllSources()); | 40 content::NotificationService::AllSources()); |
| 41 | 41 |
| 42 SetSignFormField("password", OobeBaseTest::kFakeUserPassword); | 42 SetSignFormField("password", OobeBaseTest::kFakeUserPassword); |
| 43 ExecuteJsInSigninFrame("document.getElementById('nextButton').click();"); | 43 ExecuteJsInSigninFrame("document.getElementById('nextButton').click();"); |
| 44 | 44 |
| 45 session_start_waiter.Wait(); | 45 session_start_waiter.Wait(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 IN_PROC_BROWSER_TEST_F(WebviewLoginTest, BackButton) { | 48 // Flaky: http://crbug.com/512648. |
| 49 IN_PROC_BROWSER_TEST_F(WebviewLoginTest, DISABLED_BackButton) { |
| 49 WaitForGaiaPageLoad(); | 50 WaitForGaiaPageLoad(); |
| 50 | 51 |
| 51 // Start: no back button, first page. | 52 // Start: no back button, first page. |
| 52 JsExpect("$('back-button-item').hidden"); | 53 JsExpect("$('back-button-item').hidden"); |
| 53 JsExpect("$('signin-frame').src.indexOf('#identifier') != -1"); | 54 JsExpect("$('signin-frame').src.indexOf('#identifier') != -1"); |
| 54 | 55 |
| 55 // Next step: back button active, second page. | 56 // Next step: back button active, second page. |
| 56 SetSignFormField("identifier", OobeBaseTest::kFakeUserEmail); | 57 SetSignFormField("identifier", OobeBaseTest::kFakeUserEmail); |
| 57 ExecuteJsInSigninFrame("document.getElementById('nextButton').click();"); | 58 ExecuteJsInSigninFrame("document.getElementById('nextButton').click();"); |
| 58 JsExpect("!$('back-button-item').hidden"); | 59 JsExpect("!$('back-button-item').hidden"); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 80 } | 81 } |
| 81 | 82 |
| 82 IN_PROC_BROWSER_TEST_F(WebviewLoginTest, AllowGuest) { | 83 IN_PROC_BROWSER_TEST_F(WebviewLoginTest, AllowGuest) { |
| 83 WaitForGaiaPageLoad(); | 84 WaitForGaiaPageLoad(); |
| 84 JsExpect("!$('guest-user-header-bar-item').hidden"); | 85 JsExpect("!$('guest-user-header-bar-item').hidden"); |
| 85 chromeos::CrosSettings::Get()->SetBoolean(kAccountsPrefAllowGuest, false); | 86 chromeos::CrosSettings::Get()->SetBoolean(kAccountsPrefAllowGuest, false); |
| 86 JsExpect("$('guest-user-header-bar-item').hidden"); | 87 JsExpect("$('guest-user-header-bar-item').hidden"); |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace chromeos | 90 } // namespace chromeos |
| OLD | NEW |