diff options
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 15 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 11 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_webkit_init.h | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 11 |
4 files changed, 26 insertions, 19 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index a58d72f..c99d070 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -23,10 +23,9 @@ #include "net/base/mime_util.h" #include "net/base/net_util.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/base/gtk/gtk_compat.h" -#include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" #include "webkit/glue/resource_loader_bridge.h" #include "webkit/glue/webkit_glue.h" @@ -560,8 +559,7 @@ void TestShell::ShowStartupDebuggingDialog() { // static base::StringPiece TestShell::ResourceProvider(int key) { - return ResourceBundle::GetSharedInstance().GetRawDataResource( - key, ui::SCALE_FACTOR_NONE); + return ResourceBundle::GetSharedInstance().GetRawDataResource(key); } //----------------------------------------------------------------------------- @@ -570,9 +568,12 @@ string16 TestShellWebKitInit::GetLocalizedString(int message_id) { return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id); } -base::StringPiece TestShellWebKitInit::GetDataResource( - int resource_id, - ui::ScaleFactor scale_factor) { +base::StringPiece TestShellWebKitInit::GetDataResource(int resource_id) { + return TestShell::ResourceProvider(resource_id); +} + +base::StringPiece TestShellWebKitInit::GetImageResource(int resource_id, + float scale_factor) { switch (resource_id) { case IDR_BROKENIMAGE: resource_id = IDR_BROKENIMAGE_TESTSHELL; diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index d9b6ac2..9c38d44 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -212,7 +212,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode, // mmap the data pack which holds strings used by WebCore. This is only // a fatal error if we're bundled, which means we might be running layout // tests. This is a harmless failure for test_shell_tests. - g_resource_data_pack = new ui::DataPack(ui::SCALE_FACTOR_100P); + g_resource_data_pack = new ui::DataPack(ui::ResourceHandle::kScaleFactor100x); NSString *resource_path = [base::mac::FrameworkBundle() pathForResource:@"test_shell" ofType:@"pak"]; @@ -630,9 +630,12 @@ string16 TestShellWebKitInit::GetLocalizedString(int message_id) { return msg; } -base::StringPiece TestShellWebKitInit::GetDataResource( - int resource_id, - ui::ScaleFactor scale_factor) { +base::StringPiece TestShellWebKitInit::GetDataResource(int resource_id) { + return base::StringPiece(); +} + +base::StringPiece TestShellWebKitInit::GetImageResource(int resource_id, + float scale_factor) { switch (resource_id) { case IDR_BROKENIMAGE: { // Use webkit's broken image icon (16x16) diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h index 7f0eb93..09f696d 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.h +++ b/webkit/tools/test_shell/test_shell_webkit_init.h @@ -10,8 +10,8 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerializedScriptValue.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" #include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webfileutilities_impl.h" #include "webkit/glue/webkit_glue.h" @@ -105,9 +105,9 @@ class TestShellWebKitInit : public webkit_glue::WebKitPlatformSupportImpl { const WebKit::WebGraphicsContext3D::Attributes& attributes); virtual string16 GetLocalizedString(int message_id) OVERRIDE; - virtual base::StringPiece GetDataResource( - int resource_id, - ui::ScaleFactor scale_factor) OVERRIDE; + virtual base::StringPiece GetDataResource(int resource_id) OVERRIDE; + virtual base::StringPiece GetImageResource(int resource_id, + float scale_factor) OVERRIDE; virtual void GetPlugins(bool refresh, std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc index 70e1e05..e56530b 100644 --- a/webkit/tools/test_shell/test_shell_win.cc +++ b/webkit/tools/test_shell/test_shell_win.cc @@ -21,8 +21,8 @@ #include "base/utf_string_conversions.h" #include "base/win/resource_util.h" #include "breakpad/src/client/windows/handler/exception_handler.h" -#include "grit/webkit_chromium_resources.h" #include "grit/webkit_resources.h" +#include "grit/webkit_chromium_resources.h" #include "net/base/net_module.h" #include "net/url_request/url_request_file_job.h" #include "skia/ext/bitmap_platform_device.h" @@ -669,10 +669,13 @@ string16 TestShellWebKitInit::GetLocalizedString(int message_id) { return string16(localized, length); } +base::StringPiece TestShellWebKitInit::GetDataResource(int resource_id) { + return base::StringPiece(); +} + // TODO(tc): Convert this to using resources from test_shell.rc. -base::StringPiece TestShellWebKitInit::GetDataResource( - int resource_id, - ui::ScaleFactor scale_factor) { +base::StringPiece TestShellWebKitInit::GetImageResource(int resource_id, + float scale_factor) { switch (resource_id) { case IDR_BROKENIMAGE: { // Use webkit's broken image icon (16x16) |