Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: webkit/support/test_webkit_platform_support.cc

Issue 17029016: Remove DRT-specific resource loading logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/support/platform_support_win.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 return ASCIIToUTF16("<<OtherWeekLabel>>"); 289 return ASCIIToUTF16("<<OtherWeekLabel>>");
290 case WebKit::WebLocalizedString::CalendarClear: 290 case WebKit::WebLocalizedString::CalendarClear:
291 return ASCIIToUTF16("<<CalendarClear>>"); 291 return ASCIIToUTF16("<<CalendarClear>>");
292 case WebKit::WebLocalizedString::CalendarToday: 292 case WebKit::WebLocalizedString::CalendarToday:
293 return ASCIIToUTF16("<<CalendarToday>>"); 293 return ASCIIToUTF16("<<CalendarToday>>");
294 case WebKit::WebLocalizedString::ThisMonthButtonLabel: 294 case WebKit::WebLocalizedString::ThisMonthButtonLabel:
295 return ASCIIToUTF16("<<ThisMonthLabel>>"); 295 return ASCIIToUTF16("<<ThisMonthLabel>>");
296 case WebKit::WebLocalizedString::ThisWeekButtonLabel: 296 case WebKit::WebLocalizedString::ThisWeekButtonLabel:
297 return ASCIIToUTF16("<<ThisWeekLabel>>"); 297 return ASCIIToUTF16("<<ThisWeekLabel>>");
298 default: 298 default:
299 return WebKitPlatformSupportImpl::queryLocalizedString(name); 299 return WebKit::WebString();
300 } 300 }
301 } 301 }
302 302
303 WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( 303 WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString(
304 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value) { 304 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value) {
305 if (name == WebKit::WebLocalizedString::ValidationRangeUnderflow) 305 if (name == WebKit::WebLocalizedString::ValidationRangeUnderflow)
306 return ASCIIToUTF16("range underflow"); 306 return ASCIIToUTF16("range underflow");
307 if (name == WebKit::WebLocalizedString::ValidationRangeOverflow) 307 if (name == WebKit::WebLocalizedString::ValidationRangeOverflow)
308 return ASCIIToUTF16("range overflow"); 308 return ASCIIToUTF16("range overflow");
309 return WebKitPlatformSupportImpl::queryLocalizedString(name, value); 309 return WebKit::WebString();
310 } 310 }
311 311
312 WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( 312 WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString(
313 WebKit::WebLocalizedString::Name name, 313 WebKit::WebLocalizedString::Name name,
314 const WebKit::WebString& value1, 314 const WebKit::WebString& value1,
315 const WebKit::WebString& value2) { 315 const WebKit::WebString& value2) {
316 if (name == WebKit::WebLocalizedString::ValidationTooLong) 316 if (name == WebKit::WebLocalizedString::ValidationTooLong)
317 return ASCIIToUTF16("too long"); 317 return ASCIIToUTF16("too long");
318 if (name == WebKit::WebLocalizedString::ValidationStepMismatch) 318 if (name == WebKit::WebLocalizedString::ValidationStepMismatch)
319 return ASCIIToUTF16("step mismatch"); 319 return ASCIIToUTF16("step mismatch");
320 return WebKitPlatformSupportImpl::queryLocalizedString(name, value1, value2); 320 return WebKit::WebString();
321 } 321 }
322 322
323 WebKit::WebString TestWebKitPlatformSupport::defaultLocale() { 323 WebKit::WebString TestWebKitPlatformSupport::defaultLocale() {
324 return ASCIIToUTF16("en-US"); 324 return ASCIIToUTF16("en-US");
325 } 325 }
326 326
327 WebKit::WebStorageNamespace* 327 WebKit::WebStorageNamespace*
328 TestWebKitPlatformSupport::createLocalStorageNamespace( 328 TestWebKitPlatformSupport::createLocalStorageNamespace(
329 const WebKit::WebString& path, unsigned quota) { 329 const WebKit::WebString& path, unsigned quota) {
330 return dom_storage_system_.CreateLocalStorageNamespace(); 330 return dom_storage_system_.CreateLocalStorageNamespace();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { 409 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) {
410 data = gamepad_data_; 410 data = gamepad_data_;
411 } 411 }
412 412
413 void TestWebKitPlatformSupport::setGamepadData( 413 void TestWebKitPlatformSupport::setGamepadData(
414 const WebKit::WebGamepads& data) { 414 const WebKit::WebGamepads& data) {
415 gamepad_data_ = data; 415 gamepad_data_ = data;
416 } 416 }
417 417
418 base::string16 TestWebKitPlatformSupport::GetLocalizedString(int message_id) {
419 NOTREACHED();
420 return base::string16();
421 }
422 base::StringPiece TestWebKitPlatformSupport::GetDataResource(
423 int resource_id,
424 ui::ScaleFactor scale_factor) {
425 NOTREACHED();
426 return base::StringPiece();
427 }
428
418 void TestWebKitPlatformSupport::GetPlugins( 429 void TestWebKitPlatformSupport::GetPlugins(
419 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { 430 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
420 if (refresh) 431 if (refresh)
421 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 432 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
422 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); 433 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
423 } 434 }
424 435
425 webkit_glue::ResourceLoaderBridge* 436 webkit_glue::ResourceLoaderBridge*
426 TestWebKitPlatformSupport::CreateResourceLoader( 437 TestWebKitPlatformSupport::CreateResourceLoader(
427 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 438 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 return view.release(); 516 return view.release();
506 } 517 }
507 518
508 WebKit::WebLayerTreeView* 519 WebKit::WebLayerTreeView*
509 TestWebKitPlatformSupport::createLayerTreeViewForTesting( 520 TestWebKitPlatformSupport::createLayerTreeViewForTesting(
510 TestViewType type) { 521 TestViewType type) {
511 DCHECK_EQ(TestViewTypeUnitTest, type); 522 DCHECK_EQ(TestViewTypeUnitTest, type);
512 return createLayerTreeViewForTesting(); 523 return createLayerTreeViewForTesting();
513 } 524 }
514 525
OLDNEW
« no previous file with comments | « webkit/support/platform_support_win.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698