| 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 "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 9 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 10 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 10 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 browser()->tab_strip_model()->GetActiveWebContents(); | 850 browser()->tab_strip_model()->GetActiveWebContents(); |
| 851 ASSERT_TRUE(content::ExecuteScript( | 851 ASSERT_TRUE(content::ExecuteScript( |
| 852 contents, "window.location.href = 'chrome://foo'")); | 852 contents, "window.location.href = 'chrome://foo'")); |
| 853 | 853 |
| 854 content::TestNavigationObserver navigation_observer(contents, 1); | 854 content::TestNavigationObserver navigation_observer(contents, 1); |
| 855 navigation_observer.Wait(); | 855 navigation_observer.Wait(); |
| 856 | 856 |
| 857 EXPECT_EQ(GURL("about:blank"), contents->GetVisibleURL()); | 857 EXPECT_EQ(GURL("about:blank"), contents->GetVisibleURL()); |
| 858 } | 858 } |
| 859 | 859 |
| 860 // Flaky on win_chromium_x64_rel_ng: http://crbug605357 |
| 861 #if !defined(OS_WIN) |
| 860 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, | 862 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, |
| 861 ConfirmationRequiredForNonsecureSignin) { | 863 ConfirmationRequiredForNonsecureSignin) { |
| 862 FakeGaia fake_gaia; | 864 FakeGaia fake_gaia; |
| 863 fake_gaia.Initialize(); | 865 fake_gaia.Initialize(); |
| 864 | 866 |
| 865 embedded_test_server()->RegisterRequestHandler( | 867 embedded_test_server()->RegisterRequestHandler( |
| 866 base::Bind(&FakeGaia::HandleRequest, | 868 base::Bind(&FakeGaia::HandleRequest, |
| 867 base::Unretained(&fake_gaia))); | 869 base::Unretained(&fake_gaia))); |
| 868 fake_gaia.SetFakeMergeSessionParams( | 870 fake_gaia.SetFakeMergeSessionParams( |
| 869 "email@gmail.com", "fake-sid-cookie", "fake-lsid-cookie"); | 871 "email@gmail.com", "fake-sid-cookie", "fake-lsid-cookie"); |
| 870 | 872 |
| 871 // Navigates to the Chrome signin page which loads the fake gaia auth page. | 873 // Navigates to the Chrome signin page which loads the fake gaia auth page. |
| 872 // Since the fake gaia auth page is served over HTTP, thus expects to see an | 874 // Since the fake gaia auth page is served over HTTP, thus expects to see an |
| 873 // untrusted signin confirmation dialog upon submitting credentials below. | 875 // untrusted signin confirmation dialog upon submitting credentials below. |
| 874 ui_test_utils::NavigateToURL(browser(), GetSigninPromoURL()); | 876 ui_test_utils::NavigateToURL(browser(), GetSigninPromoURL()); |
| 875 WaitUntilUIReady(browser()); | 877 WaitUntilUIReady(browser()); |
| 876 | 878 |
| 877 MockLoginUIObserver observer; | 879 MockLoginUIObserver observer; |
| 878 LoginUIServiceFactory::GetForProfile(browser()->profile()) | 880 LoginUIServiceFactory::GetForProfile(browser()->profile()) |
| 879 ->AddObserver(&observer); | 881 ->AddObserver(&observer); |
| 880 base::RunLoop run_loop; | 882 base::RunLoop run_loop; |
| 881 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) | 883 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) |
| 882 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); | 884 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); |
| 883 | 885 |
| 884 ExecuteJsToSigninInSigninFrame(browser(), "email@gmail.com", "password"); | 886 ExecuteJsToSigninInSigninFrame(browser(), "email@gmail.com", "password"); |
| 885 run_loop.Run(); | 887 run_loop.Run(); |
| 886 base::MessageLoop::current()->RunUntilIdle(); | 888 base::MessageLoop::current()->RunUntilIdle(); |
| 887 } | 889 } |
| 890 #endif // OS_WIN |
| OLD | NEW |