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

Side by Side Diff: chrome/browser/ui/test/browser_dialog_browsertest.cc

Issue 2675213002: [Mac] DialogBrowserTest implementation to invoke Content settings bubble dialogs. (Closed)
Patch Set: Gets it working on Mac Created 3 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 unified diff | Download patch
OLDNEW
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
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, dialogs (but not the browser window) created in the
72 // spawned browser_test process are invisible for some unknown reason.
73 // Pass in --disable-gpu to resolve this for now. See
74 // http://crbug.com/687387.
75 command.AppendSwitch(switches::kDisableGpu);
76 #endif
69 } else { 77 } else {
70 options.wait = true; 78 options.wait = true;
71 } 79 }
72 80
73 base::LaunchProcess(command, options); 81 base::LaunchProcess(command, options);
74 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698