Closed Bug 524128 Opened 11 years ago Closed 11 years ago

sporadic timeout in /tests/dom/tests/mochitest/general/test_497898.html followed by focus issues

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: dholbert, Assigned: Natch)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

{
6715 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/general/test_497898.html | Test timed out.
6717 INFO Running /tests/dom/tests/mochitest/general/test_bug504220.html...
6718 INFO Error: Unable to restore focus, expect failures and timeouts.
}

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256299533.1256303265.16389.gz#err2
Linux mozilla-central test debug mochitests-3/5 on 2009/10/23 05:05:33
Depends on: 497898
Whiteboard: [orange]
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256313559.1256315626.1223.gz
Linux mozilla-central test mochitests-3/5 on 2009/10/23 08:59:19
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256485819.1256489067.7358.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/25 08:50:19
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256524029.1256527150.30151.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/25 19:27:09
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256543911.1256547178.22560.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/26 00:58:31
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256582801.1256585909.22050.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/26 11:46:41
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256590870.1256593590.10195.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/26 14:01:10
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256652732.1256655186.24986.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/27 07:12:12
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256656664.1256658612.31285.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/27 08:17:44
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256673978.1256675860.3410.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/27 13:06:18
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256676037.1256678181.29347.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/27 13:40:37
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256677765.1256680121.18541.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/27 14:09:25
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256683343.1256686063.21469.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/27 15:42:23
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256764065.1256766048.25134.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/28 14:07:45
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256782437.1256784945.14376.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/28 19:13:57
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256829341.1256831902.6771.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/29 08:15:41
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256879205.1256881753.18357.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/29 22:06:45
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256880691.1256883293.2181.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/29 22:31:31
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256894584.1256896980.22491.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/30 02:23:04 

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256897623.1256899152.14126.gz&fulltext=1
OS X 10.5.2 mozilla-central test mochitests-3/5 on 2009/10/30 03:13:43
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256926080.1256928477.3438.gz&fulltext=1
Linux mozilla-central test debug mochitests-3/5 on 2009/10/30 11:08:00
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256933962.1256936089.24470.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/30 13:19:22  
4623 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/general/test_497898.html | Test timed out.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1256949419.1256951653.5450.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/10/30 17:36:59
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257044308.1257046670.24836.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/10/31 19:58:28
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257117055.1257119489.3924.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/11/01 15:10:55
Attached patch possible fix (obsolete) — Splinter Review
This can be the problem.

Basically, the second window's frame calls setTimeout(doe, 100); and focuses the first iframe, problem is the second iframe may not have been focused yet, so I put it in a waitForFocus call. The difference is in the second window's iframe, as follows:

-setTimeout(doe,100);
+window.opener.SimpleTest.waitForFocus(doe, document.getElementById('frame'));

...and obviously I added the |id="frame"| to the second frame.
Assignee: nobody → highmind63
Status: NEW → ASSIGNED
Attachment #409638 - Flags: review?(enndeakin)
Oh, and I forgot to mention, the reason the second frame needs focus is because it does its evil deed onblur...
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257126703.1257129450.15396.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/11/01 17:51:43
Daniel: what does this have to do with bug 497898 (in the depends list)?
Nothing at all -- not sure how that got in there, sorry.
No longer depends on: 497898
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257187379.1257190493.26442.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/11/02 10:42:59
Comment on attachment 409638 [details] [diff] [review]
possible fix

This looks ok. Does it still crash if the docshell null check added by bug 497633 is removed?
It doesn't crash for me before or after this change if I take away that check, but I'm on Windows here...
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257196695.1257199632.892.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/11/02 13:18:15

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257193846.1257196328.28201.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/11/02 12:30:46
Comment on attachment 409638 [details] [diff] [review]
possible fix

Actually, scratch that. It does crash without this, not with.
Attachment #409638 - Attachment is obsolete: true
Attachment #409638 - Flags: review?(enndeakin)
Attached patch fixSplinter Review
Ok, this version crashes. Fixed some js errors and fixed up the focusing code.

Changes:

- <frameset onblur="window.frameElement.parentNode.removeChild(window.frameElement)"/>
+ <frameset onblur="window.frameElement.parentNode.removeChild(window.frameElement)" id="frame"/>

function doe(i){
+ document.getElementById('frame').focus();
document.getElementsByTagName('*')[1].focus();
}
- setTimeout(doe, 100);
+ top.opener.SimpleTest.waitForFocus(function () setTimeout(doe, 100), top);
</script>
Attachment #409801 - Flags: review?(enndeakin)
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257203781.1257206568.13646.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/11/02 15:16:21
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257219439.1257222279.24051.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/11/02 19:37:19
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257228824.1257231301.25437.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/11/02 22:13:44
Comment on attachment 409801 [details] [diff] [review]
fix

Don't remove the blank last line
Attachment #409801 - Flags: review?(enndeakin) → review+
(In reply to comment #43)
> Don't remove the blank last line

Those removals are fine, there were two blank lines at the end of both files, I just removed one.

<crossedfingers />
Keywords: checkin-needed
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257308084.1257309390.7977.gz
OS X 10.5.2 mozilla-central test mochitests-3/5 on 2009/11/03 20:14:44  

A smart person would have pushed your patch while pushing the trigger for that build, wouldn't he?
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257374726.1257377451.6600.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/11/04 14:45:26
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257378131.1257381096.14643.gz
Linux mozilla-central test debug mochitests-3/5 on 2009/11/04 15:42:11
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1257378364.1257381916.23749.gz
WINNT 5.2 mozilla-central test debug mochitests-3/5 on 2009/11/04 15:46:04
http://hg.mozilla.org/mozilla-central/rev/f1c0c5a52b29
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Flags: in-testsuite+
Whiteboard: [orange]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.