Closed
Bug 515133
Opened 15 years ago
Closed 15 years ago
Intermittent failure of test_bug420863.html: td3: 'click' action hasn't been performed
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: ehsan.akhgari, Assigned: MarcoZ)
References
()
Details
(Keywords: intermittent-failure)
Attachments
(1 file, 3 obsolete files)
5.91 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1252384967.1252389966.720.gz OS X 10.5.2 mozilla-central unit test on 2009/09/07 21:42:47 640 INFO Running chrome://mochikit/content/a11y/accessible/test_bug420863.html... 641 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td1: shouldn't have actions 642 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td2: should have one action 643 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td2: should have 'click' action 644 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td2: 'click' action hasn't been performed 645 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td3: should have one action 646 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td3: should have 'click' action 647 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_bug420863.html | td3: 'click' action hasn't been performed 648 INFO TEST-KNOWN-FAIL | chrome://mochikit/content/a11y/accessible/test_bug420863.html | gAcc.numActions should not throw after click handler was removed!
Reporter | ||
Updated•15 years ago
|
Whiteboard: [orange]
Assignee | ||
Comment 2•15 years ago
|
||
This patch doesn't seem to work yet. It has 1 test failure in the test before the removal of the event listener, and all subsequent files give an error "nsIAccessibleEvent hasn't been defined" and other epic failures. Alex, any idea what I'm doing wrong?
Assignee: nobody → marco.zehe
Comment 3•15 years ago
|
||
I don't understand why you saved addEventListener stuffs. The problem can lie in you call SimpleTest.finish() manually, however it is called by testActions function. I think you fnished tests before they were testActions did the work and therefore it didn't remove a11y event listeners (that's the reason of nsIAccessibleEvent I think).
Assignee | ||
Comment 4•15 years ago
|
||
With this, I get the following: 651 INFO Running chrome://mochikit/content/a11y/accessible/test_bug420863.html... 652 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | Simple table cell shouldn't have any actions 653 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | No actions on the accessible for 'td2' 654 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | Wrong action name of the accessible for 'td2' 655 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | test with ID = 'mousedown event handling' failed. No mousedown event. 656 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | test with ID = 'mouseup event handling' failed. No mouseup event. 657 INFO TEST-PASS | chrome://mochikit/content/a11y/accessible/test_bug420863.html | test with ID = 'click event handling' failed. No click event. 658 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_bug420863.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAccessible.numActions]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://mochikit/content/a11y/accessible/actions.js :: actionInvoker_invoke :: line 103" data: no] Alex, any idea why the accessible seems to be invalid for this call? I suspect it's trying to do something with td3Acc.
Attachment #399420 -
Attachment is obsolete: true
Comment 5•15 years ago
|
||
I have no ideas on the glance, it's needed to debug I think.
Comment 6•15 years ago
|
||
One thing: gClickHandler is not defined getNode(this.ID).removeEventListener("click", gClickHandler, false); I think you meant gTdClickEventHandler. HTH
Comment 7•15 years ago
|
||
Or you need to wrap the gTdClickHandler with gClickHandler = { handleEvent:...
Comment 8•15 years ago
|
||
The other thing that can confound this is that doAction is essentially asynchronous. So when we call myAcc.doAction(0) our C++ code eventually ends up in nsAccessible::DoCommand where we use a one shot timer for the actual click. This should be quick, but maybe js wins sometimes (perhaps layout is busy) and we get ahead of ourselves? I actually like the original test, but maybe try increasing the timer delay in: gAcc.doAction(0); // actions are performed via timeout window.setTimeout(doTest3, 0); Perhaps window.setTimeout(doTest3, 50); would suffice.
Assignee | ||
Comment 9•15 years ago
|
||
Got it working! Had to fix a typo (see David's comment above), and also had to keepe the click handler as a global var. I also had to pass the node into the array instead of the acc, and now it works.
Attachment #399440 -
Attachment is obsolete: true
Attachment #399687 -
Flags: review?(surkov.alexander)
Comment 10•15 years ago
|
||
Comment on attachment 399687 [details] [diff] [review] Patch > > // register 'click' event handler > gClickHandler = { > handleEvent: function handleEvent(aEvent) > { > gTdClickEventHandler = true; > } > }; >+ ID: td3Node, >+ actionName: "click", >+ actionIndex: 0, >+ events: CLICK_EVENTS, >+ checkOnClickEvent: function check(aEvent) >+ { >+ ok(gTdClickEventHandler, >+ "td3: 'click' action hasn't been performed"); it doesn't make sense to use and check gTdClickEventHandler variable because checkOnClickEvent means click event was handled already. >+ // check actions >+ // XXX see bug 456347, sometimes after removing the event listener, the >+ // accessible is no longer valid. >+ var numActions = -1; >+ try { >+ numActions = getAccessible(this.ID).numActions; >+ } catch(e) {} > >- // unregister click event handler >- gNode.removeEventListener("click", gClickHandler, false); >+ if (numActions == -1) >+ todo(false, >+ "gAcc.numActions should not throw after click handler was removed!"); >+ else >+ is(numActions, 0, "td3 shouldn't have actions"); >+ } bug 456347 is worksforme, so we don't need this code. Just check numActions.
Attachment #399687 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 11•15 years ago
|
||
Attachment #399687 -
Attachment is obsolete: true
Attachment #399693 -
Flags: review?(surkov.alexander)
Comment 12•15 years ago
|
||
Comment on attachment 399693 [details] [diff] [review] Patch2, addresses Surkov's comments >+ checkOnClickEvent: function check(aEvent) >+ { >+ ok(true, >+ "td3: 'click' action hasn't been performed"); this ok is not necessary as well because there is ok inside of evenQueue when click is handled, otherwise should ok.
Attachment #399693 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 13•15 years ago
|
||
Pushed with comment addressed: http://hg.mozilla.org/mozilla-central/rev/0a71e9c0cdec
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.3a1
Comment hidden (Legacy TBPL/Treeherder Robot) |
Updated•12 years ago
|
Keywords: intermittent-failure
Updated•12 years ago
|
Whiteboard: [orange]
You need to log in
before you can comment on or make changes to this bug.
Description
•