summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 16:36:23 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 16:36:23 +0000
commit01647c859fbb1ba88f526c0f1dc2536b282d513e (patch)
tree3da4e7d5f9d6b4dd6f51d5a517c1bf6dea158c54 /webkit/support
parentcf561ba3a247e43e752be53a283bf14a9f2a068c (diff)
downloadchromium_src-01647c859fbb1ba88f526c0f1dc2536b282d513e.zip
chromium_src-01647c859fbb1ba88f526c0f1dc2536b282d513e.tar.gz
chromium_src-01647c859fbb1ba88f526c0f1dc2536b282d513e.tar.bz2
Add xcodebuild/{Debug/Release}/plugins to the plugin load
path for TestShell.app and DumpRenderTree.app. This avoids having to copy the plugin into the DumpRenderTree.app/Contents/PlugIns and makes Mac more consistent with Win/Linux. TEST=put an npapi plugin in xcodebuild/Debug/plugins and see that it exists in navigator.plugins. BUG=48471 Review URL: http://codereview.chromium.org/3779013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/platform_support_mac.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/support/platform_support_mac.mm b/webkit/support/platform_support_mac.mm
index a0e426c..af9cc56 100644
--- a/webkit/support/platform_support_mac.mm
+++ b/webkit/support/platform_support_mac.mm
@@ -8,6 +8,7 @@
#import <Foundation/Foundation.h>
#import <objc/objc-runtime.h>
+#include "base/base_paths.h"
#include "base/data_pack.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -16,6 +17,7 @@
#include "base/string16.h"
#include "grit/webkit_resources.h"
#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
+#include "webkit/glue/plugins/plugin_list.h"
#import "webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h"
static base::DataPack* g_resource_data_pack = NULL;
@@ -138,6 +140,12 @@ void AfterInitialize(bool unit_test_mode) {
}
SwizzleNSPasteboard();
+
+ // Add <app bundle's parent dir>/plugins to the plugin path so we can load
+ // test plugins.
+ PathService::Get(base::DIR_EXE, &plugins_dir);
+ plugins_dir = plugins_dir.AppendASCII("../../../plugins");
+ NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
}
void BeforeShutdown() {