Closed
Bug 805330
Opened 12 years ago
Closed 12 years ago
Intermittent test_bug751809.html | Waited too long for plugin to receive the mouse click, | Plugin should have received 1 mouse up event. - got 0, expected 1
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(b2g18 fixed, b2g18-v1.0.1 fixed)
RESOLVED
FIXED
mozilla20
People
(Reporter: philor, Assigned: gfritzsche)
References
Details
(Keywords: intermittent-failure)
Attachments
(2 files, 5 obsolete files)
4.20 KB,
patch
|
gfritzsche
:
checkin+
|
Details | Diff | Splinter Review |
13.44 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #783723 +++ https://tbpl.mozilla.org/php/getParsedLog.php?id=16441157&tree=Mozilla-Inbound Rev4 MacOSX Snow Leopard 10.6 mozilla-inbound debug test mochitests-3/5 on 2012-10-24 20:08:26 PDT for push 888ac1c46830 slave: talos-r4-snow-043 72 INFO TEST-PASS | /tests/dom/plugins/test/test_bug751809.html | Plugin should not have received mouse events yet. --DOMWINDOW == 13 (0x1002410d0) [serial = 20] [outer = 0x0] [url = http://mochi.test:8888/tests/dom/plugins/test/test_GCrace.html] --DOMWINDOW == 12 (0x12a4583e0) [serial = 28] [outer = 0x1277b17d0] [url = http://mochi.test:8888/tests/dom/plugins/test/test_bug539565-2.html] 73 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/plugins/test/test_bug751809.html | Waited too long for plugin to receive the mouse click 74 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/plugins/test/test_bug751809.html | Plugin should have received 1 mouse up event. - got 0, expected 1 75 INFO TEST-END | /tests/dom/plugins/test/test_bug751809.html | finished in 3603ms
Comment hidden (Legacy TBPL/Treeherder Robot) |
We've had troubles with this test before, but the (similar) ones in browser/base/content/test/browser_pluginnotification.js seem to work fine. Maybe if we move this there it will work better?
Attachment #675203 -
Flags: feedback?(georg.fritzsche)
Updated•12 years ago
|
Attachment #675203 -
Flags: feedback?(jaws)
Comment 3•12 years ago
|
||
Comment on attachment 675203 [details] [diff] [review] patch Can you make a new test file for this? browser_pluginnotification.js is getting too large. Other than that, I'm fine with this move.
Attachment #675203 -
Flags: feedback?(jaws) → feedback+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to David Keeler from comment #2) > We've had troubles with this test before, but the (similar) ones in > browser/base/content/test/browser_pluginnotification.js seem to work fine. > Maybe if we move this there it will work better? I assume that the failures are due to the something like the window state being off as waitForFocus() apparently made it much rarer. If the different test setup there solves that, that would be great. Maybe i overlooked it though, but those don't test for click-reception on the plugin so far, only the C2P overlay?
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #4) > Maybe i overlooked it though, but those don't test for click-reception on > the plugin so far, only the C2P overlay? ... I of course meant the already existing/similar tests.
Comment hidden (Legacy TBPL/Treeherder Robot) |
(In reply to Georg Fritzsche [:gfritzsche] from comment #5) > (In reply to Georg Fritzsche [:gfritzsche] from comment #4) > > Maybe i overlooked it though, but those don't test for click-reception on > > the plugin so far, only the C2P overlay? > > ... I of course meant the already existing/similar tests. Correct - they just test whether or not the plugin activates. This orange seems to be pretty rare, though, so unless someone feels really strongly or unless this starts to fail more often, I'm going to wait on going forward with moving the test.
Assignee | ||
Comment 8•12 years ago
|
||
Alternatively i thought of maybe cleaning this test up to not dynamically insert the plugin etc. in case this leads to timing issues in the test-environment: https://hg.mozilla.org/try/rev/2b333ca46de9 https://tbpl.mozilla.org/?tree=Try&rev=b4fd38c0a9d4
(In reply to Georg Fritzsche [:gfritzsche] from comment #8) > Alternatively i thought of maybe cleaning this test up to not dynamically > insert the plugin etc. in case this leads to timing issues in the > test-environment: > https://hg.mozilla.org/try/rev/2b333ca46de9 > https://tbpl.mozilla.org/?tree=Try&rev=b4fd38c0a9d4 That sounds like a better plan, actually. If this fixes it, then we're good. If not, we can always try moving the test later.
Assignee | ||
Comment 10•12 years ago
|
||
Ok, going with the cleanup of this test. Josh, can you do the review of this follow-up to bug 751809 too?
Assignee: nobody → georg.fritzsche
Status: NEW → ASSIGNED
Attachment #676219 -
Flags: review?(joshmoz)
Assignee | ||
Updated•12 years ago
|
Attachment #675203 -
Flags: feedback?(georg.fritzsche)
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Updated•12 years ago
|
Attachment #675203 -
Attachment is obsolete: true
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment 19•12 years ago
|
||
Comment on attachment 676219 [details] [diff] [review] Clean up test_bug751809.html Review of attachment 676219 [details] [diff] [review]: ----------------------------------------------------------------- Seems fine, but I'm curious as to why it was written with document.write in the first place. Hope doing this doesn't interfering with testing what we mean to test, but it doesn't seem like it would.
Attachment #676219 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 20•12 years ago
|
||
(In reply to Josh Aas (Mozilla Corporation) from comment #19) > Seems fine, but I'm curious as to why it was written with document.write in > the first place. Hope doing this doesn't interfering with testing what we > mean to test, but it doesn't seem like it would. The document.write() was just me not knowing a better way at the time to set the click_to_play pref properly for the test.
Assignee | ||
Comment 21•12 years ago
|
||
Attachment #676219 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Updated•12 years ago
|
status-firefox17:
--- → unaffected
status-firefox18:
--- → affected
status-firefox19:
--- → affected
Comment 22•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2e0eb299471c
Flags: in-testsuite+
Keywords: checkin-needed
Comment hidden (Legacy TBPL/Treeherder Robot) |
Reporter | ||
Comment 24•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2e0eb299471c
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Updated•12 years ago
|
status-firefox19:
affected → ---
Reporter | ||
Updated•12 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 26•12 years ago
|
||
Alright, so that wasn't it :/ I wonder why this is mac debug only and appeared rather recently. David, do you want to give the moving a try? I currently can't think of another fix.
Assignee | ||
Comment 27•12 years ago
|
||
While checking something else i found out that i can actually reproduce this intermittently with a slower debug build. When delaying the mouse click a bit it doesn't occur anymore, so it looks like plugin.activated (what we use as the check for instantiation here) is true before the plugin actually is properly/fully instantiated.
Assignee | ||
Comment 28•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #27) > so it looks like plugin.activated (what we use as the check for > instantiation here) is true before the plugin actually is > properly/fully instantiated. ... which might explain the sudden appearance of this intermittent failure: Bug 797043 (cleaning up nsObjectLoadingContent::mActivated) landed on 10-20.
I think the meaning of mActivated has been overloaded in a way that doesn't really work. To part of the code, it means whether or not the user has decided to activate the plugin (ala click-to-play). In other parts of the code (particularly these tests), it seems we want it to mean whether or not the plugin has successfully and fully instantiated. Maybe it would be nice to have an attribute we can access that means this latter thing, but in the meantime, we can get pretty close to that by seeing if a function we're expecting to be exposed by the plugin is available on the plugin object (you might have to use plugin.wrappedJSObject.function or something - I don't quite remember).
Comment 30•12 years ago
|
||
(In reply to David Keeler from comment #29) > I think the meaning of mActivated has been overloaded in a way that doesn't > really work. To part of the code, it means whether or not the user has > decided to activate the plugin (ala click-to-play). In other parts of the > code (particularly these tests), it seems we want it to mean whether or not > the plugin has successfully and fully instantiated. Maybe it would be nice > to have an attribute we can access that means this latter thing, but in the > meantime, we can get pretty close to that by seeing if a function we're > expecting to be exposed by the plugin is available on the plugin object (you > might have to use plugin.wrappedJSObject.function or something - I don't > quite remember). After Bug 797043, activated only means the object passed CTP checks - the plugin instantiation wont happen until either a return to the event loop (channel-less) or the channel reaches OnStartRequest. If working with the test plugin it's easy enough to check if the plugin has spawned by seeing if any of its functions are defined: > if (obj.getObjectValue !== undefined) To differentiate between two instances of running plugins (to see if it respawned) > let oldPlugin = obj.getObjectValue(); > > // ... > // Do something that should respawn the plugin > // ... > > let respawned = false; > try { > respawned = obj.checkObjectValue(oldPlugin); > } catch (e) {}
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 33•12 years ago
|
||
Right, thanks. Fixing the activation check this runs into another issue: Mouse clicks aren't delivered if the click occurs before the plugin instance owner sees the plugin as visible: http://dxr.mozilla.org/mozilla-central/dom/plugins/base/nsPluginInstanceOwner.cpp#l1938 While we can check plugin.IsVisible(): http://dxr.mozilla.org/mozilla-central/dom/plugins/test/testplugin/nptest.cpp.html#l3541 ... but before nsPluginInstanceOwner::mWidgetVisible initially becomes true this is hit: http://dxr.mozilla.org/mozilla-central/dom/plugins/ipc/PluginInstanceChild.cpp.html#l3476 ... which sets the plugins clip rect to non-zero dimensions. Only quickly skimmed through bug 626602, but i wonder what we need that early temporary visibility patching for. Chris, do you remember this?
Assignee | ||
Updated•12 years ago
|
Attachment #681541 -
Attachment is obsolete: true
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(jones.chris.g)
Yes, roc added this because some plugins break if they're always invisible but aren't painted at least once.
Flags: needinfo?(jones.chris.g)
Updated•12 years ago
|
Keywords: intermittent-failure
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 40•12 years ago
|
||
Alright, if that workaround is required we can either (1) check wether the browser thinks the plugin is visible or (2) work around this with a delay to avoid sending the click to the plugin too early I don't see a way for (1) from the test-environment (only native paths); would it make sense to expose a nsIObjectLoadingContent::isPluginVisible attribute?
Comment hidden (Legacy TBPL/Treeherder Robot) |
Perhaps one option would be to use paint_listener.js: wait for the page to load, then change something (e.g. the background color) and use paint_listener.js to wait for the paint to complete. By then we should have decided that the plugin is visible.
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 44•12 years ago
|
||
Use paint_listener to wait for paint flushs and thus visibility. Fixes the issue locally for me, so i'm hopeful. https://tbpl.mozilla.org/?tree=Try&rev=7b404774b4d7
Assignee | ||
Updated•12 years ago
|
Attachment #684779 -
Attachment is patch: true
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Updated•12 years ago
|
Whiteboard: [orange]
Assignee | ||
Updated•12 years ago
|
Attachment #680603 -
Flags: checkin+
Assignee | ||
Comment 47•12 years ago
|
||
Comment on attachment 684779 [details] [diff] [review] Wait for paint flushs Looks good on try. Requesting review for this follow-up, hopefully the last one.
Attachment #684779 -
Flags: review?(joshmoz)
Comment 48•12 years ago
|
||
Comment on attachment 684779 [details] [diff] [review] Wait for paint flushs Review of attachment 684779 [details] [diff] [review]: ----------------------------------------------------------------- Please add code comments in the test explaining why you're doing this. Do we really need to copy paint_listener.js? I'm not saying it isn't reasonable to do so, and you don't need to go way out of your way to avoid it, just wondering.
Attachment #684779 -
Flags: review?(joshmoz) → review+
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 68•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=427878feca29
Attachment #684779 -
Attachment is obsolete: true
Attachment #688380 -
Flags: review?
Assignee | ||
Comment 69•12 years ago
|
||
Comment on attachment 688380 [details] [diff] [review] Wait for paint flushs roc, are you ok with moving the paint listener over to the mochitest so it can be shared across modules?
Attachment #688380 -
Flags: review? → review?(roc)
Assignee | ||
Comment 70•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #69) > roc, are you ok with moving the paint listener over to the mochitest so it > can be shared across modules? Forgot to add: Just flagging for review for the layout/ parts.
Assignee | ||
Comment 71•12 years ago
|
||
Comment on attachment 688380 [details] [diff] [review] Wait for paint flushs robcee, can you review the testing/mochitests parts? This should match the earlier IRC chat.
Attachment #688380 -
Flags: review?(rcampbell)
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment on attachment 688380 [details] [diff] [review] Wait for paint flushs Review of attachment 688380 [details] [diff] [review]: ----------------------------------------------------------------- That's fine, but use hg rename to move the file so we don't lose history.
Attachment #688380 -
Flags: review?(rcampbell) → review+
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 76•12 years ago
|
||
Thanks for catching the plain copy/remove roc, i completely missed that. robcee, any objections?
Attachment #688380 -
Attachment is obsolete: true
Attachment #688380 -
Flags: review?(roc)
Attachment #688733 -
Flags: review?(rcampbell)
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment 93•12 years ago
|
||
Comment on attachment 688733 [details] [diff] [review] Wait for paint flushs, v4 sorry I didn't see this sooner. r+
Attachment #688733 -
Flags: review?(rcampbell) → review+
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 97•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/903c331107c2
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment 100•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/903c331107c2
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: mozilla19 → mozilla20
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment 108•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/9b7b54d03103 https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/a4fefd60f7a5
status-b2g18:
--- → fixed
status-b2g18-v1.0.1:
--- → fixed
status-firefox17:
unaffected → ---
status-firefox18:
affected → ---
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment hidden (Legacy TBPL/Treeherder Robot) |
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•