(In reply to Olli Pettay [:smaug] (reviewing overload, no new review requests before June 1, pretty please) from bug 1104732 comment #12) > Hmm, indeed testing this reliably is hard since async may or may not be > loaded before DOMContentLoaded, depending on what kind of network packages > parser gets and what not. > Don't have good ideas now how to improve the test. > > or perhaps, what if you had something like > <script> > document.write("<script async src='file_async_bug1104732.sjs"'></script>"); > </script> > right at the end of the html file. That might make the test reliable enough. I'm not sure if this would work. We'd probably need to push to try and retrigger a lot to make sure we're not setting ourselves up for future intermittents.
well, you should have all the data for the document in the parser that point, so DOMContentLoaded should fire real soon, and if the async script is loading slowly, it should happen later.
Summary: Investigate improving the test for async script loads and DOMContentLoaded/load events → Investigate improving the test for bug 1104732 for async script loads and DOMContentLoaded/load events
You need to log in before you can comment on or make changes to this bug.