diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-23 00:02:32 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-23 00:02:32 +0000 |
commit | 4a3d9a624ccf9fc50d3d174fd8567d700f04d6f5 (patch) | |
tree | 2709c7dbcbc6168437285e464afe253a2b8bf2b0 /webkit/tools/test_shell/gtk | |
parent | af179bd0db5605771c370fd0c2b4886b8b2c283c (diff) | |
download | chromium_src-4a3d9a624ccf9fc50d3d174fd8567d700f04d6f5.zip chromium_src-4a3d9a624ccf9fc50d3d174fd8567d700f04d6f5.tar.gz chromium_src-4a3d9a624ccf9fc50d3d174fd8567d700f04d6f5.tar.bz2 |
Cut'n'paste enough of the real test shell to fix some more errors.
Note that style errors are due to upstream, not me.
Review URL: http://codereview.chromium.org/7903
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/gtk')
-rw-r--r-- | webkit/tools/test_shell/gtk/test_shell.cc | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/gtk/test_shell.cc b/webkit/tools/test_shell/gtk/test_shell.cc index 57fe689..39dc120 100644 --- a/webkit/tools/test_shell/gtk/test_shell.cc +++ b/webkit/tools/test_shell/gtk/test_shell.cc @@ -9,7 +9,9 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/string_util.h" +#include "net/base/mime_util.h" #include "webkit/glue/webpreferences.h" +#include "webkit/glue/plugins/plugin_list.h" #include "webkit/tools/test_shell/test_navigation_controller.h" WebPreferences* TestShell::web_prefs_ = NULL; @@ -102,3 +104,89 @@ bool TestShell::Navigate(const TestNavigationEntry& entry, bool reload) { NOTIMPLEMENTED(); return true; } + +//----------------------------------------------------------------------------- + +namespace webkit_glue { + +void PrefetchDns(const std::string& hostname) {} + +void PrecacheUrl(const char16* url, int url_length) {} + +void AppendToLog(const char* file, int line, const char* msg) { + logging::LogMessage(file, line).stream() << msg; +} + +bool GetMimeTypeFromExtension(const std::wstring &ext, std::string *mime_type) { + return net::GetMimeTypeFromExtension(ext, mime_type); +} + +bool GetMimeTypeFromFile(const std::wstring &file_path, + std::string *mime_type) { + return net::GetMimeTypeFromFile(file_path, mime_type); +} + +bool GetPreferredExtensionForMimeType(const std::string& mime_type, + std::wstring* ext) { + return net::GetPreferredExtensionForMimeType(mime_type, ext); +} + +std::wstring GetLocalizedString(int message_id) { + NOTREACHED(); + return L"No string for this identifier!"; +} + +std::string GetDataResource(int resource_id) { + NOTREACHED(); + return std::string(); +} + +SkBitmap* GetBitmapResource(int resource_id) { + return NULL; +} + +bool GetApplicationDirectory(std::wstring *path) { + return PathService::Get(base::DIR_EXE, path); +} + +GURL GetInspectorURL() { + return GURL("test-shell-resource://inspector/inspector.html"); +} + +std::string GetUIResourceProtocol() { + return "test-shell-resource"; +} + +bool GetExeDirectory(std::wstring *path) { + return PathService::Get(base::DIR_EXE, path); +} + +bool SpellCheckWord(const wchar_t* word, int word_len, + int* misspelling_start, int* misspelling_len) { + // Report all words being correctly spelled. + *misspelling_start = 0; + *misspelling_len = 0; + return true; +} + +bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { + return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); +} + +bool IsPluginRunningInRendererProcess() { + return true; +} + +bool GetPluginFinderURL(std::string* plugin_finder_url) { + return false; +} + +bool IsDefaultPluginEnabled() { + return false; +} + +std::wstring GetWebKitLocale() { + return L"en-US"; +} + +} // namespace webkit_glue |