Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 TabContents* contents = browser()->GetSelectedTabContents(); 308 TabContents* contents = browser()->GetSelectedTabContents();
309 InterstitialPage* interstitial_page = InterstitialPage::GetInterstitialPage( 309 InterstitialPage* interstitial_page = InterstitialPage::GetInterstitialPage(
310 contents); 310 contents);
311 return interstitial_page != NULL; 311 return interstitial_page != NULL;
312 } 312 }
313 313
314 void WaitForInterstitial() { 314 void WaitForInterstitial() {
315 TabContents* contents = browser()->GetSelectedTabContents(); 315 TabContents* contents = browser()->GetSelectedTabContents();
316 if (!InterstitialPage::GetInterstitialPage(contents)) 316 if (!InterstitialPage::GetInterstitialPage(contents))
317 ui_test_utils::WaitForNotificationFrom( 317 ui_test_utils::WaitForNotificationFrom(
318 NotificationType::INTERSTITIAL_ATTACHED, 318 content::NOTIFICATION_INTERSTITIAL_ATTACHED,
319 Source<TabContents>(contents)); 319 Source<TabContents>(contents));
320 } 320 }
321 321
322 void WaitForNavigation() { 322 void WaitForNavigation() {
323 NavigationController* controller = 323 NavigationController* controller =
324 &browser()->GetSelectedTabContents()->controller(); 324 &browser()->GetSelectedTabContents()->controller();
325 ui_test_utils::WaitForNavigation(controller); 325 ui_test_utils::WaitForNavigation(controller);
326 } 326 }
327 327
328 void AssertReportSent() { 328 void AssertReportSent() {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 prefs::kSafeBrowsingReportingEnabled)); 535 prefs::kSafeBrowsingReportingEnabled));
536 536
537 SendCommand("\"proceed\""); // Simulate the user clicking "back" 537 SendCommand("\"proceed\""); // Simulate the user clicking "back"
538 AssertNoInterstitial(true); // Assert the interstitial is gone 538 AssertNoInterstitial(true); // Assert the interstitial is gone
539 539
540 EXPECT_EQ(url, browser()->GetSelectedTabContents()->GetURL()); 540 EXPECT_EQ(url, browser()->GetSelectedTabContents()->GetURL());
541 AssertReportSent(); 541 AssertReportSent();
542 } 542 }
543 543
544 } // namespace 544 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698