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

Unified Diff: chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc

Issue 2768633003: Dynamic updating recent menu for tabs from other devices. (Closed)
Patch Set: Fixes compilation and test on Mac. Created 3 years, 9 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
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.cc ('k') | chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
diff --git a/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc b/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
index f4368619db6f45268b46fe122c1bfa234811b39c..55617a9203b1e82ec5dc32ad2d13eb7199ee01f6 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
@@ -23,6 +23,7 @@ const char kBaseSessionTag[] = "session_tag";
const char kBaseSessionName[] = "session_name";
const char kBaseTabUrl[] = "http://foo/?";
const char kTabTitleFormat[] = "session=%d;window=%d;tab=%d";
+const uint64_t kMaxMinutesRange = 1000;
struct TitleTimestampPair {
base::string16 title;
@@ -135,7 +136,8 @@ SessionID::id_type RecentTabsBuilderTestHelper::GetWindowID(int session_index,
void RecentTabsBuilderTestHelper::AddTab(int session_index, int window_index) {
base::Time timestamp =
- start_time_ + base::TimeDelta::FromMinutes(base::RandUint64());
+ start_time_ +
+ base::TimeDelta::FromMinutes(base::RandGenerator(kMaxMinutesRange));
AddTabWithInfo(session_index, window_index, timestamp, base::string16());
}
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.cc ('k') | chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698