webarchive/loading/mainresource-null-mimetype-crash.html / webarchive/loading/missing...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jun 2017 20:09:05 +0000 (20:09 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jun 2017 20:09:05 +0000 (20:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172823

Reviewed by Alexey Proskuryakov.

Rewrite webarchive/loading/mainresource-null-mimetype-crash.html / webarchive/loading/missing-data.html
to address flakiness. We now navigate a subframe instead of the main frame. We also mark the test as
asynchronous and wait for the subframe to finish loading before calling testRunner.notifyDone().

* platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt:
* webarchive/loading/mainresource-null-mimetype-crash.html:
* webarchive/loading/missing-data-expected.txt:
* webarchive/loading/missing-data.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt
LayoutTests/webarchive/loading/mainresource-null-mimetype-crash.html
LayoutTests/webarchive/loading/missing-data-expected.txt
LayoutTests/webarchive/loading/missing-data.html

index c332f85..3b0fba8 100644 (file)
@@ -1,3 +1,19 @@
+2017-06-01  Chris Dumez  <cdumez@apple.com>
+
+        webarchive/loading/mainresource-null-mimetype-crash.html / webarchive/loading/missing-data.html are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=172823
+
+        Reviewed by Alexey Proskuryakov.
+
+        Rewrite webarchive/loading/mainresource-null-mimetype-crash.html / webarchive/loading/missing-data.html
+        to address flakiness. We now navigate a subframe instead of the main frame. We also mark the test as
+        asynchronous and wait for the subframe to finish loading before calling testRunner.notifyDone().
+
+        * platform/mac/webarchive/loading/mainresource-null-mimetype-crash-expected.txt:
+        * webarchive/loading/mainresource-null-mimetype-crash.html:
+        * webarchive/loading/missing-data-expected.txt:
+        * webarchive/loading/missing-data.html:
+
 2017-06-01  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Bump GTK+ and its dependencies in jhbuild
index 3c3cdac..b9e01c5 100644 (file)
@@ -1,6 +1,11 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-main frame - willPerformClientRedirectToURL: resources/mainresource-null-mimetype.webarchive 
 main frame - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 
index e4fdb98..08db4c6 100644 (file)
@@ -2,8 +2,16 @@
 <script>
     if (window.testRunner) {
         testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+    onload = function() {
+        frame = document.createElement("iframe");
+        frame.src = "resources/mainresource-null-mimetype.webarchive";
+        frame.onload = function() {
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+        document.body.appendChild(frame);
     }
-    
-    window.location="resources/mainresource-null-mimetype.webarchive";
 </script>
 </html>
index 0985276..b9e01c5 100644 (file)
@@ -1,6 +1,11 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-main frame - willPerformClientRedirectToURL: resources/missing-data.webarchive 
 main frame - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 
index 5017411..cc827be 100644 (file)
@@ -1,5 +1,16 @@
 <script>
-    if (window.testRunner)
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
         testRunner.dumpAsText();
-    window.location="resources/missing-data.webarchive";
+    }
+
+    onload = function() {
+        frame = document.createElement("iframe");
+        frame.src = "resources/missing-data.webarchive";
+        frame.onload = function() {
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+        document.body.appendChild(frame);
+    }
 </script>