| 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/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 // Make sure that the foo webui handler does not get created when we try to | 859 // Make sure that the foo webui handler does not get created when we try to |
| 860 // load it inside the iframe of the login ui. | 860 // load it inside the iframe of the login ui. |
| 861 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, NoWebUIInIframe) { | 861 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, NoWebUIInIframe) { |
| 862 GURL url = GetSigninPromoURL().Resolve( | 862 GURL url = GetSigninPromoURL().Resolve( |
| 863 "?source=0&access_point=0&reason=0&frameUrl=chrome://foo"); | 863 "?source=0&access_point=0&reason=0&frameUrl=chrome://foo"); |
| 864 EXPECT_CALL(foo_provider(), NewWebUI(_, _)).Times(0); | 864 EXPECT_CALL(foo_provider(), NewWebUI(_, _)).Times(0); |
| 865 ui_test_utils::NavigateToURL(browser(), url); | 865 ui_test_utils::NavigateToURL(browser(), url); |
| 866 } | 866 } |
| 867 | 867 |
| 868 // Make sure that "success.html" can be loaded by chrome://chrome-signin. | 868 // Make sure that "success.html" can be loaded by chrome://chrome-signin. |
| 869 // http://crbug.com/709117 | 869 // http://crbug.com/709117. |
| 870 // Flaky on Linux and Mac. http://crbug.com/722164. |
| 870 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, | 871 IN_PROC_BROWSER_TEST_F(InlineLoginUISafeIframeBrowserTest, |
| 871 LoadSuccessContinueURL) { | 872 DISABLED_LoadSuccessContinueURL) { |
| 872 ui_test_utils::NavigateToURL(browser(), GetSigninPromoURL()); | 873 ui_test_utils::NavigateToURL(browser(), GetSigninPromoURL()); |
| 873 WaitUntilUIReady(browser()); | 874 WaitUntilUIReady(browser()); |
| 874 | 875 |
| 875 const std::string success_url = | 876 const std::string success_url = |
| 876 GaiaUrls::GetInstance()->signin_completed_continue_url().spec(); | 877 GaiaUrls::GetInstance()->signin_completed_continue_url().spec(); |
| 877 const char* kLoadSuccessPageScript = | 878 const char* kLoadSuccessPageScript = |
| 878 "var handler = function(e) {" | 879 "var handler = function(e) {" |
| 879 " if (e.url == '%s') {" | 880 " if (e.url == '%s') {" |
| 880 " window.domAutomationController.send('success_page_loaded');" | 881 " window.domAutomationController.send('success_page_loaded');" |
| 881 " }" | 882 " }" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 content::WebContents* contents = | 923 content::WebContents* contents = |
| 923 browser()->tab_strip_model()->GetActiveWebContents(); | 924 browser()->tab_strip_model()->GetActiveWebContents(); |
| 924 ASSERT_TRUE(content::ExecuteScript( | 925 ASSERT_TRUE(content::ExecuteScript( |
| 925 contents, "window.location.href = 'chrome://foo'")); | 926 contents, "window.location.href = 'chrome://foo'")); |
| 926 | 927 |
| 927 content::TestNavigationObserver navigation_observer(contents, 1); | 928 content::TestNavigationObserver navigation_observer(contents, 1); |
| 928 navigation_observer.Wait(); | 929 navigation_observer.Wait(); |
| 929 | 930 |
| 930 EXPECT_EQ(GURL("about:blank"), contents->GetVisibleURL()); | 931 EXPECT_EQ(GURL("about:blank"), contents->GetVisibleURL()); |
| 931 } | 932 } |
| OLD | NEW |