diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 00:53:00 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 00:53:00 +0000 |
commit | 8aedc4467d45c234ff5d201f1bc41fd18d8cb7c7 (patch) | |
tree | 3c04f2c659bfd5a1f30ab0b858447ad228b8271e | |
parent | 1f37fa24f0acdfb69431e21e181704ca37d190ac (diff) | |
download | chromium_src-8aedc4467d45c234ff5d201f1bc41fd18d8cb7c7.zip chromium_src-8aedc4467d45c234ff5d201f1bc41fd18d8cb7c7.tar.gz chromium_src-8aedc4467d45c234ff5d201f1bc41fd18d8cb7c7.tar.bz2 |
Do the SCons hackery necessary to get the test plugin in the right directory.
Review URL: http://codereview.chromium.org/18696
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8530 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/plugin_list_linux.cc | 11 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/SConscript | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/SConscript | 10 |
3 files changed, 21 insertions, 8 deletions
diff --git a/webkit/glue/plugins/plugin_list_linux.cc b/webkit/glue/plugins/plugin_list_linux.cc index 01b6457..3653a0c 100644 --- a/webkit/glue/plugins/plugin_list_linux.cc +++ b/webkit/glue/plugins/plugin_list_linux.cc @@ -8,6 +8,7 @@ #include "base/file_util.h" #include "base/logging.h" +#include "base/path_service.h" namespace NPAPI { @@ -15,13 +16,18 @@ void PluginList::PlatformInit() { } void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { - NOTIMPLEMENTED(); + // For now, just look in the plugins/ under the exe directory. + // TODO(port): this is not correct. Rather than getting halfway there, + // this is a one-off and its replacement should follow Firefox exactly. + FilePath dir; + PathService::Get(base::DIR_EXE, &dir); + plugin_dirs->push_back(dir.Append("plugins")); } void PluginList::LoadPluginsFromDir(const FilePath& path) { file_util::FileEnumerator enumerator(path, false, // not recursive - file_util::FileEnumerator::DIRECTORIES); + file_util::FileEnumerator::FILES); for (FilePath path = enumerator.Next(); !path.value().empty(); path = enumerator.Next()) { LoadPlugin(path); @@ -35,7 +41,6 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { void PluginList::LoadInternalPlugins() { // none for now - NOTIMPLEMENTED(); } } // namespace NPAPI diff --git a/webkit/tools/npapi_layout_test_plugin/SConscript b/webkit/tools/npapi_layout_test_plugin/SConscript index 877b1f0..2f6c4ac 100644 --- a/webkit/tools/npapi_layout_test_plugin/SConscript +++ b/webkit/tools/npapi_layout_test_plugin/SConscript @@ -51,9 +51,7 @@ env.ChromeMSVSProject(('$WEBKIT_DIR/tools/npapi_layout_test_plugin/' + 'npapi_layout_test_plugin.vcproj'), guid='{BE6D5659-A8D5-4890-A42C-090DD10EF62C}') -i = env.Install('$TARGET_ROOT/plugins', dll) +# Install ourselves into the destination root so that dependent tests +# can find us. +i = env.Install('$DESTINATION_ROOT/plugins', dll) env.Alias('webkit', i) - -i = env.Install('$TARGET_ROOT', dll) -env.Alias('webkit', i) - diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript index fd13332..1e76559 100644 --- a/webkit/tools/test_shell/SConscript +++ b/webkit/tools/test_shell/SConscript @@ -222,6 +222,11 @@ if env.Bit('linux'): env.Requires(test_shell, i) env.Alias('webkit', i) + # We need the npapi plugin stuffed into the right place. + # TODO(evanm): find a cleaner way of requiring this. + env.Requires(test_shell, + '$DESTINATION_ROOT/plugins/libnpapi_layout_test_plugin.so') + test_files = [ 'image_decoder_unittest.cc', 'keyboard_unittest.cc', @@ -266,6 +271,11 @@ if env.Bit('windows'): test_shell_tests = env.ChromeTestProgram('test_shell_tests', resources + test_files) +# We need the npapi plugin stuffed into the right place. +# TODO(evanm): find a cleaner way of requiring this. +env.Requires(test_shell_tests, + '$DESTINATION_ROOT/plugins/libnpapi_layout_test_plugin.so') + i = env.Install('$TARGET_ROOT', test_shell_tests) env.Alias('webkit', i) |