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

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 7811006: Add full support for filesystem URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better content_settings_pattern.cc changes. Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/test_shell.cc
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index f5142542f0ede7e45e55af447318fa40ac978ef0..f59d17eb3abaa82f12dbb4c07f6504532aa4b962 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -624,3 +624,41 @@ WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
}
return geolocation_client_mock_.get();
}
+
+//-----------------------------------------------------------------------------
+
+namespace webkit_glue {
+
+bool IsProtocolSupportedForMedia(const GURL& url) {
+ if (url.SchemeIsFile() ||
+ url.SchemeIs("http") ||
+ url.SchemeIs("https") ||
+ url.SchemeIs("data") ||
+ url.SchemeIsFileSystem())
+ return true;
+ return false;
+}
+
+void GetPlugins(bool refresh,
+ std::vector<webkit::WebPluginInfo>* plugins) {
+ if (refresh)
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
+ // Don't load the forked TestNetscapePlugIn in the chromium code, use
+ // the copy in webkit.org's repository instead.
+ const FilePath::StringType kPluginBlackList[] = {
+ FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
+ FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
+ FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
+ };
+ for (int i = plugins->size() - 1; i >= 0; --i) {
+ webkit::WebPluginInfo plugin_info = plugins->at(i);
+ for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
+ if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
+ plugins->erase(plugins->begin() + i);
+ }
+ }
+ }
+}
+
+} // namespace webkit_glue
« chrome/common/content_settings_pattern.cc ('K') | « webkit/support/webkit_support_glue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698