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

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

Issue 6254004: Move more web widgets painting from webkit to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and fix width100percent-checkbox Created 9 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 | « webkit/tools/test_shell/test_shell_mac.mm ('k') | webkit/tools/test_shell/test_shell_win.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/app_switches.h" 5 #include "app/app_switches.h"
6 #include "app/gfx/gl/gl_implementation.h" 6 #include "app/gfx/gl/gl_implementation.h"
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/environment.h" 11 #include "base/environment.h"
12 #include "base/event_recorder.h" 12 #include "base/event_recorder.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
16 #include "base/memory_debug.h" 16 #include "base/memory_debug.h"
17 #include "base/message_loop.h" 17 #include "base/message_loop.h"
18 #include "base/metrics/stats_table.h" 18 #include "base/metrics/stats_table.h"
19 #include "base/path_service.h" 19 #include "base/path_service.h"
20 #include "base/process_util.h" 20 #include "base/process_util.h"
21 #include "base/rand_util.h" 21 #include "base/rand_util.h"
22 #include "base/string_number_conversions.h" 22 #include "base/string_number_conversions.h"
23 #include "base/sys_info.h" 23 #include "base/sys_info.h"
24 #include "base/utf_string_conversions.h" 24 #include "base/utf_string_conversions.h"
25 #include "gfx/gfx_module.h"
25 #include "net/base/cookie_monster.h" 26 #include "net/base/cookie_monster.h"
26 #include "net/base/net_module.h" 27 #include "net/base/net_module.h"
27 #include "net/base/net_util.h" 28 #include "net/base/net_util.h"
28 #include "net/http/http_cache.h" 29 #include "net/http/http_cache.h"
29 #include "net/http/http_util.h" 30 #include "net/http/http_util.h"
30 #include "net/test/test_server.h" 31 #include "net/test/test_server.h"
31 #include "net/url_request/url_request_context.h" 32 #include "net/url_request/url_request_context.h"
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h " 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h "
34 #include "webkit/glue/webkit_glue.h" 35 #include "webkit/glue/webkit_glue.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 cache_path = cache_path.AppendASCII("cache"); 196 cache_path = cache_path.AppendASCII("cache");
196 } 197 }
197 198
198 // Initializing with a default context, which means no on-disk cookie DB, 199 // Initializing with a default context, which means no on-disk cookie DB,
199 // and no support for directory listings. 200 // and no support for directory listings.
200 SimpleResourceLoaderBridge::Init(cache_path, cache_mode, layout_test_mode); 201 SimpleResourceLoaderBridge::Init(cache_path, cache_mode, layout_test_mode);
201 202
202 // Load ICU data tables 203 // Load ICU data tables
203 icu_util::Initialize(); 204 icu_util::Initialize();
204 205
205 // Config the network module so it has access to a limited set of resources. 206 // Config the modules that need access to a limited set of resources.
206 net::NetModule::SetResourceProvider(TestShell::NetResourceProvider); 207 net::NetModule::SetResourceProvider(TestShell::ResourceProvider);
208 gfx::GfxModule::SetResourceProvider(TestShell::ResourceProvider);
207 209
208 platform.InitializeGUI(); 210 platform.InitializeGUI();
209 211
210 TestShell::InitializeTestShell(layout_test_mode, allow_external_pages); 212 TestShell::InitializeTestShell(layout_test_mode, allow_external_pages);
211 213
212 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows)) 214 if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows))
213 TestShell::SetAllowScriptsToCloseWindows(); 215 TestShell::SetAllowScriptsToCloseWindows();
214 216
215 // Disable user themes for layout tests so pixel tests are consistent. 217 // Disable user themes for layout tests so pixel tests are consistent.
216 #if defined(OS_WIN) 218 #if defined(OS_WIN)
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 TestShell::ShutdownTestShell(); 453 TestShell::ShutdownTestShell();
452 TestShell::CleanupLogging(); 454 TestShell::CleanupLogging();
453 455
454 // Tear down shared StatsTable; prevents unit_tests from leaking it. 456 // Tear down shared StatsTable; prevents unit_tests from leaking it.
455 base::StatsTable::set_current(NULL); 457 base::StatsTable::set_current(NULL);
456 delete table; 458 delete table;
457 RemoveSharedMemoryFile(stats_filename); 459 RemoveSharedMemoryFile(stats_filename);
458 460
459 return 0; 461 return 0;
460 } 462 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_mac.mm ('k') | webkit/tools/test_shell/test_shell_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698