diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-28 21:44:48 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-28 21:44:48 +0000 |
commit | f4dd4e33a3f9c38b369552efc31cfec0dc75b9e2 (patch) | |
tree | bb5f3928e51ba24c659e5cf4fa8058268f11faf9 /webkit | |
parent | c664fd23d97eaf5ed133d41f164708a034f36d4d (diff) | |
download | chromium_src-f4dd4e33a3f9c38b369552efc31cfec0dc75b9e2.zip chromium_src-f4dd4e33a3f9c38b369552efc31cfec0dc75b9e2.tar.gz chromium_src-f4dd4e33a3f9c38b369552efc31cfec0dc75b9e2.tar.bz2 |
Try to get PluginTest.DefaultPluginLoadTest running on mac and linux.
BUG=10952,17392
Review URL: http://codereview.chromium.org/2329004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/default_plugin/plugin_main.cc | 15 | ||||
-rw-r--r-- | webkit/tools/test_shell/plugin_tests.cc | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/webkit/default_plugin/plugin_main.cc b/webkit/default_plugin/plugin_main.cc index 5025007..f31cbd5 100644 --- a/webkit/default_plugin/plugin_main.cc +++ b/webkit/default_plugin/plugin_main.cc @@ -205,6 +205,14 @@ NPError NPP_Destroy(NPP instance, NPSavedData** save) { } NPError NPP_SetWindow(NPP instance, NPWindow* window_info) { + // The default plugin only loads in in-process mode during execution of + // PluginTest.DefaultPluginLoadTest. In that case, NPP_New() just calls + // SignalTestResult() and doesn't set |instance->pdata|. + // NPP_SetWindow() is called by webkit during layout of the test html. OS X + // and linux DCHECK the result of this function, so pretend that all's well. + if (webkit_glue::IsPluginRunningInRendererProcess()) + return NPERR_NO_ERROR; + if (instance == NULL) return NPERR_INVALID_INSTANCE_ERROR; @@ -213,13 +221,6 @@ NPError NPP_SetWindow(NPP instance, NPWindow* window_info) { return NPERR_GENERIC_ERROR; } - // We may still get a NPP_SetWindow call from webkit in the - // single-process/test_shell case, as this gets invoked in the plugin - // destruction code path. - if (webkit_glue::IsPluginRunningInRendererProcess()) { - return NPERR_GENERIC_ERROR; - } - PluginInstallerImpl* plugin_impl = reinterpret_cast<PluginInstallerImpl*>(instance->pdata); diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc index 816a846..4b652cf 100644 --- a/webkit/tools/test_shell/plugin_tests.cc +++ b/webkit/tools/test_shell/plugin_tests.cc @@ -125,8 +125,6 @@ TEST_F(PluginTest, Refresh) { ASSERT_EQ(text, "DONE"); } -#if defined(OS_WIN) -// TODO(port): Reenable on mac and linux once they have working default plugins. TEST_F(PluginTest, DefaultPluginLoadTest) { std::string html = "\ <div id='result'>Test running....</div>\ @@ -153,7 +151,6 @@ TEST_F(PluginTest, DefaultPluginLoadTest) { test_shell_->webView()->mainFrame()->contentAsText(10000).utf8(); ASSERT_EQ(true, StartsWithASCII(text, "DONE", true)); } -#endif // Tests that if a frame is deleted as a result of calling NPP_HandleEvent, we // don't crash. diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 564979c..0ce4c92 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -772,7 +772,6 @@ bool GetPluginFinderURL(std::string* plugin_finder_url) { } bool IsDefaultPluginEnabled() { -#if defined(OS_WIN) FilePath exe_path; if (PathService::Get(base::FILE_EXE, &exe_path)) { @@ -781,7 +780,6 @@ bool IsDefaultPluginEnabled() { if (StartsWith(exe_name, L"test_shell_tests", false)) return true; } -#endif // OS_WIN return false; } |