diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 17:18:04 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 17:18:04 +0000 |
commit | bc0caef9b0af84365b6dd546cd21673c9790ca58 (patch) | |
tree | 54881e9c8bc957f65901a53978d18865135392dd /chrome/browser/tab_contents/interstitial_page.h | |
parent | 4e9f6be54df1f1f6f9cfe243624ef976f15d452f (diff) | |
download | chromium_src-bc0caef9b0af84365b6dd546cd21673c9790ca58.zip chromium_src-bc0caef9b0af84365b6dd546cd21673c9790ca58.tar.gz chromium_src-bc0caef9b0af84365b6dd546cd21673c9790ca58.tar.bz2 |
This CL adds unit-tests for the SafeBrowsingBlockingPage class.
This required:
- creating a factory to create SafeBrowsingBlockingPage
instances (so unit-tests can provide their own sub-classes).
- making the code posts tasks on the current message loop
when there is no IO thread. This should only happen in
tests scenarios where we only have 1 thread.
BUG=6731
TEST=Run the unit-tests. In Chrome, navigate to pages flagged as malware (ex: ianfette.org) and make sure the safe browsing feature still works as expected.
Review URL: http://codereview.chromium.org/56135
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/interstitial_page.h')
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h index 3f5ceca..3d66193 100644 --- a/chrome/browser/tab_contents/interstitial_page.h +++ b/chrome/browser/tab_contents/interstitial_page.h @@ -16,6 +16,7 @@ class MessageLoop; class NavigationEntry; class WebContents; +class WebContentsView; // This class is a base class for interstitial pages, pages that show some // informative message asking for user validation before reaching the target @@ -111,10 +112,14 @@ class InterstitialPage : public NotificationObserver, const GURL& url() const { return url_; } RenderViewHost* render_view_host() const { return render_view_host_; } - // Creates and shows the RenderViewHost containing the interstitial content. + // Creates the RenderViewHost containing the interstitial content. // Overriden in unit tests. virtual RenderViewHost* CreateRenderViewHost(); + // Creates the WebContentsView that shows the interstitial RVH. + // Overriden in unit tests. + virtual WebContentsView* CreateWebContentsView(); + private: // AutomationProvider needs access to Proceed and DontProceed to simulate // user actions. |