| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This test creates a fake safebrowsing service, where we can inject | 5 // This test creates a fake safebrowsing service, where we can inject |
| 6 // malware and phishing urls. It then uses a real browser to go to | 6 // malware and phishing urls. It then uses a real browser to go to |
| 7 // these urls, and sends "goback" or "proceed" commands and verifies | 7 // these urls, and sends "goback" or "proceed" commands and verifies |
| 8 // they work. | 8 // they work. |
| 9 | 9 |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 ui_test_utils::NavigateToURL(browser(), url); | 274 ui_test_utils::NavigateToURL(browser(), url); |
| 275 | 275 |
| 276 SendCommand("\"takeMeBack\""); // Simulate the user clicking "back" | 276 SendCommand("\"takeMeBack\""); // Simulate the user clicking "back" |
| 277 AssertNoInterstitial(); // Assert the interstitial is gone | 277 AssertNoInterstitial(); // Assert the interstitial is gone |
| 278 | 278 |
| 279 EXPECT_EQ(GURL(chrome::kAboutBlankURL), // Back to "about:blank" | 279 EXPECT_EQ(GURL(chrome::kAboutBlankURL), // Back to "about:blank" |
| 280 browser()->GetSelectedTabContents()->GetURL()); | 280 browser()->GetSelectedTabContents()->GetURL()); |
| 281 } | 281 } |
| 282 | 282 |
| 283 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareIframeProceed) { | 283 // Crashy, http://crbug.com/68834. |
| 284 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, |
| 285 DISABLED_MalwareIframeProceed) { |
| 284 GURL url = test_server()->GetURL(kMalwarePage); | 286 GURL url = test_server()->GetURL(kMalwarePage); |
| 285 GURL iframe_url = test_server()->GetURL(kMalwareIframe); | 287 GURL iframe_url = test_server()->GetURL(kMalwareIframe); |
| 286 AddURLResult(iframe_url, SafeBrowsingService::URL_MALWARE); | 288 AddURLResult(iframe_url, SafeBrowsingService::URL_MALWARE); |
| 287 | 289 |
| 288 ui_test_utils::NavigateToURL(browser(), url); | 290 ui_test_utils::NavigateToURL(browser(), url); |
| 289 | 291 |
| 290 SendCommand("\"proceed\""); // Simulate the user clicking "proceed" | 292 SendCommand("\"proceed\""); // Simulate the user clicking "proceed" |
| 291 AssertNoInterstitial(); // Assert the interstitial is gone | 293 AssertNoInterstitial(); // Assert the interstitial is gone |
| 292 | 294 |
| 293 EXPECT_EQ(url, browser()->GetSelectedTabContents()->GetURL()); | 295 EXPECT_EQ(url, browser()->GetSelectedTabContents()->GetURL()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 308 ui_test_utils::NavigateToURL(browser(), url); | 310 ui_test_utils::NavigateToURL(browser(), url); |
| 309 | 311 |
| 310 SendCommand("\"proceed\""); // Simulate the user clicking "back" | 312 SendCommand("\"proceed\""); // Simulate the user clicking "back" |
| 311 AssertNoInterstitial(); // Assert the interstitial is gone | 313 AssertNoInterstitial(); // Assert the interstitial is gone |
| 312 | 314 |
| 313 EXPECT_EQ(url, browser()->GetSelectedTabContents()->GetURL()); | 315 EXPECT_EQ(url, browser()->GetSelectedTabContents()->GetURL()); |
| 314 AssertReportSent(); | 316 AssertReportSent(); |
| 315 } | 317 } |
| 316 | 318 |
| 317 } // namespace | 319 } // namespace |
| OLD | NEW |