From 972be15c2d194d886b567ba29e865e369de6fb48 Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Sat, 7 Aug 2010 18:33:43 +0000 Subject: Add a mimetype to npapi_test_plugin so we pass a layout test that expects each plugin to have at least one mime type. Also remove some test code that deletes a plugin during teardown. This is no longer needed and can break some tests that run later. BUG=51402 Review URL: http://codereview.chromium.org/3076041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55358 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/test/npapi_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'webkit/glue/plugins') diff --git a/webkit/glue/plugins/test/npapi_test.cc b/webkit/glue/plugins/test/npapi_test.cc index d7c4fa7..1b2baa1 100644 --- a/webkit/glue/plugins/test/npapi_test.cc +++ b/webkit/glue/plugins/test/npapi_test.cc @@ -73,6 +73,17 @@ EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* pFuncs) { EXPORT NPError API_CALL NP_Shutdown() { return NPAPIClient::PluginClient::Shutdown(); } + +#if defined(OS_POSIX) && !defined(OS_MACOSX) +EXPORT const char* API_CALL NP_GetMIMEDescription(void) { + // The layout test LayoutTests/fast/js/navigator-mimeTypes-length.html + // asserts that the number of mimetypes handled by plugins should be + // greater than the number of plugins. We specify a mimetype here so + // this plugin has at least one. + return "application/x-npapi-test-netscape:npapitestnetscape:" + "npapi test netscape content"; +} +#endif } // extern "C" namespace WebCore { -- cgit v1.1