Title: [189164] trunk
Revision
189164
Author
[email protected]
Date
2015-08-31 01:33:21 -0700 (Mon, 31 Aug 2015)

Log Message

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.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189163 => 189164)


--- trunk/LayoutTests/ChangeLog	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/ChangeLog	2015-08-31 08:33:21 UTC (rev 189164)
@@ -1,3 +1,26 @@
+2015-08-31  Antti Koivisto  <[email protected]>
+
+        REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=148533
+
+        Reviewed by Chris Dumez.
+
+        * 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.
+
 2015-08-30  Chris Fleizach  <[email protected]>
 
         AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change

Modified: trunk/LayoutTests/TestExpectations (189163 => 189164)


--- trunk/LayoutTests/TestExpectations	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/TestExpectations	2015-08-31 08:33:21 UTC (rev 189164)
@@ -582,5 +582,3 @@
 fast/dom/timer-fire-after-page-pause.html [ Skip ]
 
 webkit.org/b/148026 [ Debug ] animations/restart-after-scroll.html [ Skip ]
-
-webkit.org/b/148533 fast/dom/HTMLObjectElement/object-as-frame.html [ Pass Failure ]

Modified: trunk/LayoutTests/fast/dom/HTMLObjectElement/object-as-frame.html (189163 => 189164)


--- trunk/LayoutTests/fast/dom/HTMLObjectElement/object-as-frame.html	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/fast/dom/HTMLObjectElement/object-as-frame.html	2015-08-31 08:33:21 UTC (rev 189164)
@@ -47,7 +47,7 @@
 <body _onload_="runTests()">
 
 <iframe name="frame" src="" contents of iframe"></iframe>
-<object name="obj" type="text/html" data="" contents of frame"></object>
+<object name="obj" type="text/html" data="" contents of object"></object>
 
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt (189163 => 189164)


--- trunk/LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt	2015-08-31 08:33:21 UTC (rev 189164)
@@ -5,7 +5,6 @@
 http://127.0.0.1:8000/loading/resources/test2/protected-resource.php - didReceiveAuthenticationChallenge - Responding with wrongusername:wrongpassword
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame1-->-->" - didStartProvisionalLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
@@ -13,6 +12,7 @@
 frame "<!--framePath //<!--frame1-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame1-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame1-->-->" - didHandleOnloadEventsForFrame
+main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame1-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 This test makes sure that once WebCore preemptively sends out Basic credentials it thinks apply to a new resource, and that resource response with a 401 challenge, that it doesn't try to send the same wrong credentials a second time.

Modified: trunk/LayoutTests/http/tests/loading/basic-credentials-sent-automatically-expected.txt (189163 => 189164)


--- trunk/LayoutTests/http/tests/loading/basic-credentials-sent-automatically-expected.txt	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/http/tests/loading/basic-credentials-sent-automatically-expected.txt	2015-08-31 08:33:21 UTC (rev 189164)
@@ -5,7 +5,6 @@
 http://127.0.0.1:8000/loading/resources/subresources/protected-resource.php - didReceiveAuthenticationChallenge - Responding with first:first-pw
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame1-->-->" - didStartProvisionalLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
@@ -23,6 +22,7 @@
 frame "<!--framePath //<!--frame3-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame3-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame3-->-->" - didHandleOnloadEventsForFrame
+main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame3-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 This test makes sure that once an HTTP Basic Auth. protected path is authenticated once, urls that emanate from that path automatically have their credentials sent without a challenge.

Modified: trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt (189163 => 189164)


--- trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt	2015-08-31 08:33:21 UTC (rev 189164)
@@ -5,7 +5,6 @@
 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with wrongusername:wrongpassword
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame1-->-->" - didStartProvisionalLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
@@ -13,6 +12,7 @@
 frame "<!--framePath //<!--frame1-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame1-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame1-->-->" - didHandleOnloadEventsForFrame
+main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame1-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 This test makes sure that once WebCore preemptively sends out Basic credentials it thinks apply to a new resource, and that resource response with a 401 challenge, that it doesn't try to send the same wrong credentials a second time.

Modified: trunk/LayoutTests/platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt (189163 => 189164)


--- trunk/LayoutTests/platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt	2015-08-31 08:33:21 UTC (rev 189164)
@@ -5,7 +5,6 @@
 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with first:first-pw
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame1-->-->" - didStartProvisionalLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
@@ -23,6 +22,7 @@
 frame "<!--framePath //<!--frame3-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame3-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame3-->-->" - didHandleOnloadEventsForFrame
+main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame3-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 This test makes sure that once an HTTP Basic Auth. protected path is authenticated once, urls that emanate from that path automatically have their credentials sent without a challenge.

Modified: trunk/LayoutTests/webarchive/loading/object-expected.txt (189163 => 189164)


--- trunk/LayoutTests/webarchive/loading/object-expected.txt	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/LayoutTests/webarchive/loading/object-expected.txt	2015-08-31 08:33:21 UTC (rev 189164)
@@ -6,12 +6,12 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCancelClientRedirectForFrame
 main frame - didCommitLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+main frame - didHandleOnloadEventsForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 Loading this webarchive with an object should not crash.

Modified: trunk/Source/WebCore/ChangeLog (189163 => 189164)


--- trunk/Source/WebCore/ChangeLog	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/Source/WebCore/ChangeLog	2015-08-31 08:33:21 UTC (rev 189164)
@@ -1,3 +1,22 @@
+2015-08-31  Antti Koivisto  <[email protected]>
+
+        REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=148533
+
+        Reviewed by Chris Dumez.
+
+        <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.
+
 2015-08-30  Ryuan Choi  <[email protected]>
 
         [CoordinatedGraphics] Remove unnecessary two virtual methods from TiledBackingStoreClient

Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (189163 => 189164)


--- trunk/Source/WebCore/loader/SubframeLoader.cpp	2015-08-31 06:22:10 UTC (rev 189163)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp	2015-08-31 08:33:21 UTC (rev 189164)
@@ -320,8 +320,14 @@
         return nullptr;
 
     String referrerToUse = SecurityPolicy::generateReferrerHeader(ownerElement.document().referrerPolicy(), url, referrer);
+
+    // Prevent initial empty document load from triggering load events.
+    m_frame.document()->incrementLoadEventDelayCount();
+
     RefPtr<Frame> frame = m_frame.loader().client().createFrame(url, name, &ownerElement, referrerToUse, allowsScrolling, marginWidth, marginHeight);
 
+    m_frame.document()->decrementLoadEventDelayCount();
+
     if (!frame)  {
         m_frame.loader().checkCallImplicitClose();
         return nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to