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

Side by Side Diff: chrome/test/base/test_launcher_utils.cc

Issue 21052007: aura: Clean up compositor initialization/destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanupcompositor: UseRealGLBindings for CompositingRWHVBrowserTests on win_rel Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/test_launcher_utils.h ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/base/test_launcher_utils.h" 5 #include "chrome/test/base/test_launcher_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "ui/gl/gl_switches.h"
16 15
17 #if defined(USE_AURA) 16 #if defined(USE_AURA)
18 #include "ui/views/corewm/corewm_switches.h" 17 #include "ui/views/corewm/corewm_switches.h"
19 #endif 18 #endif
20 19
21 namespace test_launcher_utils { 20 namespace test_launcher_utils {
22 21
23 void PrepareBrowserCommandLineForTests(CommandLine* command_line) { 22 void PrepareBrowserCommandLineForTests(CommandLine* command_line) {
24 // Turn off tip loading for tests; see http://crbug.com/17725. 23 // Turn off tip loading for tests; see http://crbug.com/17725.
25 command_line->AppendSwitch(switches::kDisableWebResources); 24 command_line->AppendSwitch(switches::kDisableWebResources);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // 89 //
91 // Note: we use an environment variable here, because we have to pass the 90 // Note: we use an environment variable here, because we have to pass the
92 // value to the child process. This is the simplest way to do it. 91 // value to the child process. This is the simplest way to do it.
93 scoped_ptr<base::Environment> env(base::Environment::Create()); 92 scoped_ptr<base::Environment> env(base::Environment::Create());
94 success = success && env->SetVar("XDG_CACHE_HOME", user_data_dir.value()); 93 success = success && env->SetVar("XDG_CACHE_HOME", user_data_dir.value());
95 #endif 94 #endif
96 95
97 return success; 96 return success;
98 } 97 }
99 98
100 bool OverrideGLImplementation(CommandLine* command_line,
101 const std::string& implementation_name) {
102 if (command_line->HasSwitch(switches::kUseGL))
103 return false;
104
105 command_line->AppendSwitchASCII(switches::kUseGL, implementation_name);
106
107 return true;
108 }
109
110 } // namespace test_launcher_utils 99 } // namespace test_launcher_utils
OLDNEW
« no previous file with comments | « chrome/test/base/test_launcher_utils.h ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698