[Webkit-unassigned] [Bug 54942] In layout tests, iframe's onload handler should not use script function defined after the iframe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 1 15:00:28 PST 2011


--- Comment #24 from Tony Gentilcore <tonyg at chromium.org>  2011-03-01 15:00:28 PST ---
(In reply to comment #23)
> (From update of attachment 84296 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=84296&action=review
> > LayoutTests/editing/execCommand/find-after-replace.html:7
> > +<body onload="runTest()">
> >  <script>
> >  if (window.layoutTestController)
> >       layoutTestController.dumpEditingCallbacks();
> >  </script>
> >  <p>This tests find and replace inside an editable iframe.  You should see 'A B A B' below. With bug 4462420, you would see 'A B B A'.</p>
> > -<iframe onload="runTest()" src="../resources/contenteditable-iframe-src.html"></iframe>
> > +<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
> This can’t be right. It’s possible the top level document will finish loading before its subframes, right? I think we need to make these tests run when both have loaded. Am I missing something?

A loading subframe will block the window's onload event (see FrameLoader::checkCompleted). The case you are probably thinking of is that if the parser never yields throughout the course of parsing, the onload event for the body will fire before the onload event for the iframe. However, in this case the iframe doesn't have an onload event so it doesn't matter.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list