[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
Sat Feb 26 18:19:53 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54942





--- Comment #14 from Xianzhu Wang <wangxianzhu at google.com>  2011-02-26 18:19:53 PST ---
(In reply to comment #13)
> (From update of attachment 83790 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=83790&action=review
> 
> >> LayoutTests/editing/execCommand/find-after-replace.html:7
> >> +<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
> > 
> > Rather than moving the runTest to the body's onload, why not just move the script block above the iframe? Same question on a few other tests.
> 
> This is to avoid expectation changes, especially for the tests that have platform rebaselines.
> 

P.S. more details:

The tests contain code like the following:

<iframe src="... onload="test()"></iframe>
<div id="console"></div>
<script>function test()  { ... getElementById("console")... } </script>

Because the "console" div is used in the test function which is possibly not ready when iframe onload is executed, it should be moved above the iframe, which will cause text expectation change. Moving the test() function from iframe onload to body onload can avoid the change.

A few tests depend on the behavior of iframe onload, so their expectation changes are unavoidable.

-- 
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