| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.h" |
| 7 #include "chrome/browser/devtools/devtools_window.h" | 7 #include "chrome/browser/devtools/devtools_window.h" |
| 8 #include "chrome/browser/devtools/devtools_window_testing.h" | 8 #include "chrome/browser/devtools/devtools_window_testing.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 browser()->tab_strip_model()->GetActiveWebContents()->GetTitle()); | 25 browser()->tab_strip_model()->GetActiveWebContents()->GetTitle()); |
| 26 | 26 |
| 27 // Should also be able to open and close devtools. | 27 // Should also be able to open and close devtools. |
| 28 DevToolsWindow* window = | 28 DevToolsWindow* window = |
| 29 DevToolsWindowTesting::OpenDevToolsWindowSync(browser(), true); | 29 DevToolsWindowTesting::OpenDevToolsWindowSync(browser(), true); |
| 30 EXPECT_TRUE(window); | 30 EXPECT_TRUE(window); |
| 31 DevToolsWindowTesting::CloseDevToolsWindowSync(window); | 31 DevToolsWindowTesting::CloseDevToolsWindowSync(window); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 // The following test is disabled due to flakiness: |
| 36 // https://crbug.com/405869, |
| 37 // https://crbug.com/400503. |
| 35 IN_PROC_BROWSER_TEST_F(InterstitialUITest, DISABLED_OpenInterstitial) { | 38 IN_PROC_BROWSER_TEST_F(InterstitialUITest, DISABLED_OpenInterstitial) { |
| 36 TestInterstitial( | 39 TestInterstitial( |
| 37 GURL("chrome://interstitials"), | 40 GURL("chrome://interstitials"), |
| 38 "Interstitials"); | 41 "Interstitials"); |
| 39 // Invalid path should open the main page: | 42 // Invalid path should open the main page: |
| 40 TestInterstitial( | 43 TestInterstitial( |
| 41 GURL("chrome://interstitials/--invalid--"), | 44 GURL("chrome://interstitials/--invalid--"), |
| 42 "Interstitials"); | 45 "Interstitials"); |
| 43 TestInterstitial( | 46 TestInterstitial( |
| 44 GURL("chrome://interstitials/ssl"), | 47 GURL("chrome://interstitials/ssl"), |
| 45 "Privacy error"); | 48 "Privacy error"); |
| 46 TestInterstitial( | 49 TestInterstitial( |
| 47 GURL("chrome://interstitials/safebrowsing?type=malware"), | 50 GURL("chrome://interstitials/safebrowsing?type=malware"), |
| 48 "Security error"); | 51 "Security error"); |
| 49 TestInterstitial( | 52 TestInterstitial( |
| 50 GURL("chrome://interstitials/safebrowsing?type=phishing"), | 53 GURL("chrome://interstitials/safebrowsing?type=phishing"), |
| 51 "Security error"); | 54 "Security error"); |
| 52 TestInterstitial( | 55 TestInterstitial( |
| 53 GURL("chrome://interstitials/safebrowsing?type=clientside_malware"), | 56 GURL("chrome://interstitials/safebrowsing?type=clientside_malware"), |
| 54 "Security error"); | 57 "Security error"); |
| 55 TestInterstitial( | 58 TestInterstitial( |
| 56 GURL("chrome://interstitials/safebrowsing?type=clientside_phishing"), | 59 GURL("chrome://interstitials/safebrowsing?type=clientside_phishing"), |
| 57 "Security error"); | 60 "Security error"); |
| 58 TestInterstitial(GURL("chrome://interstitials/captiveportal"), | 61 TestInterstitial(GURL("chrome://interstitials/captiveportal"), |
| 59 "Connect to network"); | 62 "Connect to network"); |
| 60 TestInterstitial(GURL("chrome://interstitials/captiveportal?is_wifi=1"), | 63 TestInterstitial(GURL("chrome://interstitials/captiveportal?is_wifi=1"), |
| 61 "Connect to Wi-Fi"); | 64 "Connect to Wi-Fi"); |
| 62 } | 65 } |
| OLD | NEW |