[webkit-dev] Is this a possible source of test flakiness?

Xianzhu Wang phnixwxz at gmail.com
Mon Feb 21 17:19:59 PST 2011

+jnd at chromium.org

Johnny created a slightly different test case that can nearly constantly
reproduce the issue:

<div id="result">FAIL</div>
<iframe src="data:application/xhtml+xml,<?xml version='1.0'
encoding='UTF-8'?><body/>" onload="oniframeload()"></iframe>
<script src="some-script.js"></script>
function oniframeload() {
  document.getElementById("result").innerHTML = "SUCCESS";

I think it could prove what Adam said. The <script src...> element creates a

2011/2/22 Adam Barth <abarth at webkit.org>

> On Mon, Feb 21, 2011 at 3:42 PM, Darin Adler <darin at apple.com> wrote:
> > On Feb 20, 2011, at 8:19 PM, Xianzhu Wang wrote:
> >> My question is: Is this kind of usage (referencing a later-defined
> function in onload event handler) correct in theory?
> >
> > Yes.
> >
> > The contents of the onload attribute don’t matter until the load event
> fires, which is after the script element has been parsed.
> >
> >> Will it cause flakiness?
> >
> > No.
> In theory, it could, right?  If there was a network packet break
> between the two and the parser returned to the main event loop and the
> scheduler loaded the iframe load first.  Seems unlikely but possible.
> Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110222/b48b4ada/attachment.html>

More information about the webkit-dev mailing list