REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Aug 2015 08:33:21 +0000 (08:33 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Aug 2015 08:33:21 +0000 (08:33 +0000)
commit5975f171c811a20b4801e64d6621aae1da2189e8
treef01eb28eaae21da5afbfec87af0582703acb0321
parentf194df95f15b13265f72a66346a0c1a40b739c99
REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148533

Reviewed by Chris Dumez.

Source/WebCore:

<object> element may cause document load event fire too early. By making data URL
loading faster r188820 made this condition more likely to trigger in this test.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):

    Post-parsing style recalc may trigger loads for <object> elements. If all other loads have already
    completed this may cause load event to fire synchronously from the initial empty document construction.

    Fix by preventing load events during subframe initialization. They will be fired if needed by the
    subsequent explicit call to FrameLoader::checkCompleted.

LayoutTests:

* TestExpectations:

    Unskip.

* fast/dom/HTMLObjectElement/object-as-frame.html:

    Use more logical text in the data url.

* http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* webarchive/loading/object-expected.txt:

    Update test results.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/dom/HTMLObjectElement/object-as-frame.html
LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt
LayoutTests/http/tests/loading/basic-credentials-sent-automatically-expected.txt
LayoutTests/platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt
LayoutTests/platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt
LayoutTests/webarchive/loading/object-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/loader/SubframeLoader.cpp