OLD | NEW |
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 "webkit/support/test_webkit_client.h" | 5 #include "webkit/support/test_webkit_client.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" |
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" |
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
34 #include "webkit/appcache/web_application_cache_host_impl.h" | 34 #include "webkit/appcache/web_application_cache_host_impl.h" |
35 #include "webkit/database/vfs_backend.h" | 35 #include "webkit/database/vfs_backend.h" |
36 #include "webkit/extensions/v8/gc_extension.h" | 36 #include "webkit/extensions/v8/gc_extension.h" |
37 #include "webkit/extensions/v8/gears_extension.h" | |
38 #include "webkit/glue/simple_webmimeregistry_impl.h" | 37 #include "webkit/glue/simple_webmimeregistry_impl.h" |
39 #include "webkit/glue/webclipboard_impl.h" | 38 #include "webkit/glue/webclipboard_impl.h" |
40 #include "webkit/glue/webkit_glue.h" | 39 #include "webkit/glue/webkit_glue.h" |
41 #include "webkit/glue/webkitclient_impl.h" | 40 #include "webkit/glue/webkitclient_impl.h" |
42 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 41 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
43 #include "webkit/support/weburl_loader_mock_factory.h" | 42 #include "webkit/support/weburl_loader_mock_factory.h" |
44 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" | 43 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" |
45 #include "webkit/tools/test_shell/simple_appcache_system.h" | 44 #include "webkit/tools/test_shell/simple_appcache_system.h" |
46 #include "webkit/tools/test_shell/simple_database_system.h" | 45 #include "webkit/tools/test_shell/simple_database_system.h" |
47 #include "webkit/tools/test_shell/simple_file_system.h" | 46 #include "webkit/tools/test_shell/simple_file_system.h" |
(...skipping 18 matching lines...) Expand all Loading... |
66 : unit_test_mode_(unit_test_mode) { | 65 : unit_test_mode_(unit_test_mode) { |
67 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); | 66 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); |
68 | 67 |
69 WebKit::initialize(this); | 68 WebKit::initialize(this); |
70 WebKit::setLayoutTestMode(true); | 69 WebKit::setLayoutTestMode(true); |
71 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( | 70 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( |
72 WebKit::WebString::fromUTF8("test-shell-resource")); | 71 WebKit::WebString::fromUTF8("test-shell-resource")); |
73 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( | 72 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( |
74 WebKit::WebString::fromUTF8("test-shell-resource")); | 73 WebKit::WebString::fromUTF8("test-shell-resource")); |
75 WebScriptController::enableV8SingleThreadMode(); | 74 WebScriptController::enableV8SingleThreadMode(); |
76 WebScriptController::registerExtension( | |
77 extensions_v8::GearsExtension::Get()); | |
78 WebKit::WebRuntimeFeatures::enableSockets(true); | 75 WebKit::WebRuntimeFeatures::enableSockets(true); |
79 WebKit::WebRuntimeFeatures::enableApplicationCache(true); | 76 WebKit::WebRuntimeFeatures::enableApplicationCache(true); |
80 WebKit::WebRuntimeFeatures::enableDatabase(true); | 77 WebKit::WebRuntimeFeatures::enableDatabase(true); |
81 WebKit::WebRuntimeFeatures::enableWebGL(true); | 78 WebKit::WebRuntimeFeatures::enableWebGL(true); |
82 WebKit::WebRuntimeFeatures::enablePushState(true); | 79 WebKit::WebRuntimeFeatures::enablePushState(true); |
83 WebKit::WebRuntimeFeatures::enableNotifications(true); | 80 WebKit::WebRuntimeFeatures::enableNotifications(true); |
84 WebKit::WebRuntimeFeatures::enableTouch(true); | 81 WebKit::WebRuntimeFeatures::enableTouch(true); |
85 | 82 |
86 // Load libraries for media and enable the media player. | 83 // Load libraries for media and enable the media player. |
87 bool enable_media = false; | 84 bool enable_media = false; |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 } | 346 } |
350 #endif | 347 #endif |
351 | 348 |
352 WebKit::WebSharedWorkerRepository* TestWebKitClient::sharedWorkerRepository() { | 349 WebKit::WebSharedWorkerRepository* TestWebKitClient::sharedWorkerRepository() { |
353 return NULL; | 350 return NULL; |
354 } | 351 } |
355 | 352 |
356 WebKit::WebGraphicsContext3D* TestWebKitClient::createGraphicsContext3D() { | 353 WebKit::WebGraphicsContext3D* TestWebKitClient::createGraphicsContext3D() { |
357 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(); | 354 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(); |
358 } | 355 } |
OLD | NEW |