Title: [192069] trunk/LayoutTests
Revision
192069
Author
[email protected]
Date
2015-11-05 12:37:24 -0800 (Thu, 05 Nov 2015)

Log Message

Add regression test for Bug 150937
https://bugs.webkit.org/show_bug.cgi?id=150937

Reviewed by Geoffrey Garen.

Add regression test for Bug 150937:
Regression(r192038): Safari cannot load any pages

The new test makes sure that load deferring works as intended. The fix
for this already landed in r192060.

* loader/load-defer-expected.txt: Added.
* loader/load-defer.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (192068 => 192069)


--- trunk/LayoutTests/ChangeLog	2015-11-05 20:23:02 UTC (rev 192068)
+++ trunk/LayoutTests/ChangeLog	2015-11-05 20:37:24 UTC (rev 192069)
@@ -1,3 +1,19 @@
+2015-11-05  Chris Dumez  <[email protected]>
+
+        Add regression test for Bug 150937
+        https://bugs.webkit.org/show_bug.cgi?id=150937
+
+        Reviewed by Geoffrey Garen.
+
+        Add regression test for Bug 150937:
+        Regression(r192038): Safari cannot load any pages
+
+        The new test makes sure that load deferring works as intended. The fix
+        for this already landed in r192060.
+
+        * loader/load-defer-expected.txt: Added.
+        * loader/load-defer.html: Added.
+
 2015-11-05  Brady Eidson  <[email protected]>
 
         Modern IDB: Implement IDBIndex get/getKey/count requests.

Added: trunk/LayoutTests/loader/load-defer-expected.txt (0 => 192069)


--- trunk/LayoutTests/loader/load-defer-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/loader/load-defer-expected.txt	2015-11-05 20:37:24 UTC (rev 192069)
@@ -0,0 +1,3 @@
+ALERT: Test that load deferring works as intended.
+ALERT: PASS: The frame loaded after loads were resumed.
+

Added: trunk/LayoutTests/loader/load-defer.html (0 => 192069)


--- trunk/LayoutTests/loader/load-defer.html	                        (rev 0)
+++ trunk/LayoutTests/loader/load-defer.html	2015-11-05 20:37:24 UTC (rev 192069)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+var testFrame;
+
+function loadedTooEarly()
+{
+    alert("FAIL: The frame loaded while loads were deferred.");
+    testRunner.notifyDone();
+}
+
+function passAndFinish()
+{
+    alert("PASS: The frame loaded after loads were resumed.");
+    testRunner.notifyDone();
+}
+
+function resumeLoads()
+{
+    testFrame._onload_ = passAndFinish;
+    if (window.testRunner)
+        testRunner.setDefersLoading(false);
+}
+
+function runTest()
+{
+    alert("Test that load deferring works as intended.");
+    if (window.testRunner)
+        testRunner.setDefersLoading(true);
+
+    testFrame = document.createElement("iframe");
+    testFrame._onload_ = loadedTooEarly;
+    testFrame.src = ""
+    document.body.appendChild(testFrame);
+    setTimeout(resumeLoads, 100);
+}
+
+</script>
+<body _onload_='runTest()'>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to