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/test_webkit_platform_support.h" | 5 #include "webkit/support/test_webkit_platform_support.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 case WebKit::WebLocalizedString::OtherWeekLabel: | 214 case WebKit::WebLocalizedString::OtherWeekLabel: |
215 return ASCIIToUTF16("<<OtherWeekLabel>>"); | 215 return ASCIIToUTF16("<<OtherWeekLabel>>"); |
216 case WebKit::WebLocalizedString::CalendarClear: | 216 case WebKit::WebLocalizedString::CalendarClear: |
217 return ASCIIToUTF16("<<CalendarClear>>"); | 217 return ASCIIToUTF16("<<CalendarClear>>"); |
218 case WebKit::WebLocalizedString::CalendarToday: | 218 case WebKit::WebLocalizedString::CalendarToday: |
219 return ASCIIToUTF16("<<CalendarToday>>"); | 219 return ASCIIToUTF16("<<CalendarToday>>"); |
220 case WebKit::WebLocalizedString::ThisMonthButtonLabel: | 220 case WebKit::WebLocalizedString::ThisMonthButtonLabel: |
221 return ASCIIToUTF16("<<ThisMonthLabel>>"); | 221 return ASCIIToUTF16("<<ThisMonthLabel>>"); |
222 case WebKit::WebLocalizedString::ThisWeekButtonLabel: | 222 case WebKit::WebLocalizedString::ThisWeekButtonLabel: |
223 return ASCIIToUTF16("<<ThisWeekLabel>>"); | 223 return ASCIIToUTF16("<<ThisWeekLabel>>"); |
| 224 case WebKit::WebLocalizedString::WeekFormatTemplate: |
| 225 return ASCIIToUTF16("Week $2, $1"); |
224 default: | 226 default: |
225 return WebKitPlatformSupportImpl::queryLocalizedString(name); | 227 return WebKitPlatformSupportImpl::queryLocalizedString(name); |
226 } | 228 } |
227 } | 229 } |
228 | 230 |
229 WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( | 231 WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( |
230 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value) { | 232 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value) { |
231 if (name == WebKit::WebLocalizedString::ValidationRangeUnderflow) | 233 if (name == WebKit::WebLocalizedString::ValidationRangeUnderflow) |
232 return ASCIIToUTF16("range underflow"); | 234 return ASCIIToUTF16("range underflow"); |
233 if (name == WebKit::WebLocalizedString::ValidationRangeOverflow) | 235 if (name == WebKit::WebLocalizedString::ValidationRangeOverflow) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 330 |
329 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { | 331 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { |
330 data = gamepad_data_; | 332 data = gamepad_data_; |
331 } | 333 } |
332 | 334 |
333 void TestWebKitPlatformSupport::setGamepadData( | 335 void TestWebKitPlatformSupport::setGamepadData( |
334 const WebKit::WebGamepads& data) { | 336 const WebKit::WebGamepads& data) { |
335 gamepad_data_ = data; | 337 gamepad_data_ = data; |
336 } | 338 } |
337 | 339 |
| 340 base::string16 TestWebKitPlatformSupport::GetLocalizedString(int message_id) { |
| 341 return base::string16(); |
| 342 } |
| 343 |
| 344 base::StringPiece TestWebKitPlatformSupport::GetDataResource( |
| 345 int resource_id, |
| 346 ui::ScaleFactor scale_factor) { |
| 347 return base::StringPiece(); |
| 348 } |
| 349 |
338 webkit_glue::ResourceLoaderBridge* | 350 webkit_glue::ResourceLoaderBridge* |
339 TestWebKitPlatformSupport::CreateResourceLoader( | 351 TestWebKitPlatformSupport::CreateResourceLoader( |
340 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 352 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
341 NOTREACHED(); | 353 NOTREACHED(); |
342 return NULL; | 354 return NULL; |
343 } | 355 } |
344 | 356 |
345 webkit_glue::WebSocketStreamHandleBridge* | 357 webkit_glue::WebSocketStreamHandleBridge* |
346 TestWebKitPlatformSupport::CreateWebSocketBridge( | 358 TestWebKitPlatformSupport::CreateWebSocketBridge( |
347 WebKit::WebSocketStreamHandle* handle, | 359 WebKit::WebSocketStreamHandle* handle, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 return view.release(); | 438 return view.release(); |
427 } | 439 } |
428 | 440 |
429 WebKit::WebLayerTreeView* | 441 WebKit::WebLayerTreeView* |
430 TestWebKitPlatformSupport::createLayerTreeViewForTesting( | 442 TestWebKitPlatformSupport::createLayerTreeViewForTesting( |
431 TestViewType type) { | 443 TestViewType type) { |
432 DCHECK_EQ(TestViewTypeUnitTest, type); | 444 DCHECK_EQ(TestViewTypeUnitTest, type); |
433 return createLayerTreeViewForTesting(); | 445 return createLayerTreeViewForTesting(); |
434 } | 446 } |
435 | 447 |
OLD | NEW |