| 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/simple_database_system.h" | 42 #include "webkit/support/simple_database_system.h" |
| 44 #include "webkit/support/weburl_loader_mock_factory.h" | 43 #include "webkit/support/weburl_loader_mock_factory.h" |
| 45 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" | 44 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" |
| 46 #include "webkit/tools/test_shell/simple_appcache_system.h" | 45 #include "webkit/tools/test_shell/simple_appcache_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::enableDataTransferItems(true); | 78 WebKit::WebRuntimeFeatures::enableDataTransferItems(true); |
| 82 WebKit::WebRuntimeFeatures::enableWebGL(true); | 79 WebKit::WebRuntimeFeatures::enableWebGL(true); |
| 83 WebKit::WebRuntimeFeatures::enablePushState(true); | 80 WebKit::WebRuntimeFeatures::enablePushState(true); |
| 84 WebKit::WebRuntimeFeatures::enableNotifications(true); | 81 WebKit::WebRuntimeFeatures::enableNotifications(true); |
| 85 WebKit::WebRuntimeFeatures::enableTouch(true); | 82 WebKit::WebRuntimeFeatures::enableTouch(true); |
| 86 | 83 |
| 87 // Load libraries for media and enable the media player. | 84 // Load libraries for media and enable the media player. |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 347 } |
| 351 #endif | 348 #endif |
| 352 | 349 |
| 353 WebKit::WebSharedWorkerRepository* TestWebKitClient::sharedWorkerRepository() { | 350 WebKit::WebSharedWorkerRepository* TestWebKitClient::sharedWorkerRepository() { |
| 354 return NULL; | 351 return NULL; |
| 355 } | 352 } |
| 356 | 353 |
| 357 WebKit::WebGraphicsContext3D* TestWebKitClient::createGraphicsContext3D() { | 354 WebKit::WebGraphicsContext3D* TestWebKitClient::createGraphicsContext3D() { |
| 358 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(); | 355 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(); |
| 359 } | 356 } |
| OLD | NEW |