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

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

Issue 2892483002: Lose the user gesture expiration check on IdentifyReferrerChainByWebContents (Closed)
Patch Set: Created 3 years, 7 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_navigation_observer_unittest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_unittest.cc
index b54aab186164e73248bd85b973e127d48cab4608..8c1ba35136214ace93a0c5eb5d5f08c8f1e3cbb6 100644
--- a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_unittest.cc
@@ -249,8 +249,8 @@ TEST_F(SBNavigationObserverTest, TestCleanUpStaleUserGestures) {
// Sets up user_gesture_map() such that it includes fresh, stale and invalid
// user gestures.
base::Time now = base::Time::Now(); // Fresh
- base::Time one_minute_ago =
- base::Time::FromDoubleT(now.ToDoubleT() - 60.0); // Stale
+ base::Time three_minute_ago =
lpz 2017/05/17 20:22:04 nit: three_minuteS_ago
Jialiu Lin 2017/05/17 20:58:24 Good catch. Done.
+ base::Time::FromDoubleT(now.ToDoubleT() - 60.0 * 3); // Stale
base::Time in_an_hour =
base::Time::FromDoubleT(now.ToDoubleT() + 60.0 * 60.0); // Invalid
AddTab(browser(), GURL("http://foo/1"));
@@ -262,7 +262,7 @@ TEST_F(SBNavigationObserverTest, TestCleanUpStaleUserGestures) {
content::WebContents* content2 =
browser()->tab_strip_model()->GetWebContentsAt(2);
user_gesture_map()->insert(std::make_pair(content0, now));
- user_gesture_map()->insert(std::make_pair(content1, one_minute_ago));
+ user_gesture_map()->insert(std::make_pair(content1, three_minute_ago));
user_gesture_map()->insert(std::make_pair(content2, in_an_hour));
ASSERT_EQ(3U, user_gesture_map()->size());

Powered by Google App Engine
This is Rietveld 408576698