[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
Sun Feb 27 17:35:25 PST 2011


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





--- Comment #15 from Xianzhu Wang <wangxianzhu at google.com>  2011-02-27 17:35:25 PST ---
(From update of attachment 83790)
View in context: https://bugs.webkit.org/attachment.cgi?id=83790&action=review

>>>> LayoutTests/editing/execCommand/find-after-replace.html:7

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

Sorry. The above P.S. are for other tests that moved onload handler from iframe to body.

For this particular test, it dumps render tree, so if I move the script block above the iframe, there will be a render tree change about an invisible text block. Moving the onload from iframe to body can avoid the change.

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