| 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/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 GURL("chrome://interstitials/safebrowsing?type=malware"), | 57 GURL("chrome://interstitials/safebrowsing?type=malware"), |
| 58 "Security error"); | 58 "Security error"); |
| 59 } | 59 } |
| 60 | 60 |
| 61 IN_PROC_BROWSER_TEST_F(InterstitialUITest, PhishingInterstitial) { | 61 IN_PROC_BROWSER_TEST_F(InterstitialUITest, PhishingInterstitial) { |
| 62 TestInterstitial( | 62 TestInterstitial( |
| 63 GURL("chrome://interstitials/safebrowsing?type=phishing"), | 63 GURL("chrome://interstitials/safebrowsing?type=phishing"), |
| 64 "Security error"); | 64 "Security error"); |
| 65 } | 65 } |
| 66 | 66 |
| 67 IN_PROC_BROWSER_TEST_F(InterstitialUITest, MalwareInterstitialQuiet) { |
| 68 TestInterstitial( |
| 69 GURL("chrome://interstitials/quietsafebrowsing?type=malware"), |
| 70 "Security error"); |
| 71 } |
| 72 |
| 73 IN_PROC_BROWSER_TEST_F(InterstitialUITest, PhishingInterstitialQuiet) { |
| 74 TestInterstitial( |
| 75 GURL("chrome://interstitials/quietsafebrowsing?type=phishing"), |
| 76 "Security error"); |
| 77 } |
| 78 |
| 67 IN_PROC_BROWSER_TEST_F(InterstitialUITest, ClientsideMalwareInterstitial) { | 79 IN_PROC_BROWSER_TEST_F(InterstitialUITest, ClientsideMalwareInterstitial) { |
| 68 TestInterstitial( | 80 TestInterstitial( |
| 69 GURL("chrome://interstitials/safebrowsing?type=clientside_malware"), | 81 GURL("chrome://interstitials/safebrowsing?type=clientside_malware"), |
| 70 "Security error"); | 82 "Security error"); |
| 71 } | 83 } |
| 72 | 84 |
| 73 IN_PROC_BROWSER_TEST_F(InterstitialUITest, ClientsidePhishingInterstitial) { | 85 IN_PROC_BROWSER_TEST_F(InterstitialUITest, ClientsidePhishingInterstitial) { |
| 74 TestInterstitial( | 86 TestInterstitial( |
| 75 GURL("chrome://interstitials/safebrowsing?type=clientside_phishing"), | 87 GURL("chrome://interstitials/safebrowsing?type=clientside_phishing"), |
| 76 "Security error"); | 88 "Security error"); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 95 | 107 |
| 96 // Duplicate the tab and close it. | 108 // Duplicate the tab and close it. |
| 97 chrome::DuplicateTab(browser()); | 109 chrome::DuplicateTab(browser()); |
| 98 EXPECT_NE(current_tab, browser()->tab_strip_model()->active_index()); | 110 EXPECT_NE(current_tab, browser()->tab_strip_model()->active_index()); |
| 99 chrome::CloseTab(browser()); | 111 chrome::CloseTab(browser()); |
| 100 EXPECT_EQ(current_tab, browser()->tab_strip_model()->active_index()); | 112 EXPECT_EQ(current_tab, browser()->tab_strip_model()->active_index()); |
| 101 | 113 |
| 102 // Reloading the page shouldn't cause a crash. | 114 // Reloading the page shouldn't cause a crash. |
| 103 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB); | 115 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB); |
| 104 } | 116 } |
| OLD | NEW |