summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-05 20:29:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-05 20:29:53 +0000
commit0c79ef9a86139c00015a9621ac5ac4a048ce3c4a (patch)
treed3f25b04fb9c6190e0abd77c4189dddc3335c721 /chrome/browser/safe_browsing
parent7a6ac5e326a2523a6485aec9b0480ecb5eb3344f (diff)
downloadchromium_src-0c79ef9a86139c00015a9621ac5ac4a048ce3c4a.zip
chromium_src-0c79ef9a86139c00015a9621ac5ac4a048ce3c4a.tar.gz
chromium_src-0c79ef9a86139c00015a9621ac5ac4a048ce3c4a.tar.bz2
Make TestTabContents::TestDidNavigate not take a ViewHostMsg_FrameNavigate_Params, since that's an internal content IPC struct.
BUG=98716 Review URL: http://codereview.chromium.org/8801003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc12
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc15
2 files changed, 11 insertions, 16 deletions
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
index 3bc5a74..3adc68d 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
@@ -22,12 +22,13 @@
#include "chrome/test/base/testing_profile.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/common/view_messages.h"
#include "content/public/common/page_transition_types.h"
+#include "content/public/common/referrer.h"
#include "content/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h"
using ::testing::Return;
using ::testing::StrictMock;
@@ -97,17 +98,14 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
type, std::string());
static int page_id = 0;
- ViewHostMsg_FrameNavigate_Params params;
- InitNavigateParams(&params, ++page_id, url, type);
- params.referrer =
- content::Referrer(referrer, WebKit::WebReferrerPolicyDefault);
-
RenderViewHost* rvh = contents()->pending_rvh();
if (!rvh) {
rvh = contents()->render_view_host();
}
contents()->ProceedWithCrossSiteNavigation();
- contents()->TestDidNavigate(rvh, params);
+ contents()->TestDidNavigateWithReferrer(
+ rvh, ++page_id, url,
+ content::Referrer(referrer, WebKit::WebReferrerPolicyDefault), type);
}
bool ExtractFeatures(ClientPhishingRequest* request) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 10be2d4..1bf2e80 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -11,7 +11,6 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/common/view_messages.h"
#include "content/test/test_browser_thread.h"
using content::BrowserThread;
@@ -110,10 +109,9 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness,
}
void Navigate(const char* url, int page_id) {
- ViewHostMsg_FrameNavigate_Params params;
- InitNavigateParams(
- &params, page_id, GURL(url), content::PAGE_TRANSITION_TYPED);
- contents()->TestDidNavigate(contents()->render_view_host(), params);
+ contents()->TestDidNavigate(
+ contents()->render_view_host(), page_id, GURL(url),
+ content::PAGE_TRANSITION_TYPED);
}
void GoBackCrossSite() {
@@ -122,10 +120,9 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness,
contents()->controller().GoBack();
// The navigation should commit in the pending RVH.
- ViewHostMsg_FrameNavigate_Params params;
- InitNavigateParams(&params, entry->page_id(), GURL(entry->url()),
- content::PAGE_TRANSITION_TYPED);
- contents()->TestDidNavigate(contents()->pending_rvh(), params);
+ contents()->TestDidNavigate(
+ contents()->pending_rvh(), entry->page_id(), GURL(entry->url()),
+ content::PAGE_TRANSITION_TYPED);
}
void ShowInterstitial(bool is_subresource, const char* url) {