OLD | NEW |
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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "googleurl/src/url_util.h" | 29 #include "googleurl/src/url_util.h" |
30 #include "grit/webkit_chromium_resources.h" | 30 #include "grit/webkit_chromium_resources.h" |
31 #include "net/base/escape.h" | 31 #include "net/base/escape.h" |
32 #include "net/base/net_errors.h" | 32 #include "net/base/net_errors.h" |
33 #include "net/base/net_util.h" | 33 #include "net/base/net_util.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
35 #include "third_party/WebKit/public/web/WebCache.h" | 35 #include "third_party/WebKit/public/web/WebCache.h" |
36 #include "third_party/WebKit/public/web/WebFileSystemCallbacks.h" | 36 #include "third_party/WebKit/public/web/WebFileSystemCallbacks.h" |
37 #include "third_party/WebKit/public/web/WebKit.h" | 37 #include "third_party/WebKit/public/web/WebKit.h" |
38 #include "third_party/WebKit/public/web/WebPluginParams.h" | 38 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 39 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
39 #include "third_party/WebKit/public/web/WebView.h" | 40 #include "third_party/WebKit/public/web/WebView.h" |
40 #include "third_party/WebKit/public/platform/WebStorageNamespace.h" | 41 #include "third_party/WebKit/public/platform/WebStorageNamespace.h" |
41 #include "third_party/WebKit/public/platform/WebURLError.h" | 42 #include "third_party/WebKit/public/platform/WebURLError.h" |
42 #if defined(TOOLKIT_GTK) | 43 #if defined(TOOLKIT_GTK) |
43 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" | 44 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" |
44 #endif | 45 #endif |
45 #include "ui/gl/gl_context.h" | 46 #include "ui/gl/gl_context.h" |
46 #include "ui/gl/gl_implementation.h" | 47 #include "ui/gl/gl_implementation.h" |
47 #include "ui/gl/gl_surface.h" | 48 #include "ui/gl/gl_surface.h" |
48 #include "webkit/browser/fileapi/isolated_context.h" | 49 #include "webkit/browser/fileapi/isolated_context.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // Initialize the singleton CommandLine with fixed values. Some code refer to | 262 // Initialize the singleton CommandLine with fixed values. Some code refer to |
262 // CommandLine::ForCurrentProcess(). We don't use the actual command-line | 263 // CommandLine::ForCurrentProcess(). We don't use the actual command-line |
263 // arguments of DRT to avoid unexpected behavior change. | 264 // arguments of DRT to avoid unexpected behavior change. |
264 // | 265 // |
265 // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading. | 266 // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading. |
266 // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp. | 267 // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp. |
267 // If DRT needs these flags, specify them in the following kFixedArguments. | 268 // If DRT needs these flags, specify them in the following kFixedArguments. |
268 const char* kFixedArguments[] = {"DumpRenderTree"}; | 269 const char* kFixedArguments[] = {"DumpRenderTree"}; |
269 CommandLine::Init(arraysize(kFixedArguments), kFixedArguments); | 270 CommandLine::Init(arraysize(kFixedArguments), kFixedArguments); |
270 | 271 |
| 272 WebKit::WebRuntimeFeatures::enableStableFeatures(true); |
| 273 WebKit::WebRuntimeFeatures::enableExperimentalFeatures(true); |
| 274 WebKit::WebRuntimeFeatures::enableTestOnlyFeatures(true); |
| 275 |
271 // Explicitly initialize the GURL library before spawning any threads. | 276 // Explicitly initialize the GURL library before spawning any threads. |
272 // Otherwise crash may happend when different threads try to create a GURL | 277 // Otherwise crash may happend when different threads try to create a GURL |
273 // at same time. | 278 // at same time. |
274 url_util::Initialize(); | 279 url_util::Initialize(); |
275 webkit_support::BeforeInitialize(); | 280 webkit_support::BeforeInitialize(); |
276 test_environment = new TestEnvironment; | 281 test_environment = new TestEnvironment; |
277 webkit_support::AfterInitialize(); | 282 webkit_support::AfterInitialize(); |
278 webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct( | 283 webkit_glue::SetUserAgent(webkit_glue::BuildUserAgentFromProduct( |
279 "DumpRenderTree/0.0.0.0"), false); | 284 "DumpRenderTree/0.0.0.0"), false); |
280 } | 285 } |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 // Logging | 689 // Logging |
685 void EnableWebCoreLogChannels(const std::string& channels) { | 690 void EnableWebCoreLogChannels(const std::string& channels) { |
686 webkit_glue::EnableWebCoreLogChannels(channels); | 691 webkit_glue::EnableWebCoreLogChannels(channels); |
687 } | 692 } |
688 | 693 |
689 void SetGamepadData(const WebKit::WebGamepads& pads) { | 694 void SetGamepadData(const WebKit::WebGamepads& pads) { |
690 test_environment->webkit_platform_support()->setGamepadData(pads); | 695 test_environment->webkit_platform_support()->setGamepadData(pads); |
691 } | 696 } |
692 | 697 |
693 } // namespace webkit_support | 698 } // namespace webkit_support |
OLD | NEW |