diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 21:37:19 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 21:37:19 +0000 |
commit | 72a7922929363288647ccce827a56a752be66c24 (patch) | |
tree | 334da92bd86e929c27377510d1c914f252e31e0d | |
parent | 72eda1ddddee92cd63efb4279fe4fe04729255c3 (diff) | |
download | chromium_src-72a7922929363288647ccce827a56a752be66c24.zip chromium_src-72a7922929363288647ccce827a56a752be66c24.tar.gz chromium_src-72a7922929363288647ccce827a56a752be66c24.tar.bz2 |
Remove code to load plugins on mac from Contents/PlugIns.
TestShell no longer needs this since we load from {Debug,Release}/plugins
now. Also remove the code to copy the plugin into
TestShell.app/Contents/PlugIns.
BUG=48471
Review URL: http://codereview.chromium.org/5274001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67157 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/plugin_list_mac.mm | 12 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.gypi | 17 | ||||
-rw-r--r-- | webkit/tools/test_shell/plugin_tests.cc | 18 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.gypi | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 6 |
5 files changed, 14 insertions, 46 deletions
diff --git a/webkit/glue/plugins/plugin_list_mac.mm b/webkit/glue/plugins/plugin_list_mac.mm index ee6c6ad..6e5019d 100644 --- a/webkit/glue/plugins/plugin_list_mac.mm +++ b/webkit/glue/plugins/plugin_list_mac.mm @@ -30,14 +30,6 @@ void GetPluginCommonDirectory(std::vector<FilePath>* plugin_dirs, plugin_dirs->push_back(FilePath(mac_util::PathFromFSRef(ref))); } -void GetPluginPrivateDirectory(std::vector<FilePath>* plugin_dirs) { - NSString* plugin_path = [[NSBundle mainBundle] builtInPlugInsPath]; - if (!plugin_path) - return; - - plugin_dirs->push_back(FilePath([plugin_path fileSystemRepresentation])); -} - // Returns true if the plugin should be prevented from loading. bool IsBlacklistedPlugin(const WebPluginInfo& info) { // We blacklist Gears by included MIME type, since that is more stable than @@ -68,10 +60,6 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { // Load from the machine-wide area GetPluginCommonDirectory(plugin_dirs, false); - - // Load any bundled plugins (deprecated) - // TODO(stuartmorgan): Remove this once it's not used in TestShell. - GetPluginPrivateDirectory(plugin_dirs); } void PluginList::LoadPluginsFromDir(const FilePath &path, diff --git a/webkit/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.gypi b/webkit/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.gypi index b64dcb1..0637de9 100644 --- a/webkit/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.gypi +++ b/webkit/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.gypi @@ -43,24 +43,7 @@ 'npapi_layout_test_plugin.def', 'npapi_layout_test_plugin.rc', ], - # TODO(bradnelson): - # This copy should really live here, as a post-build step, - # but it's currently being implemented via - # AdditionalDependencies, which tries to do the copy before - # the file is built... - # }, { # OS == "win" - # # The old VS build would explicitly copy the .dll into the - # # plugins subdirectory like this. It might be possible to - # # use the 'product_dir' setting to build directly into - # # plugins/ (as is done on Linux), but we'd need to verify - # # that nothing breaks first. - # 'copies': [ - # { - # 'destination': '<(PRODUCT_DIR)/plugins', - # 'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'], - # }, - # ], 'variables': { # This is not a relative pathname. Avoid pathname relativization # by sticking it in a variable that isn't recognized as one diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc index ffb84bd..73a3dda 100644 --- a/webkit/tools/test_shell/plugin_tests.cc +++ b/webkit/tools/test_shell/plugin_tests.cc @@ -30,11 +30,11 @@ using WebKit::WebString; #define TEST_PLUGIN_NAME "libnpapi_test_plugin.so" #endif -#if defined(OS_MACOSX) -#define TEST_PLUGIN_DIRECTORY "PlugIns" -#else -#define TEST_PLUGIN_DIRECTORY "plugins" -#endif +namespace { + +const char kPluginsDir[] = "plugins"; + +} // Ignore these until 64-bit plugin build is fixed. http://crbug.com/18337 #if !defined(ARCH_CPU_64_BITS) @@ -47,7 +47,7 @@ class PluginTest : public TestShellTest { plugin_src_ = executable_directory.AppendASCII(TEST_PLUGIN_NAME); CHECK(file_util::PathExists(plugin_src_)); - plugin_file_path_ = executable_directory.AppendASCII(TEST_PLUGIN_DIRECTORY); + plugin_file_path_ = executable_directory.AppendASCII(kPluginsDir); file_util::CreateDirectory(plugin_file_path_); plugin_file_path_ = plugin_file_path_.AppendASCII(TEST_PLUGIN_NAME); @@ -127,7 +127,7 @@ TEST_F(PluginTest, Refresh) { // don't crash. TEST_F(PluginTest, DeleteFrameDuringEvent) { FilePath test_html = data_dir_; - test_html = test_html.AppendASCII(TEST_PLUGIN_DIRECTORY); + test_html = test_html.AppendASCII(kPluginsDir); test_html = test_html.AppendASCII("delete_frame.html"); test_shell_->LoadFile(test_html); test_shell_->WaitTestFinished(); @@ -145,7 +145,7 @@ TEST_F(PluginTest, DeleteFrameDuringEvent) { // Tests that a forced reload of the plugin will not crash. TEST_F(PluginTest, ForceReload) { FilePath test_html = data_dir_; - test_html = test_html.AppendASCII(TEST_PLUGIN_DIRECTORY); + test_html = test_html.AppendASCII(kPluginsDir); test_html = test_html.AppendASCII("force_reload.html"); test_shell_->LoadFile(test_html); test_shell_->WaitTestFinished(); @@ -168,7 +168,7 @@ BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) { // Tests that hiding/showing the parent frame hides/shows the plugin. TEST_F(PluginTest, PluginVisibilty) { FilePath test_html = data_dir_; - test_html = test_html.AppendASCII(TEST_PLUGIN_DIRECTORY); + test_html = test_html.AppendASCII(kPluginsDir); test_html = test_html.AppendASCII("plugin_visibility.html"); test_shell_->LoadFile(test_html); test_shell_->WaitTestFinished(); diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi index 6bb3bbb..dca16c1 100644 --- a/webkit/tools/test_shell/test_shell.gypi +++ b/webkit/tools/test_shell/test_shell.gypi @@ -328,13 +328,6 @@ '<(PRODUCT_DIR)/libffmpegsumo.dylib', ], }, - { - # TODO(tony): We should have TestShell.app load plugins from - # <(PRODUCT_DIR)/plugins so we don't have this extra copy of - # the plugin. - 'destination': '<(PRODUCT_DIR)/TestShell.app/Contents/PlugIns/', - 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'], - }, ], }, { # OS != "mac" 'dependencies': [ diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index 635a963..8224af5 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -247,7 +247,11 @@ void TestShell::InitializeTestShell(bool layout_test_mode, // test plugins. FilePath plugins_dir; PathService::Get(base::DIR_EXE, &plugins_dir); - plugins_dir = plugins_dir.AppendASCII("../../../plugins"); + if (mac_util::AmIBundled()) { + plugins_dir = plugins_dir.AppendASCII("../../../plugins"); + } else { + plugins_dir = plugins_dir.AppendASCII("plugins"); + } NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir); } |