| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" | 56 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" |
| 57 #elif defined(OS_LINUX) | 57 #elif defined(OS_LINUX) |
| 58 #include "third_party/WebKit/WebKit/chromium/public/linux/WebThemeEngine.h" | 58 #include "third_party/WebKit/WebKit/chromium/public/linux/WebThemeEngine.h" |
| 59 #elif defined(OS_MACOSX) | 59 #elif defined(OS_MACOSX) |
| 60 #include "base/mac_util.h" | 60 #include "base/mac_util.h" |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 using WebKit::WebScriptController; | 63 using WebKit::WebScriptController; |
| 64 | 64 |
| 65 TestWebKitClient::TestWebKitClient(bool unit_test_mode) | 65 TestWebKitClient::TestWebKitClient(bool unit_test_mode) |
| 66 : unit_test_mode_(unit_test_mode) { | 66 : mime_registry_(true), unit_test_mode_(unit_test_mode) { |
| 67 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); | 67 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); |
| 68 | 68 |
| 69 WebKit::initialize(this); | 69 WebKit::initialize(this); |
| 70 WebKit::setLayoutTestMode(true); | 70 WebKit::setLayoutTestMode(true); |
| 71 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( | 71 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( |
| 72 WebKit::WebString::fromUTF8("test-shell-resource")); | 72 WebKit::WebString::fromUTF8("test-shell-resource")); |
| 73 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( | 73 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( |
| 74 WebKit::WebString::fromUTF8("test-shell-resource")); | 74 WebKit::WebString::fromUTF8("test-shell-resource")); |
| 75 WebScriptController::enableV8SingleThreadMode(); | 75 WebScriptController::enableV8SingleThreadMode(); |
| 76 WebScriptController::registerExtension( | 76 WebScriptController::registerExtension( |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 } | 289 } |
| 290 #endif | 290 #endif |
| 291 | 291 |
| 292 WebKit::WebSharedWorkerRepository* TestWebKitClient::sharedWorkerRepository() { | 292 WebKit::WebSharedWorkerRepository* TestWebKitClient::sharedWorkerRepository() { |
| 293 return NULL; | 293 return NULL; |
| 294 } | 294 } |
| 295 | 295 |
| 296 WebKit::WebGraphicsContext3D* TestWebKitClient::createGraphicsContext3D() { | 296 WebKit::WebGraphicsContext3D* TestWebKitClient::createGraphicsContext3D() { |
| 297 return WebKit::WebGraphicsContext3D::createDefault(); | 297 return WebKit::WebGraphicsContext3D::createDefault(); |
| 298 } | 298 } |
| OLD | NEW |