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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc

Issue 9323071: Use InterstitialPage through a delegate interface instead of deriving from it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc (revision 120733)
+++ chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc (working copy)
@@ -21,6 +21,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
+#include "content/browser/tab_contents/interstitial_page.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -274,7 +275,8 @@
// NavigateToURL returns.
SafeBrowsingBlockingPage* interstitial_page =
static_cast<SafeBrowsingBlockingPage*>(
- InterstitialPage::GetInterstitialPage(contents));
+ InterstitialPage::GetInterstitialPage(contents)->
+ GetDelegateForTesting());
ASSERT_TRUE(interstitial_page);
interstitial_page->CommandReceived(command);
}
@@ -304,7 +306,8 @@
if (contents->ShowingInterstitialPage() && wait_for_delete) {
// We'll get notified when the interstitial is deleted.
static_cast<TestSafeBrowsingBlockingPage*>(
- contents->GetInterstitialPage())->set_wait_for_delete();
+ contents->GetInterstitialPage()->GetDelegateForTesting())->
+ set_wait_for_delete();
ui_test_utils::RunMessageLoop();
}

Powered by Google App Engine
This is Rietveld 408576698