summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-11 00:50:12 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-11 00:50:12 +0000
commit93273a6c861a2d1579f0b26a545fcd544d825633 (patch)
tree0531ac0f4376a55b75b5ae3dffbb932a301ed793 /webkit/tools
parent44e47865602da312b1aae90c278cf72abe7bc525 (diff)
downloadchromium_src-93273a6c861a2d1579f0b26a545fcd544d825633.zip
chromium_src-93273a6c861a2d1579f0b26a545fcd544d825633.tar.gz
chromium_src-93273a6c861a2d1579f0b26a545fcd544d825633.tar.bz2
Remove the Activex shim registration for generic Activex controls. The Activex shim only handles windows media
player in the wild and will continue to do so for the forseeable future. This fixes http://code.google.com/p/chromium/issues/detail?id=8584, which is basically related to our NPAPI plugin installer not getting instantiated on pages which instantiated flash using an object tag, which would result in webkit attempting to instantiate the activex shim. The shim only loads the windows media player classid, thus causing this issue. Added a test shell test which tests whether the default plugin loaded correctly. This is done by attempting to instantiate a special mime type application/chromium-test-default-plugin, which serves as an indicator to the default plugin to call a function in the page indicating that the test succeeded. I also made a change to ensure that the default plugin is loaded in test_shell_tests. Removed the activexshim dll project from chrome.sln Bug=8584 Review URL: http://codereview.chromium.org/63151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/plugin_tests.cc28
-rwxr-xr-xwebkit/tools/test_shell/test_shell.cc10
2 files changed, 37 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc
index d5ac5ca..f2ad349 100644
--- a/webkit/tools/test_shell/plugin_tests.cc
+++ b/webkit/tools/test_shell/plugin_tests.cc
@@ -95,3 +95,31 @@ TEST_F(PluginTest, Refresh) {
DeleteTestPlugin();
}
+
+TEST_F(PluginTest, DefaultPluginLoadTest) {
+ std::string html = "\
+ <div id='result'>Test running....</div>\
+ <script>\
+ function onSuccess() {\
+ var result = document.getElementById('result');\
+ result.innerHTML = 'DONE';\
+ }\
+ </script>\
+ <DIV ID=PluginDiv>\
+ <object classid=\"clsid:9E8BC6CE-AF35-400c-ABF6-A3F746A1871D\">\
+ <embed type=\"application/chromium-test-default-plugin\"\
+ mode=\"np_embed\"\
+ ></embed>\
+ </object>\
+ </DIV>\
+ ";
+
+ test_shell_->webView()->GetMainFrame()->LoadHTMLString(
+ html, GURL("about:blank"));
+ test_shell_->WaitTestFinished();
+
+ std::wstring text;
+ test_shell_->webView()->GetMainFrame()->GetContentAsPlainText(10000, &text);
+
+ ASSERT_EQ(true, StartsWith(text, L"DONE", true));
+}
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 6ce2509..3e8af04 100755
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -7,7 +7,7 @@
#include "webkit/tools/test_shell/test_shell.h"
-
+#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/debug_on_start.h"
#include "base/file_path.h"
@@ -614,6 +614,14 @@ bool GetPluginFinderURL(std::string* plugin_finder_url) {
#if !defined(LINUX2)
bool IsDefaultPluginEnabled() {
+ FilePath exe_path;
+
+ if (PathService::Get(base::FILE_EXE, &exe_path)) {
+ std::wstring exe_name = file_util::GetFilenameFromPath(
+ exe_path.ToWStringHack());
+ if (StartsWith(exe_name, L"test_shell_tests", false))
+ return true;
+ }
return false;
}