summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 22:22:01 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 22:22:01 +0000
commit0b9d3d2ff9872e2971eb0479bd16efe74ee3d44f (patch)
treecbc699b3687b764f6e7fb3c47af1d581dd6f4aad
parentf7f3a5f86a24f65666284802b51d0eaa5c9d7741 (diff)
downloadchromium_src-0b9d3d2ff9872e2971eb0479bd16efe74ee3d44f.zip
chromium_src-0b9d3d2ff9872e2971eb0479bd16efe74ee3d44f.tar.gz
chromium_src-0b9d3d2ff9872e2971eb0479bd16efe74ee3d44f.tar.bz2
Fix BROWSER_WRAPPER env for ui tests so it works with commands
longer than a single token. This lets me do things like BROWSER_WRAPPER='xterm -e gdb --args' ui_tests Review URL: http://codereview.chromium.org/99296 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15106 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/ui/ui_test.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index ea1ec69..6bece9c 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -29,14 +29,11 @@
#include "chrome/test/automation/automation_proxy.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
+#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/chrome_process_util.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
-#if defined(OS_WIN)
-// TODO(port): this just needs to be ported.
-#include "chrome/test/automation/window_proxy.h"
-#endif
using base::TimeTicks;
@@ -80,7 +77,8 @@ const wchar_t kExtraChromeFlagsSwitch[] = L"extra-chrome-flags";
const wchar_t kEnableErrorDialogs[] = L"enable-errdialogs";
// Uncomment this line to have the spawned process wait for the debugger to
-// attach.
+// attach. This only works on Windows. On posix systems, you can set the
+// BROWSER_WRAPPER env variable to wrap the browser process.
// #define WAIT_FOR_DEBUGGER_ON_OPEN 1
bool UITest::DieFileDie(const FilePath& file, bool recurse) {
@@ -365,9 +363,7 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
// commandline with a special prefix to invoke the special environment.
const char* browser_wrapper = getenv("BROWSER_WRAPPER");
if (browser_wrapper) {
- CommandLine wrapped_command(ASCIIToWide(browser_wrapper));
- wrapped_command.AppendArguments(command_line, true);
- command_line = wrapped_command;
+ command_line.PrependWrapper(ASCIIToWide(browser_wrapper));
LOG(INFO) << "BROWSER_WRAPPER was set, prefixing command_line with "
<< browser_wrapper;
}