Commit edd1ebe0 authored by Trent Apted's avatar Trent Apted Committed by Commit Bot

Fix TestBrowserDialog --interactive.

It started failing in r482709 since more robust checks were added for
checking for test result output files.

To fix, remove switches::kTestLauncherOutput from the subprocess
command line so it doesn't try to create test result output.

Bug: 776265
Change-Id: Ib0406b77fb7aa90cddf712331342526fa555491b
Reviewed-on: https://chromium-review.googlesource.com/727680
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510254}
parent 762844b4
...@@ -53,7 +53,15 @@ TEST(BrowserDialogTest, Invoke) { ...@@ -53,7 +53,15 @@ TEST(BrowserDialogTest, Invoke) {
ASSERT_NE(it, dialog_cases.end()) << "Dialog '" << dialog_name ASSERT_NE(it, dialog_cases.end()) << "Dialog '" << dialog_name
<< "' not found."; << "' not found.";
base::CommandLine command(invoker); // Don't create test output for the subprocess (the paths will conflict).
base::CommandLine::StringVector argv = invoker.argv();
std::string ascii(switches::kTestLauncherOutput);
base::CommandLine::StringType native_switch(ascii.begin(), ascii.end());
base::EraseIf(
argv, [native_switch](const base::CommandLine::StringType& arg) -> bool {
return arg.find(native_switch) != arg.npos; // Substring search.
});
base::CommandLine command(argv);
// Replace TestBrowserDialog.Invoke with |dialog_name|. // Replace TestBrowserDialog.Invoke with |dialog_name|.
command.AppendSwitchASCII(base::kGTestFilterFlag, dialog_name); command.AppendSwitchASCII(base::kGTestFilterFlag, dialog_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment