Closed Bug 720069 Opened 13 years ago Closed 13 years ago

Intermittent test_browserFrame1.html, test_browserFrame2.html, test_browserFrame3.html "iframeLoad is not defined"


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

Not set



Tracking Status
firefox12 --- fixed


(Reporter: philor, Assigned: justin.lebar+bug)



(Keywords: intermittent-failure, Whiteboard: [qa-])


(1 file, 1 obsolete file)

Okay, I only have a test_browserFrame3.html in so far, but it's just a matter of time for the others. Nothing says that firing onload has to wait for all script in the document to be parsed, so <iframe onload="foo"></iframe><script>function foo(){}</script> is just asking for "foo is not defined."

Of course, the mochitest boilerplate encourages that, but that's for the same reason that the Mozilla Store only sells clownshoes, starting with size 22.
Attached patch fix (obsolete) — Splinter Review
Moving the <script> inside the <head> where you would have put it as a matter of course if you weren't starting with boilerplate works too, but that requires way more cut and paste than this does.
Attachment #590424 - Flags: review?(justin.lebar+bug)
Comment on attachment 590424 [details] [diff] [review]

Silly me.  Thanks, Philor.
Attachment #590424 - Flags: review?(justin.lebar+bug) → review+
Okay, that was pathetic, where I starred my own brokenness from not paying attention to what I was fixing and what I would be breaking as though it was just the original problem. Backed out in, guess I ought to actually look at what I'm doing.
Target Milestone: mozilla12 → ---
Well, one problem is

  addEventListener('load', runTest());

I bet if we got rid of those parentheses, that would help a lot.
Ignoring 4, which I shouldn't have touched, 1-3 fail to consider data:text/html,<body><iframe onload="alert('iframe loaded')"></iframe></body>.

The whole thing is a race, will the iframe fire its first onload from when it loads empty before iframeLoad is defined, or will it fire it after it's defined but before the window load fires and runTest happens? :)
Summary: Intermittent test_browserFrame1.html, test_browserFrame2.html, test_browserFrame3.html, test_browserFrame4.html "iframeLoad is not defined" → Intermittent test_browserFrame1.html, test_browserFrame2.html, test_browserFrame3.html "iframeLoad is not defined"
A little knowledge is a dangerous thing, and that's about how much I have, a little.
Assignee: philringnalda → nobody
Okay, yeah, these tests are totally bogus.  :(
Attached patch Patch v1Splinter Review
Attachment #590431 - Flags: review?(philringnalda)
Attachment #590424 - Attachment is obsolete: true
Philor, feel free to push this.  If you don't get around to it tonight, I'll push in the morning.
Comment on attachment 590431 [details] [diff] [review]
Patch v1

Pretty sure that's what we want to do, but based on my track record so far tonight, I asked the try server to back me up in
Attachment #590431 - Flags: review?(philringnalda) → review+
At least three of the tests didn't have this failure.  The Windows tests are still pending (??), but I'm going to push anyway.
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
(In reply to TinderboxPushlog Robot from comment #24)
> sgautherie
> Rev3 WINNT 5.1 try opt test mochitests-3/5 on 2012-01-21 15:16:20

This one happened before comment 22 fix.
Whiteboard: [orange] → [orange][qa-]
Whiteboard: [orange][qa-] → [qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.