Bug 43232 - Replace plugins/npruntime/bindings-test.html with a more sophisticated test
Summary: Replace plugins/npruntime/bindings-test.html with a more sophisticated test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-29 21:29 PDT by Anders Carlsson
Modified: 2010-08-10 22:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (26.22 KB, patch)
2010-07-29 21:40 PDT, Anders Carlsson
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2010-07-29 21:29:07 PDT
Replace plugins/npruntime/bindings-test.html with a more sophisticated test
Comment 1 Anders Carlsson 2010-07-29 21:40:05 PDT
Created attachment 63031 [details]
Patch
Comment 2 WebKit Review Bot 2010-07-29 21:41:40 PDT
Attachment 63031 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:57:  PluginTest::NPP_GetValue is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:63:  PluginTest::NPN_CreateObject is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp:49:  One space before end of line comments  [whitespace/comments] [5]
WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp:65:  One space before end of line comments  [whitespace/comments] [5]
Total errors found: 5 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Adam Roben (:aroben) 2010-07-30 08:39:48 PDT
Comment on attachment 63031 [details]
Patch

>  2010-07-29  Anders Carlsson  <andersca@apple.com>
>  
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Replace plugins/npruntime/bindings-test.html with a more sophisticated test
> +        https://bugs.webkit.org/show_bug.cgi?id=43232
> +
> +        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
> +        * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
> +        (pluginInvoke):
> +        * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
> +        (PluginTest::create):
> +        (PluginTest::NPP_GetValue):
> +        (PluginTest::NPN_CreateObject):
> +        (PluginTest::createTestFunctions):
> +        * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
> +        (PluginTest::identifier):
> +        * DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp:
> +        (DocumentOpenInDestroyStream::DocumentOpenInDestroyStream):
> +        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
> +        (NPP_GetValue):
> +        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
> +        * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
> +        * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
> +        (webkit_test_plugin_get_value):
> +        * GNUmakefile.am:

Can you describe the changes a bit?

> -static bool removeDefaultMethod(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
> -{
> -    pluginClass.invokeDefault = 0;
> -    VOID_TO_NPVARIANT(*result);
> -    return true;
> -}

Is it worthwhile to test that a plugin can dynamically remove its invokeDefault implementation? You've lost that aspect of the test.

r=me
Comment 4 Anders Carlsson 2010-07-30 10:25:26 PDT
(In reply to comment #3)
> (From update of attachment 63031 [details])
> >  2010-07-29  Anders Carlsson  <andersca@apple.com>
> >  
> > +        Reviewed by NOBODY (OOPS!).
> > +
> > +        Replace plugins/npruntime/bindings-test.html with a more sophisticated test
> > +        https://bugs.webkit.org/show_bug.cgi?id=43232
> > +
> > +        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
> > +        * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
> > +        (pluginInvoke):
> > +        * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
> > +        (PluginTest::create):
> > +        (PluginTest::NPP_GetValue):
> > +        (PluginTest::NPN_CreateObject):
> > +        (PluginTest::createTestFunctions):
> > +        * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
> > +        (PluginTest::identifier):
> > +        * DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp:
> > +        (DocumentOpenInDestroyStream::DocumentOpenInDestroyStream):
> > +        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
> > +        (NPP_GetValue):
> > +        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
> > +        * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
> > +        * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
> > +        (webkit_test_plugin_get_value):
> > +        * GNUmakefile.am:
> 
> Can you describe the changes a bit?
> 

Sure!

> > -static bool removeDefaultMethod(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
> > -{
> > -    pluginClass.invokeDefault = 0;
> > -    VOID_TO_NPVARIANT(*result);
> > -    return true;
> > -}
> 
> Is it worthwhile to test that a plugin can dynamically remove its invokeDefault implementation? You've lost that aspect of the test.

I don't think it is, especially not in an OOP model.
> 
> r=me
Comment 5 WebKit Review Bot 2010-07-30 10:35:58 PDT
http://trac.webkit.org/changeset/64359 might have broken Qt Linux Release
Comment 6 Adam Barth 2010-08-10 22:50:40 PDT
Appears to have been landed in http://trac.webkit.org/changeset/64359