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

Side by Side Diff: chrome/test/unit/chrome_test_suite.cc

Issue 6975051: Remove COMPOSITOR_2 flag, old compositor code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change conditional compile defines. Created 9 years, 6 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/browser/ui/views/wrench_menu.cc ('k') | ui/gfx/compositor/compositor.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/unit/chrome_test_suite.h" 5 #include "chrome/test/unit/chrome_test_suite.h"
6 6
7 #include "app/app_paths.h" 7 #include "app/app_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "base/metrics/stats_table.h" 10 #include "base/metrics/stats_table.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // initialize the global StatsTable for unit_tests (make sure the file 139 // initialize the global StatsTable for unit_tests (make sure the file
140 // doesn't exist before opening it so the test gets a clean slate) 140 // doesn't exist before opening it so the test gets a clean slate)
141 stats_filename_ = "unit_tests"; 141 stats_filename_ = "unit_tests";
142 std::string pid_string = base::StringPrintf("-%d", base::GetCurrentProcId()); 142 std::string pid_string = base::StringPrintf("-%d", base::GetCurrentProcId());
143 stats_filename_ += pid_string; 143 stats_filename_ += pid_string;
144 RemoveSharedMemoryFile(stats_filename_); 144 RemoveSharedMemoryFile(stats_filename_);
145 stats_table_ = new base::StatsTable(stats_filename_, 20, 200); 145 stats_table_ = new base::StatsTable(stats_filename_, 20, 200);
146 base::StatsTable::set_current(stats_table_); 146 base::StatsTable::set_current(stats_table_);
147 147
148 #if defined(TOUCH_UI) 148 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
149 // Turn of GPU compositing in browser during unit tests. 149 // Turn of GPU compositing in browser during unit tests.
150 views::View::set_use_acceleration_when_possible(false); 150 views::View::set_use_acceleration_when_possible(false);
151 #endif 151 #endif
152 } 152 }
153 153
154 void ChromeTestSuite::Shutdown() { 154 void ChromeTestSuite::Shutdown() {
155 ResourceBundle::CleanupSharedInstance(); 155 ResourceBundle::CleanupSharedInstance();
156 156
157 #if defined(OS_MACOSX) 157 #if defined(OS_MACOSX)
158 base::mac::SetOverrideAppBundle(NULL); 158 base::mac::SetOverrideAppBundle(NULL);
159 #endif 159 #endif
160 160
161 delete g_browser_process; 161 delete g_browser_process;
162 g_browser_process = NULL; 162 g_browser_process = NULL;
163 163
164 // Tear down shared StatsTable; prevents unit_tests from leaking it. 164 // Tear down shared StatsTable; prevents unit_tests from leaking it.
165 base::StatsTable::set_current(NULL); 165 base::StatsTable::set_current(NULL);
166 delete stats_table_; 166 delete stats_table_;
167 RemoveSharedMemoryFile(stats_filename_); 167 RemoveSharedMemoryFile(stats_filename_);
168 168
169 base::TestSuite::Shutdown(); 169 base::TestSuite::Shutdown();
170 } 170 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.cc ('k') | ui/gfx/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698