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

Side by Side Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 18575: Do no use custom gtkrc files in layout test mode.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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 | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Creates an instance of the test_shell. 5 // Creates an instance of the test_shell.
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 7
8 #include <stdlib.h> // required by _set_abort_behavior 8 #include <stdlib.h> // required by _set_abort_behavior
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 TestShell::InitializeTestShell(layout_test_mode); 225 TestShell::InitializeTestShell(layout_test_mode);
226 226
227 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows)) 227 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows))
228 TestShell::SetAllowScriptsToCloseWindows(); 228 TestShell::SetAllowScriptsToCloseWindows();
229 229
230 // Disable user themes for layout tests so pixel tests are consistent. 230 // Disable user themes for layout tests so pixel tests are consistent.
231 if (layout_test_mode) { 231 if (layout_test_mode) {
232 #if defined(OS_WIN) 232 #if defined(OS_WIN)
233 gfx::NativeTheme::instance()->DisableTheming(); 233 gfx::NativeTheme::instance()->DisableTheming();
234 #elif defined(OS_LINUX) 234 #elif defined(OS_LINUX)
235 // Stop custom gtkrc files from messing with the theme.
236 gchar *default_gtkrc_files[] = { NULL };
Evan Martin 2009/01/24 01:39:20 star on the left (gchar* default...)
237 gtk_rc_set_default_files(default_gtkrc_files);
238 gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
239
235 // Pick a theme that uses Cairo for drawing, since we: 240 // Pick a theme that uses Cairo for drawing, since we:
236 // 1) currently don't support GTK themes that use the GDK drawing APIs, and 241 // 1) currently don't support GTK themes that use the GDK drawing APIs, and
237 // 2) need to use a unified theme for layout tests anyway. 242 // 2) need to use a unified theme for layout tests anyway.
238 g_object_set(gtk_settings_get_default(), 243 g_object_set(gtk_settings_get_default(),
239 "gtk-theme-name", "Mist", 244 "gtk-theme-name", "Mist",
240 NULL); 245 NULL);
241 #endif 246 #endif
242 } 247 }
243 248
244 if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) { 249 if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 400
396 // Tear down shared StatsTable; prevents unit_tests from leaking it. 401 // Tear down shared StatsTable; prevents unit_tests from leaking it.
397 StatsTable::set_current(NULL); 402 StatsTable::set_current(NULL);
398 delete table; 403 delete table;
399 404
400 #ifdef _CRTDBG_MAP_ALLOC 405 #ifdef _CRTDBG_MAP_ALLOC
401 _CrtDumpMemoryLeaks(); 406 _CrtDumpMemoryLeaks();
402 #endif 407 #endif
403 return 0; 408 return 0;
404 } 409 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698