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

Unified Diff: chrome/browser/browser_init.cc

Issue 28051: Attempt at fixing flakeyness when running session restore ui tests in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « no previous file | chrome/browser/sessions/session_restore_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_init.cc
===================================================================
--- chrome/browser/browser_init.cc (revision 10207)
+++ chrome/browser/browser_init.cc (working copy)
@@ -450,11 +450,18 @@
// compatibility with the old testing code
// If there are any loose parameters, we expect each one to generate a
// new tab; if there are none then we get one homepage tab.
+ int expected_tab_count = 1;
+ if (command_line.HasSwitch(switches::kRestoreLastSession)) {
+ StringToInt(command_line.GetSwitchValue(switches::kRestoreLastSession),
+ &expected_tab_count);
+ } else {
+ expected_tab_count =
+ std::max(1, static_cast<int>(command_line.GetLooseValues().size()));
+ }
CreateAutomationProvider<TestingAutomationProvider>(
testing_channel_id,
profile,
- std::max(static_cast<int>(command_line.GetLooseValues().size()),
- 1));
+ static_cast<size_t>(expected_tab_count));
}
#endif
}
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698