Bug 50425 - Add the ability to run script on 'new' and 'paint' in the test plugin
Summary: Add the ability to run script on 'new' and 'paint' in the test plugin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 17:00 PST by Simon Fraser (smfr)
Modified: 2010-12-02 21:15 PST (History)
6 users (show)

See Also:


Attachments
Patch (13.62 KB, patch)
2010-12-02 17:15 PST, Simon Fraser (smfr)
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-12-02 17:00:50 PST
We need to emulate plugins doing bad things from 'new' and painting.
Comment 1 Simon Fraser (smfr) 2010-12-02 17:15:11 PST
Created attachment 75439 [details]
Patch
Comment 2 WebKit Review Bot 2010-12-02 17:16:44 PST
Attachment 75439 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plugins/testplugin-onnew-onpaint-expected.txt', u'LayoutTests/plugins/testplugin-onnew-onpaint.html', u'WebKitTools/ChangeLog', u'WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp', u'WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h', u'WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp']" exit_code: 1
WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp:205:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp:207:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 2 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2010-12-02 17:42:39 PST
http://trac.webkit.org/changeset/73226
Comment 4 WebKit Review Bot 2010-12-02 18:40:13 PST
http://trac.webkit.org/changeset/73226 might have broken Qt Linux Release
The following tests are not passing:
plugins/testplugin-onnew-onpaint.html
Comment 5 Yuta Kitamura 2010-12-02 20:29:13 PST
On Chromium Linux, there are a lot of plugin test failures which seemed to come from this patch. These tests produce new console messages such as:

>CONSOLE MESSAGE: line 122: PLUGIN: getFocusEvent
>CONSOLE MESSAGE: line 122: PLUGIN: loseFocusEvent

or

>CONSOLE MESSAGE: line 0: PLUGIN: updateEvt

I guess the following hunk caused the regression. Why did you drop these two lines?

@@ -620,8 +657,6 @@ static int16_t handleEventX11(NPP instance, PluginObject* obj, XEvent* event)
 int16_t NPP_HandleEvent(NPP instance, void *event)
 {
     PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
-    if (!obj->eventLogging)
-        return 0;
 
 #ifdef XP_MACOSX
 #ifndef NP_NO_CARBON
Comment 6 Simon Fraser (smfr) 2010-12-02 20:43:52 PST
I'm going to make this a mac-only test. Please stand by.
Comment 7 Simon Fraser (smfr) 2010-12-02 20:45:11 PST
(In reply to comment #5)
> I guess the following hunk caused the regression. Why did you drop these two lines?

Because the onPaintEvent trigger needs to be called when handing the drawRect event. I guess I need to fix the other ports.
Comment 9 Yuta Kitamura 2010-12-02 21:15:40 PST
(In reply to comment #8)
> http://trac.webkit.org/changeset/73235
> http://trac.webkit.org/changeset/73236

It seems Chromium Linux is fixed. Thanks!