diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 01:22:33 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 01:22:33 +0000 |
commit | e516ffdbb14f6f192047df18a40ad5bff10df77e (patch) | |
tree | 9cc14d100d37ef3ae2f4ac4bd3515af5c30e3df4 /webkit | |
parent | 69069eac7fa16480a84b513bcfde2fbcae8aaaa8 (diff) | |
download | chromium_src-e516ffdbb14f6f192047df18a40ad5bff10df77e.zip chromium_src-e516ffdbb14f6f192047df18a40ad5bff10df77e.tar.gz chromium_src-e516ffdbb14f6f192047df18a40ad5bff10df77e.tar.bz2 |
linux: make layout test plugin build and run in test_shell
I used the upstream implementation as a guide for the changes I made,
so style faults are theirs.
Also includes updates to test_expectations for the new tests we pass,
and one new baseline for a test that had an output image that we match
Windows on aside from antialiasing.
BUG=11516
Review URL: http://codereview.chromium.org/150144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19698 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
4 files changed, 85 insertions, 38 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-linux/chrome/plugins/return-npobject-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/chrome/plugins/return-npobject-expected.checksum new file mode 100644 index 0000000..46e9f76 --- /dev/null +++ b/webkit/data/layout_tests/platform/chromium-linux/chrome/plugins/return-npobject-expected.checksum @@ -0,0 +1 @@ +68a0abdea3a4fda2f7275678825faecb
\ No newline at end of file diff --git a/webkit/data/layout_tests/platform/chromium-linux/chrome/plugins/return-npobject-expected.png b/webkit/data/layout_tests/platform/chromium-linux/chrome/plugins/return-npobject-expected.png Binary files differnew file mode 100644 index 0000000..549bb71 --- /dev/null +++ b/webkit/data/layout_tests/platform/chromium-linux/chrome/plugins/return-npobject-expected.png diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt index 8d6b1f0..ea687bd 100644 --- a/webkit/tools/layout_tests/test_expectations.txt +++ b/webkit/tools/layout_tests/test_expectations.txt @@ -1287,7 +1287,6 @@ BUG10351 MAC : LayoutTests/accessibility/plugin.html = FAIL CRASH BUG10351 MAC LINUX : LayoutTests/fast/dom/object-embed-plugin-scripting.html = FAIL BUG10351 MAC : LayoutTests/fast/events/tabindex-focus-blur-all.html = FAIL PASS BUG10351 MAC : LayoutTests/tables/mozilla_expected_failures/bugs/bug8499.html = FAIL -BUG10673 LINUX : chrome/plugins/call-as-function.html = CRASH FAIL BUG10673 MAC : chrome/plugins/call-as-function.html = FAIL BUG10351 LINUX : LayoutTests/fast/js/navigator-mimeTypes-length.html = FAIL BUG10351 MAC LINUX : LayoutTests/http/tests/plugins/cross-frame-object-access.html = FAIL @@ -1299,31 +1298,30 @@ BUG10351 LINUX : LayoutTests/http/tests/plugins/npapi-response-headers.html = TI BUG10351 LINUX : LayoutTests/http/tests/plugins/post-url-file.html = CRASH TIMEOUT BUG10351 LINUX : LayoutTests/http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html = TIMEOUT BUG10351 MAC LINUX : LayoutTests/plugins/embed-attributes-setting.html = CRASH FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/embed-inside-object.html = TIMEOUT -BUG10351 MAC LINUX : LayoutTests/plugins/get-empty-url.html = CRASH FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/get-url-that-the-resource-load-delegate-will-disallow.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/getintidentifier-special-values.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/geturl-replace-query.html = TIMEOUT -BUG10351 MAC LINUX : LayoutTests/plugins/inner-html-display-none.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/invoke.html = FAIL +BUG10351 MAC : LayoutTests/plugins/embed-inside-object.html = TIMEOUT +BUG10351 MAC : LayoutTests/plugins/get-empty-url.html = CRASH FAIL +BUG10351 MAC : LayoutTests/plugins/get-url-that-the-resource-load-delegate-will-disallow.html = FAIL +BUG10351 MAC : LayoutTests/plugins/getintidentifier-special-values.html = FAIL +BUG10351 MAC : LayoutTests/plugins/geturl-replace-query.html = TIMEOUT +BUG10351 MAC : LayoutTests/plugins/inner-html-display-none.html = FAIL +BUG10351 MAC : LayoutTests/plugins/invoke.html = FAIL BUG10351 MAC LINUX : LayoutTests/plugins/mouse-events.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/netscape-destroy-plugin-script-objects.html = FAIL +BUG10351 MAC : LayoutTests/plugins/netscape-destroy-plugin-script-objects.html = FAIL BUG10351 MAC LINUX : LayoutTests/plugins/netscape-dom-access.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/netscape-get-property-return-value.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/netscape-identifier-conversion.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/netscape-invoke-default.html = FAIL -BUG10351 LINUX : LayoutTests/plugins/open-and-close-window-with-plugin.html = FAIL +BUG10351 MAC : LayoutTests/plugins/netscape-get-property-return-value.html = FAIL +BUG10351 MAC : LayoutTests/plugins/netscape-identifier-conversion.html = FAIL +BUG10351 MAC : LayoutTests/plugins/netscape-invoke-default.html = FAIL BUG10351 MAC LINUX : LayoutTests/plugins/plugin-javascript-access.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/plugin-remove-subframe.html = FAIL -BUG10351 MAC LINUX : LayoutTests/plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html = TIMEOUT -BUG10667 LINUX MAC : chrome/plugins/get-file-url.html = CRASH TIMEOUT +BUG10351 MAC : LayoutTests/plugins/plugin-remove-subframe.html = FAIL +BUG10351 MAC : LayoutTests/plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html = TIMEOUT +BUG10667 MAC : chrome/plugins/get-file-url.html = CRASH TIMEOUT // Skip because we throw an exception before we get to dumpAsText. -BUG10667 SKIP LINUX MAC : chrome/plugins/get-url-with-blank-target.html = FAIL -BUG10667 LINUX MAC : chrome/plugins/multiple-plugins.html = FAIL -BUG10667 LINUX MAC : chrome/plugins/nested-plugin-objects.html = FAIL -BUG10667 LINUX MAC : chrome/plugins/refcount-leaks.html = FAIL -BUG10667 LINUX MAC : chrome/plugins/return-npobject.html = FAIL -BUG10667 LINUX MAC : chrome/plugins/script-object-invoke.html = FAIL +BUG10667 SKIP MAC : chrome/plugins/get-url-with-blank-target.html = FAIL +BUG10667 MAC : chrome/plugins/multiple-plugins.html = FAIL +BUG10667 MAC : chrome/plugins/nested-plugin-objects.html = FAIL +BUG10667 MAC : chrome/plugins/refcount-leaks.html = FAIL +BUG10667 MAC : chrome/plugins/return-npobject.html = FAIL +BUG10667 MAC : chrome/plugins/script-object-invoke.html = FAIL BUG10667 MAC : pending/plugins/iframe-shims.html = FAIL CRASH // NEW FOR MERGE 36102:37604 @@ -1373,7 +1371,7 @@ BUG10353 DEBUG MAC : LayoutTests/http/tests/misc/dns-prefetch-control.html = TIM // New tests. We should fix these, but they doesn't need to block the current // release BUG10354 WIN LINUX : LayoutTests/fast/layers/opacity-transforms.html = FAIL -BUG10354 MAC LINUX : LayoutTests/plugins/netscape-construct.html = FAIL +BUG10354 MAC : LayoutTests/plugins/netscape-construct.html = FAIL // MERGE 37604:38097 REGRESSIONS // New test. We should fix it, but it doesn't need to block the current release @@ -1888,9 +1886,9 @@ BUG10436 WIN LINUX : LayoutTests/fast/block/float/nested-clearance.html = FAIL BUG10437 LINUX : LayoutTests/fast/css-generated-content/hit-test-generated-content.html = FAIL // From webkit merge 41447:41498 -BUG10438 MAC LINUX : LayoutTests/plugins/netscape-plugin-setwindow-size-2.html = FAIL -BUG10438 MAC LINUX : LayoutTests/plugins/netscape-plugin-setwindow-size.html = FAIL -BUG10438 MAC LINUX : LayoutTests/plugins/destroy-stream-twice.html = TIMEOUT +BUG10438 MAC : LayoutTests/plugins/netscape-plugin-setwindow-size-2.html = FAIL +BUG10438 MAC : LayoutTests/plugins/netscape-plugin-setwindow-size.html = FAIL +BUG10438 MAC : LayoutTests/plugins/destroy-stream-twice.html = TIMEOUT // Crashes sometimes. Race? Memory corruption? // Might be related to https://bugs.webkit.org/show_bug.cgi?id=22834 diff --git a/webkit/tools/npapi_layout_test_plugin/main.cpp b/webkit/tools/npapi_layout_test_plugin/main.cpp index fcd21fd..0457ec4 100644 --- a/webkit/tools/npapi_layout_test_plugin/main.cpp +++ b/webkit/tools/npapi_layout_test_plugin/main.cpp @@ -90,18 +90,35 @@ static void log(NPP instance, const char* format, ...) browser->releaseobject(windowObject); } -// Mach-o entry points +// Plugin entry points extern "C" { - NPError NPAPI NP_Initialize(NPNetscapeFuncs *browserFuncs); + NPError NPAPI NP_Initialize(NPNetscapeFuncs *browserFuncs +#if defined(OS_LINUX) + , NPPluginFuncs *pluginFuncs +#endif + ); NPError NPAPI NP_GetEntryPoints(NPPluginFuncs *pluginFuncs); void NPAPI NP_Shutdown(void); + +#if defined(OS_LINUX) + NPError NP_GetValue(NPP instance, NPPVariable variable, void *value); + const char* NP_GetMIMEDescription(void); +#endif } -// Mach-o entry points -NPError NPAPI NP_Initialize(NPNetscapeFuncs *browserFuncs) +// Plugin entry points +NPError NPAPI NP_Initialize(NPNetscapeFuncs *browserFuncs +#if defined(OS_LINUX) + , NPPluginFuncs *pluginFuncs +#endif +) { browser = browserFuncs; +#if defined(OS_LINUX) + return NP_GetEntryPoints(pluginFuncs); +#else return NPERR_NO_ERROR; +#endif } NPError NPAPI NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) @@ -429,18 +446,49 @@ void NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyD NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) { - if (variable == NPPVpluginScriptableNPObject) { - void **v = (void **)value; - PluginObject* obj = static_cast<PluginObject*>(instance->pdata); - // Return value is expected to be retained - browser->retainobject((NPObject *)obj); - *v = obj; - return NPERR_NO_ERROR; + NPError err = NPERR_NO_ERROR; + + switch (variable) { +#if defined(OS_LINUX) + case NPPVpluginNameString: + *((const char **)value) = "WebKit Test PlugIn"; + break; + case NPPVpluginDescriptionString: + *((const char **)value) = "Simple Netscape plug-in that handles test content for WebKit"; + break; + case NPPVpluginNeedsXEmbed: + *((NPBool *)value) = TRUE; + break; +#endif + case NPPVpluginScriptableNPObject: { + void **v = (void **)value; + PluginObject* obj = static_cast<PluginObject*>(instance->pdata); + // Return value is expected to be retained + browser->retainobject((NPObject *)obj); + *v = obj; + break; + } + default: + fprintf(stderr, "Unhandled variable to NPP_GetValue\n"); + err = NPERR_GENERIC_ERROR; + break; } - return NPERR_GENERIC_ERROR; + + return err; } NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value) { return NPERR_GENERIC_ERROR; } + +#if defined(OS_LINUX) +NPError NP_GetValue(NPP instance, NPPVariable variable, void *value) +{ + return NPP_GetValue(instance, variable, value); +} + +const char* NP_GetMIMEDescription(void) { + return "application/x-webkit-test-netscape:testnetscape:test netscape content"; +} +#endif |