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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 10202005: Convert the session restore ui_tests to browser_tests. I renabled the disabled tests; hopefully the… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: renable the mac test Created 8 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
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
===================================================================
--- chrome/test/base/in_process_browser_test.cc (revision 133679)
+++ chrome/test/base/in_process_browser_test.cc (working copy)
@@ -27,6 +27,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/url_constants.h"
+#include "chrome/test/base/chrome_test_suite.h"
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -35,6 +36,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/renderer/mock_content_renderer_client.h"
#include "content/test/test_browser_thread.h"
+#include "content/test/test_launcher.h"
#include "net/base/mock_host_resolver.h"
#include "net/test/test_server.h"
@@ -277,6 +279,29 @@
browser->window()->Show();
}
+#if !defined(OS_MACOSX)
+CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() {
+ CommandLine new_command_line(CommandLine::ForCurrentProcess()->GetProgram());
+ CommandLine::SwitchMap switches =
+ CommandLine::ForCurrentProcess()->GetSwitches();
+ switches.erase(switches::kUserDataDir);
+ switches.erase(test_launcher::kSingleProcessTestsFlag);
+ switches.erase(test_launcher::kSingleProcessTestsAndChromeFlag);
+ switches.erase(test_launcher::kSingleProcessTestsFlag);
+ new_command_line.AppendSwitch(ChromeTestSuite::kLaunchAsBrowser);
+
+ FilePath user_data_dir;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
+ new_command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
+
+ for (CommandLine::SwitchMap::const_iterator iter = switches.begin();
+ iter != switches.end(); ++iter) {
+ new_command_line.AppendSwitchNative((*iter).first, (*iter).second);
+ }
+ return new_command_line;
+}
+#endif
+
#if defined(OS_POSIX)
// On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make
// debugging easier) and also exit with a known error code (so that the test
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698