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

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

Issue 9829003: Add smooth scrolling command line switch for test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright date Created 8 years, 9 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 | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/test_shell_switches.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) 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/event_recorder.h" 10 #include "base/event_recorder.h"
(...skipping 17 matching lines...) Expand all
28 #include "net/url_request/url_request_context.h" 28 #include "net/url_request/url_request_context.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h " 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h "
31 #include "ui/gfx/gl/gl_implementation.h" 31 #include "ui/gfx/gl/gl_implementation.h"
32 #include "ui/gfx/gl/gl_switches.h" 32 #include "ui/gfx/gl/gl_switches.h"
33 #include "webkit/extensions/v8/gc_extension.h" 33 #include "webkit/extensions/v8/gc_extension.h"
34 #include "webkit/extensions/v8/heap_profiler_extension.h" 34 #include "webkit/extensions/v8/heap_profiler_extension.h"
35 #include "webkit/extensions/v8/playback_extension.h" 35 #include "webkit/extensions/v8/playback_extension.h"
36 #include "webkit/extensions/v8/profiler_extension.h" 36 #include "webkit/extensions/v8/profiler_extension.h"
37 #include "webkit/glue/webkit_glue.h" 37 #include "webkit/glue/webkit_glue.h"
38 #include "webkit/glue/webpreferences.h"
38 #include "webkit/glue/window_open_disposition.h" 39 #include "webkit/glue/window_open_disposition.h"
39 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 40 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
40 #include "webkit/tools/test_shell/test_shell.h" 41 #include "webkit/tools/test_shell/test_shell.h"
41 #include "webkit/tools/test_shell/test_shell_platform_delegate.h" 42 #include "webkit/tools/test_shell/test_shell_platform_delegate.h"
42 #include "webkit/tools/test_shell/test_shell_request_context.h" 43 #include "webkit/tools/test_shell/test_shell_request_context.h"
43 #include "webkit/tools/test_shell/test_shell_switches.h" 44 #include "webkit/tools/test_shell/test_shell_switches.h"
44 #include "webkit/tools/test_shell/test_shell_webkit_init.h" 45 #include "webkit/tools/test_shell/test_shell_webkit_init.h"
45 46
46 #if defined(OS_WIN) 47 #if defined(OS_WIN)
47 #pragma warning(disable: 4996) 48 #pragma warning(disable: 4996)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Config the modules that need access to a limited set of resources. 195 // Config the modules that need access to a limited set of resources.
195 net::NetModule::SetResourceProvider(TestShell::ResourceProvider); 196 net::NetModule::SetResourceProvider(TestShell::ResourceProvider);
196 197
197 platform.InitializeGUI(); 198 platform.InitializeGUI();
198 199
199 TestShell::InitializeTestShell(layout_test_mode, allow_external_pages); 200 TestShell::InitializeTestShell(layout_test_mode, allow_external_pages);
200 201
201 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows)) 202 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows))
202 TestShell::SetAllowScriptsToCloseWindows(); 203 TestShell::SetAllowScriptsToCloseWindows();
203 204
205 if (parsed_command_line.HasSwitch(test_shell::kEnableSmoothScrolling))
206 TestShell::GetWebPreferences()->enable_scroll_animator = true;
207
204 // Disable user themes for layout tests so pixel tests are consistent. 208 // Disable user themes for layout tests so pixel tests are consistent.
205 #if defined(OS_WIN) 209 #if defined(OS_WIN)
206 TestShellWebTheme::Engine engine; 210 TestShellWebTheme::Engine engine;
207 #endif 211 #endif
208 if (classic_theme) 212 if (classic_theme)
209 platform.SelectUnifiedTheme(); 213 platform.SelectUnifiedTheme();
210 #if defined(OS_WIN) 214 #if defined(OS_WIN)
211 if (generic_theme) 215 if (generic_theme)
212 test_shell_webkit_init.SetThemeEngine(&engine); 216 test_shell_webkit_init.SetThemeEngine(&engine);
213 #endif 217 #endif
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 TestShell::ShutdownTestShell(); 340 TestShell::ShutdownTestShell();
337 TestShell::CleanupLogging(); 341 TestShell::CleanupLogging();
338 342
339 // Tear down shared StatsTable; prevents unit_tests from leaking it. 343 // Tear down shared StatsTable; prevents unit_tests from leaking it.
340 base::StatsTable::set_current(NULL); 344 base::StatsTable::set_current(NULL);
341 delete table; 345 delete table;
342 RemoveSharedMemoryFile(stats_filename); 346 RemoveSharedMemoryFile(stats_filename);
343 347
344 return 0; 348 return 0;
345 } 349 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/test_shell_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698