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

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

Issue 1002803002: Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: intended Created 5 years, 8 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/browser_feature_extractor_unittest.cc
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
index 9e92f2077c684cdc15a3c58e09a90a5e158b7784..0cd880cb8962be4604e3b0974a971e142ac16ec1 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
@@ -25,6 +25,7 @@
#include "components/history/core/browser/history_backend.h"
#include "components/history/core/browser/history_service.h"
#include "content/public/browser/navigation_controller.h"
+#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/referrer.h"
#include "content/public/test/test_browser_thread.h"
@@ -132,6 +133,8 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
web_contents()->GetController().LoadURL(
url, content::Referrer(referrer, blink::WebReferrerPolicyDefault),
type, std::string());
+ int pending_id =
+ web_contents()->GetController().GetPendingEntry()->GetUniqueID();
static int page_id = 0;
content::RenderFrameHost* rfh =
@@ -141,7 +144,7 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
}
WebContentsTester::For(web_contents())->ProceedWithCrossSiteNavigation();
WebContentsTester::For(web_contents())->TestDidNavigateWithReferrer(
- rfh, ++page_id, url,
+ rfh, ++page_id, pending_id, true, url,
content::Referrer(referrer, blink::WebReferrerPolicyDefault), type);
}

Powered by Google App Engine
This is Rietveld 408576698