diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 21:21:57 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 21:21:57 +0000 |
commit | 5b58f4c9e8ac20e74455f43a0a12796a777e1635 (patch) | |
tree | da1164930bc3714aa8ef866e9632759b2db30ba4 /webkit | |
parent | 8ecce348742249122fbaf4a21870c849e4876d04 (diff) | |
download | chromium_src-5b58f4c9e8ac20e74455f43a0a12796a777e1635.zip chromium_src-5b58f4c9e8ac20e74455f43a0a12796a777e1635.tar.gz chromium_src-5b58f4c9e8ac20e74455f43a0a12796a777e1635.tar.bz2 |
Fix plugin blacklisting in Mac TestShell and DRT.
1) Blacklist the old plugin (TestNetscapePlugIn) in DRT. I didn't think it got copied into {Debug,Release}/plugins, but it does.
2) Enable loading plugins from {Debug,Release}/plugins in TestShell. This causes us to load the new plugin (WebKitTestNetscapePlugIn). We have code to blacklist the new plugin, but it was wrong.
BUG=48471
Review URL: http://codereview.chromium.org/5252001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/support/webkit_support_glue.cc | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 16 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 11 |
3 files changed, 9 insertions, 26 deletions
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc index 739289f..2308a40 100644 --- a/webkit/support/webkit_support_glue.cc +++ b/webkit/support/webkit_support_glue.cc @@ -15,12 +15,12 @@ namespace webkit_glue { void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); - // Don't load the forked npapi_layout_test_plugin in DRT, we only - // want to use the upstream version TestNetscapePlugIn. We don't need to - // blacklist on Mac because DRT Mac already uses the upstream version of - // TestNetscapePlugIn. + // Don't load the forked npapi_layout_test_plugin in DRT, we only want to + // use the upstream version TestNetscapePlugIn (on Mac, the upstream version + // is named WebKitTestNetscapePlugIn). const FilePath::StringType kPluginBlackList[] = { FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), + FILE_PATH_LITERAL("TestNetscapePlugIn.plugin"), FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), }; for (int i = plugins->size() - 1; i >= 0; --i) { diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 713b454..41f88c2 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -886,29 +886,15 @@ void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { // Don't load the upstream TestNetscapePlugIn, we're not ready for it yet. const FilePath::StringType kPluginBlackList[] = { FILE_PATH_LITERAL("npTestNetscapePlugIn.dll"), - FILE_PATH_LITERAL("TestNetscapePlugIn"), + FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), FILE_PATH_LITERAL("libTestNetscapePlugIn.so"), }; for (int i = plugins->size() - 1; i >= 0; --i) { WebPluginInfo plugin_info = plugins->at(i); for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { -#if !defined(OS_MACOSX) NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); plugins->erase(plugins->begin() + i); -#else - // On OSX, the upstream plugin and the copy in - // webkit/tools/npapi_layout_test_plugin both have the same name. The - // upsteram copy is in {Debug,Release}/plugins and the - // webkit/tools/npapi_layout_test_plugin copy is in - // TestShell.app/Contents/PlugIns. We ignore the copy in - // {Debug,Release}/plugins. - std::string plugin_path = plugin_info.path.value(); - if (plugin_path.find("TestShell.app") == std::string::npos) { - NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); - plugins->erase(plugins->begin() + i); - } -#endif } } } diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index 88021e9..635a963 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -243,15 +243,12 @@ void TestShell::InitializeTestShell(bool layout_test_mode, } } - // TODO(tony): We're not ready for this yet. If we include this plugin - // path, we end up loading both copies of TestNetscapePlugin. Once we - // deprecate the old plugin, we can add this path. // Add <app bundle's parent dir>/plugins to the plugin path so we can load // test plugins. - //FilePath plugins_dir; - //PathService::Get(base::DIR_EXE, &plugins_dir); - //plugins_dir = plugins_dir.AppendASCII("../../../plugins"); - //NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir); + FilePath plugins_dir; + PathService::Get(base::DIR_EXE, &plugins_dir); + plugins_dir = plugins_dir.AppendASCII("../../../plugins"); + NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir); } NSButton* MakeTestButton(NSRect* rect, NSString* title, NSView* parent) { |