| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/process/launch.h" | 6 #include "base/process/launch.h" |
| 7 #include "base/test/launcher/test_launcher.h" | 7 #include "base/test/launcher/test_launcher.h" |
| 8 #include "base/test/test_switches.h" | 8 #include "base/test/test_switches.h" |
| 9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "chrome/browser/ui/test/test_browser_dialog.h" | 10 #include "chrome/browser/ui/test/test_browser_dialog.h" |
| 11 #include "content/public/common/content_switches.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/compositor/compositor_switches.h" | 13 #include "ui/compositor/compositor_switches.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // Switch for BrowserDialogTest.Invoke to spawn a subprocess testing the | 17 // Switch for BrowserDialogTest.Invoke to spawn a subprocess testing the |
| 17 // provided argument under a consistent setup. | 18 // provided argument under a consistent setup. |
| 18 constexpr const char kDialogSwitch[] = "dialog"; | 19 constexpr const char kDialogSwitch[] = "dialog"; |
| 19 | 20 |
| 20 // Pattern to search in test names that indicate support for dialog testing. | 21 // Pattern to search in test names that indicate support for dialog testing. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 60 |
| 60 base::LaunchOptions options; | 61 base::LaunchOptions options; |
| 61 | 62 |
| 62 // Disable timeouts and generate screen output if --interactive was specified. | 63 // Disable timeouts and generate screen output if --interactive was specified. |
| 63 if (command.HasSwitch(internal::kInteractiveSwitch)) { | 64 if (command.HasSwitch(internal::kInteractiveSwitch)) { |
| 64 command.AppendSwitchASCII(switches::kUiTestActionMaxTimeout, | 65 command.AppendSwitchASCII(switches::kUiTestActionMaxTimeout, |
| 65 TestTimeouts::kNoTimeoutSwitchValue); | 66 TestTimeouts::kNoTimeoutSwitchValue); |
| 66 command.AppendSwitchASCII(switches::kTestLauncherTimeout, | 67 command.AppendSwitchASCII(switches::kTestLauncherTimeout, |
| 67 TestTimeouts::kNoTimeoutSwitchValue); | 68 TestTimeouts::kNoTimeoutSwitchValue); |
| 68 command.AppendSwitch(switches::kEnablePixelOutputInTests); | 69 command.AppendSwitch(switches::kEnablePixelOutputInTests); |
| 70 #if defined(OS_WIN) |
| 71 // Under Windows, pass in --disable-gpu for now due to |
| 72 // http://crbug.com/687387. |
| 73 command.AppendSwitch(switches::kDisableGpu); |
| 74 #endif |
| 69 } else { | 75 } else { |
| 70 options.wait = true; | 76 options.wait = true; |
| 71 } | 77 } |
| 72 | 78 |
| 73 base::LaunchProcess(command, options); | 79 base::LaunchProcess(command, options); |
| 74 } | 80 } |
| OLD | NEW |