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

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

Issue 10221002: Fix ChromeMainTest tests on CrOS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: finally, fix 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/browser/chrome_main_browsertest.cc ('k') | no next file » | 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 133852)
+++ chrome/test/base/in_process_browser_test.cc (working copy)
@@ -39,6 +39,7 @@
#include "content/test/test_launcher.h"
#include "net/base/mock_host_resolver.h"
#include "net/test/test_server.h"
+#include "ui/gfx/compositor/compositor_switches.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/audio/audio_handler.h"
@@ -287,9 +288,18 @@
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);
+#if defined(USE_AURA)
+ // Copy what UITestBase::SetLaunchSwitches() does, and also what
+ // ChromeTestSuite does if the process had went into the test path. Otherwise
+ // tests will fail on bots.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableTestCompositor)) {
+ new_command_line.AppendSwitch(switches::kTestCompositor);
+ }
+#endif
+
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
new_command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
« no previous file with comments | « chrome/browser/chrome_main_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698