Closed Bug 856006 Opened 8 years ago Closed 7 years ago

intermittent failures in test_browserElement_inproc_KeyEvents.html | iframe should be focused, Expected a whitelited keycode, but got 65 instead. and more

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
mozilla23

People

(Reporter: jmaher, Unassigned)

Details

(Keywords: intermittent-failure)

Attachments

(2 obsolete files)

I saw this on about 1/10 pushes on inbound:


05:03:28     INFO -  1286 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [ keydown] Handled event should be a non prevented key event in the white list.
05:03:28     INFO -  1287 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [ keypress] Handled event should be a non prevented key event in the white list.
05:03:28     INFO -  1288 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [ keyup] Handled event should be a non prevented key event in the white list.
05:03:28     INFO -  1289 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [ keydown] Handled event should be a non prevented key event in the white list.
05:03:28     INFO -  1290 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [ keypress] Handled event should be a non prevented key event in the white list.
05:03:28     INFO -  1291 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [ keyup] Handled event should be a non prevented key event in the white list.
05:03:28     INFO -  1305 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keydown 34
05:03:28     INFO -  1306 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1307 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1309 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keypress 34
05:03:28     INFO -  1310 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1311 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1313 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keyup 34
05:03:28     INFO -  1314 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1315 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1317 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keydown 93
05:03:28     INFO -  1318 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1319 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1321 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keypress 93
05:03:28     INFO -  1322 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1323 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1325 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keyup 93
05:03:28     INFO -  1326 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1327 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1329 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keydown 95
05:03:28     INFO -  1330 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1331 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1333 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keypress 95
05:03:28     INFO -  1334 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1335 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
05:03:28     INFO -  1337 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | got an unexpected event! keyup 95
05:03:28     INFO -  1338 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | [SimpleTest.finish()] this test already called finish!
05:03:28     INFO -  1339 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_KeyEvents.html | called finish() multiple times
Summary: intermittent failures in test_browserElement_inproc_KeyEvents.html → intermittent failures in test_browserElement_inproc_KeyEvents.html | [ keydown] Handled event should be a non prevented key event in the white list.
keycodes 34, 93, and 95 correspond to the ", ], and _ keys.  This test isn't sending those keys.

I have no idea where they're coming from, but I guess I can ignore them...
Attached patch Patch, v1 (obsolete) — Splinter Review
The intermittent failures are coming from events with keyCodes 34, 93,
and 95, corresponding to ", ], and _.  The test doesn't send any of
these keys; I don't know where they're coming from.  But at the very
least, we can not turn the test orange when we receive these events.

This change also removes some comments in the test about keypresses
being preventDefault'ed that, as far as I can tell, are incorrect.
Attachment #731143 - Flags: review?(pwang)
Comment on attachment 731143 [details] [diff] [review]
Patch, v1

Review of attachment 731143 [details] [diff] [review]:
-----------------------------------------------------------------

I agree with Justin that we keep our focus on testing the key events that we synthesized in the test case. Let's not turn the test case orange for the unexpected key event before we figure out why it happens randomly.
Attachment #731143 - Flags: review?(pwang) → review+
Thanks for the review, Patrick.

Fingers crossed that this doesn't create some other problem.

https://hg.mozilla.org/integration/mozilla-inbound/rev/335e02842d69
https://hg.mozilla.org/mozilla-central/rev/335e02842d69
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Re-opening, as this doesn't seem to have solved the problem, see comment 14.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: intermittent failures in test_browserElement_inproc_KeyEvents.html | [ keydown] Handled event should be a non prevented key event in the white list. → intermittent failures in test_browserElement_inproc_KeyEvents.html | Expected a whitelited keycode, but got 65instead. and more
Attached patch Attempt 2, v1 (obsolete) — Splinter Review
It looks like we're sending events to the mozbrowser iframe before it's fully loaded.
Attachment #733353 - Flags: review?(pwang)
Comment on attachment 733353 [details] [diff] [review]
Attempt 2, v1

Review of attachment 733353 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/browser-element/mochitest/browserElement_KeyEvents.js
@@ +43,5 @@
> +      SimpleTest.executeSoon(test2);
> +    }
> +  }
> +
> +  iframe.addEventListener('mozbrowserloadstart', function() {

Is listening to mozbrowserloadend better?
> Is listening to mozbrowserloadend better?

Either way works; I think we just need to listen for /a/ mozbrowser event, because that indicates that the mozbrowser machinery is fully started up.  I'm happy to change it to be consistent with the other tests, though.
Comment on attachment 733353 [details] [diff] [review]
Attempt 2, v1

okay, let's try it. :)
Attachment #733353 - Flags: review?(pwang) → review+
Let's try mozbrowserloadend as Patrick suggested.

https://hg.mozilla.org/integration/mozilla-inbound/rev/93d85dbe7368

If this actually fixes the orange, something is wrong in my understanding of mozbrowser loading, so that would be good to know!
https://hg.mozilla.org/mozilla-central/rev/93d85dbe7368
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: mozilla22 → mozilla23
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Well, I'm kind of relieved that my attempt from comment 63 didn't work.
Let's see if adding printfs reveals anything.

https://tbpl.mozilla.org/?tree=Try&rev=ee452f47e0f2
(In reply to Justin Lebar [:jlebar] from comment #76)
> Let's see if adding printfs reveals anything.
> 
> https://tbpl.mozilla.org/?tree=Try&rev=ee452f47e0f2

Of course it's bright-green on try.

If we get any more oranges here, I'm going to land these printfs on m-i and see what happens.
Maybe this somehow needed a clobber?  It seems to be working now.
Summary: intermittent failures in test_browserElement_inproc_KeyEvents.html | Expected a whitelited keycode, but got 65instead. and more → intermittent failures in test_browserElement_inproc_KeyEvents.html | iframe should be focused, Expected a whitelited keycode, but got 65 instead. and more
Comment on attachment 731143 [details] [diff] [review]
Patch, v1

Marking these as obsolete so as to get them off my radar.
Attachment #731143 - Attachment is obsolete: true
Attachment #733353 - Attachment is obsolete: true
(OrangeWFM for bugs not modified in > 2 months)
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Closing bugs where TBPLbot has previously commented, but have now not been modified for >3 months & do not contain the whiteboard strings for disabled/annotated tests or use the keyword leave-open. Filter on: mass-intermittent-bug-closure-2014-07
Status: REOPENED → RESOLVED
Closed: 8 years ago7 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.