Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/browser/signin/signin_promo.h" | 6 #include "chrome/browser/signin/signin_promo.h" |
| 7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 9 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 9 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
| 10 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 10 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 content::WebContents* contents = | 270 content::WebContents* contents = |
| 271 browser()->tab_strip_model()->GetActiveWebContents(); | 271 browser()->tab_strip_model()->GetActiveWebContents(); |
| 272 EXPECT_EQ(url, contents->GetVisibleURL()); | 272 EXPECT_EQ(url, contents->GetVisibleURL()); |
| 273 | 273 |
| 274 content::NavigationController& controller = contents->GetController(); | 274 content::NavigationController& controller = contents->GetController(); |
| 275 EXPECT_TRUE(controller.GetPendingEntry() == NULL); | 275 EXPECT_TRUE(controller.GetPendingEntry() == NULL); |
| 276 } | 276 } |
| 277 | 277 |
| 278 // Flaky on CrOS, http://crbug.com/364759. | 278 // Flaky on CrOS, http://crbug.com/364759. |
| 279 // Also flaky on Mac, http://crbug.com/442674. | 279 // Also flaky on Mac, http://crbug.com/442674. |
| 280 #if defined(OS_CHROMEOS) || defined(OS_MACOSX) | 280 // Also flaky on Linux which is just too flaky |
|
Bernhard Bauer
2015/02/10 19:34:51
Please add a link to the bug.
| |
| 281 #define MAYBE_NavigationToOtherChromeURLDisallowed \ | |
| 282 DISABLED_NavigationToOtherChromeURLDisallowed | |
| 283 #else | |
| 284 #define MAYBE_NavigationToOtherChromeURLDisallowed \ | |
| 285 NavigationToOtherChromeURLDisallowed | |
| 286 #endif | |
| 287 | |
| 288 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, | 281 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, |
| 289 MAYBE_NavigationToOtherChromeURLDisallowed) { | 282 DISABLED_NavigationToOtherChromeURLDisallowed) { |
| 290 ui_test_utils::NavigateToURL( | 283 ui_test_utils::NavigateToURL( |
| 291 browser(), signin::GetPromoURL(signin_metrics::SOURCE_START_PAGE, false)); | 284 browser(), signin::GetPromoURL(signin_metrics::SOURCE_START_PAGE, false)); |
| 292 WaitUntilUIReady(browser()); | 285 WaitUntilUIReady(browser()); |
| 293 | 286 |
| 294 content::WebContents* contents = | 287 content::WebContents* contents = |
| 295 browser()->tab_strip_model()->GetActiveWebContents(); | 288 browser()->tab_strip_model()->GetActiveWebContents(); |
| 296 ASSERT_TRUE(content::ExecuteScript( | 289 ASSERT_TRUE(content::ExecuteScript( |
| 297 contents, "window.location.href = 'chrome://foo'")); | 290 contents, "window.location.href = 'chrome://foo'")); |
| 298 | 291 |
| 299 content::TestNavigationObserver navigation_observer(contents, 1); | 292 content::TestNavigationObserver navigation_observer(contents, 1); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 326 ->AddObserver(&observer); | 319 ->AddObserver(&observer); |
| 327 base::RunLoop run_loop; | 320 base::RunLoop run_loop; |
| 328 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) | 321 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) |
| 329 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); | 322 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); |
| 330 | 323 |
| 331 ExecuteJsToSigninInSigninFrame(browser(), "email@gmail.com", "password"); | 324 ExecuteJsToSigninInSigninFrame(browser(), "email@gmail.com", "password"); |
| 332 run_loop.Run(); | 325 run_loop.Run(); |
| 333 base::MessageLoop::current()->RunUntilIdle(); | 326 base::MessageLoop::current()->RunUntilIdle(); |
| 334 } | 327 } |
| 335 #endif // OS_CHROMEOS | 328 #endif // OS_CHROMEOS |
| OLD | NEW |