| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "chrome/browser/browser_thread.h" | 7 #include "chrome/browser/browser_thread.h" |
| 8 #include "chrome/browser/child_process_security_policy.h" | 8 #include "chrome/browser/child_process_security_policy.h" |
| 9 #include "chrome/browser/chromeos/login/account_screen.h" | 9 #include "chrome/browser/chromeos/login/account_screen.h" |
| 10 #include "chrome/browser/chromeos/login/wizard_controller.h" | 10 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 ASSERT_TRUE(test_server()->Start()); | 31 ASSERT_TRUE(test_server()->Start()); |
| 32 GURL new_account_page_url(test_server()->GetURL("files/new_account.html")); | 32 GURL new_account_page_url(test_server()->GetURL("files/new_account.html")); |
| 33 AccountScreen::set_new_account_page_url(new_account_page_url); | 33 AccountScreen::set_new_account_page_url(new_account_page_url); |
| 34 AccountScreen::set_check_for_https(false); | 34 AccountScreen::set_check_for_https(false); |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(AccountScreenTest); | 38 DISALLOW_COPY_AND_ASSIGN(AccountScreenTest); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 #if defined(OFFICIAL_BUILD) |
| 42 // Flaky on official build on autotest. Since this is not |
| 43 // used in Official build, i'm disabling it. |
| 44 // See crosbug.com/8517 . |
| 45 #define MAYBE_TestBasic DISABLED_TestBasic |
| 46 #else |
| 47 #define MAYBE_TestBasic TestBasic |
| 48 #endif |
| 49 |
| 41 // A basic test. It does not care how things evolve after the URL is | 50 // A basic test. It does not care how things evolve after the URL is |
| 42 // loaded. Thus no message loop is started. Just check that initial | 51 // loaded. Thus no message loop is started. Just check that initial |
| 43 // status is expected. | 52 // status is expected. |
| 44 IN_PROC_BROWSER_TEST_F(AccountScreenTest, TestBasic) { | 53 IN_PROC_BROWSER_TEST_F(AccountScreenTest, MAYBE_TestBasic) { |
| 45 ASSERT_TRUE(controller()); | 54 ASSERT_TRUE(controller()); |
| 46 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen()); | 55 EXPECT_EQ(controller()->GetAccountScreen(), controller()->current_screen()); |
| 47 } | 56 } |
| 48 | 57 |
| 49 static void QuitUIMessageLoop() { | 58 static void QuitUIMessageLoop() { |
| 50 MessageLoopForUI::current()->Quit(); | 59 MessageLoopForUI::current()->Quit(); |
| 51 } | 60 } |
| 52 | 61 |
| 53 static bool inspector_called = false; // had to use global flag as | 62 static bool inspector_called = false; // had to use global flag as |
| 54 // InspectorHook() doesn't have context. | 63 // InspectorHook() doesn't have context. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 74 chrome::kCrosScheme); | 83 chrome::kCrosScheme); |
| 75 URLRequestFilter::GetInstance()->AddHostnameHandler(chrome::kCrosScheme, | 84 URLRequestFilter::GetInstance()->AddHostnameHandler(chrome::kCrosScheme, |
| 76 "inspector", | 85 "inspector", |
| 77 &InspectorHook); | 86 &InspectorHook); |
| 78 EXPECT_FALSE(inspector_called); | 87 EXPECT_FALSE(inspector_called); |
| 79 ui_test_utils::RunMessageLoop(); | 88 ui_test_utils::RunMessageLoop(); |
| 80 EXPECT_TRUE(inspector_called); | 89 EXPECT_TRUE(inspector_called); |
| 81 } | 90 } |
| 82 | 91 |
| 83 } // namespace chromeos | 92 } // namespace chromeos |
| OLD | NEW |