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/tools/test_shell/test_shell_webkit_init.h" | 5 #include "webkit/tools/test_shell/test_shell_webkit_init.h" |
6 | 6 |
7 #include "base/metrics/stats_counters.h" | 7 #include "base/metrics/stats_counters.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "media/base/media.h" | 9 #include "media/base/media.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 WebKit::WebRuntimeFeatures::enableNotifications(true); | 40 WebKit::WebRuntimeFeatures::enableNotifications(true); |
41 WebKit::WebRuntimeFeatures::enableTouch(true); | 41 WebKit::WebRuntimeFeatures::enableTouch(true); |
42 WebKit::WebRuntimeFeatures::enableIndexedDatabase(true); | 42 WebKit::WebRuntimeFeatures::enableIndexedDatabase(true); |
43 WebKit::WebRuntimeFeatures::enableSpeechInput(true); | 43 WebKit::WebRuntimeFeatures::enableSpeechInput(true); |
44 WebKit::WebRuntimeFeatures::enableFileSystem(true); | 44 WebKit::WebRuntimeFeatures::enableFileSystem(true); |
45 | 45 |
46 // TODO(hwennborg): Enable this once the implementation supports it. | 46 // TODO(hwennborg): Enable this once the implementation supports it. |
47 WebKit::WebRuntimeFeatures::enableDeviceMotion(false); | 47 WebKit::WebRuntimeFeatures::enableDeviceMotion(false); |
48 WebKit::WebRuntimeFeatures::enableDeviceOrientation(true); | 48 WebKit::WebRuntimeFeatures::enableDeviceOrientation(true); |
49 | 49 |
| 50 // Enable experimental I18N API for testing. |
| 51 WebKit::WebRuntimeFeatures::enableExperimentalI18NAPI(true); |
| 52 |
50 // Load libraries for media and enable the media player. | 53 // Load libraries for media and enable the media player. |
51 FilePath module_path; | 54 FilePath module_path; |
52 WebKit::WebRuntimeFeatures::enableMediaPlayer( | 55 WebKit::WebRuntimeFeatures::enableMediaPlayer( |
53 PathService::Get(base::DIR_MODULE, &module_path) && | 56 PathService::Get(base::DIR_MODULE, &module_path) && |
54 media::InitializeMediaLibrary(module_path)); | 57 media::InitializeMediaLibrary(module_path)); |
55 | 58 |
56 WebKit::WebRuntimeFeatures::enableGeolocation(true); | 59 WebKit::WebRuntimeFeatures::enableGeolocation(true); |
57 | 60 |
58 // Construct and initialize an appcache system for this scope. | 61 // Construct and initialize an appcache system for this scope. |
59 // A new empty temp directory is created to house any cached | 62 // A new empty temp directory is created to house any cached |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 WebKit::WebLocalizedString::Name name, | 166 WebKit::WebLocalizedString::Name name, |
164 const WebKit::WebString& value1, | 167 const WebKit::WebString& value1, |
165 const WebKit::WebString& value2) { | 168 const WebKit::WebString& value2) { |
166 if (name == WebKit::WebLocalizedString::ValidationTooLong) | 169 if (name == WebKit::WebLocalizedString::ValidationTooLong) |
167 return ASCIIToUTF16("too long"); | 170 return ASCIIToUTF16("too long"); |
168 if (name == WebKit::WebLocalizedString::ValidationStepMismatch) | 171 if (name == WebKit::WebLocalizedString::ValidationStepMismatch) |
169 return ASCIIToUTF16("step mismatch"); | 172 return ASCIIToUTF16("step mismatch"); |
170 return WebKitClientImpl::queryLocalizedString(name, value1, value2); | 173 return WebKitClientImpl::queryLocalizedString(name, value1, value2); |
171 } | 174 } |
172 | 175 |
OLD | NEW |