Title: [194919] trunk/LayoutTests
Revision
194919
Author
[email protected]
Date
2016-01-12 12:28:54 -0800 (Tue, 12 Jan 2016)

Log Message

Null dereference loading Blink layout test fast/frames/navigation-in-pagehide.html
https://bugs.webkit.org/show_bug.cgi?id=149303
<rdar://problem/22747634>

Reviewed by Brent Fulgham.

* imported/blink/fast/frames/navigation-in-pagehide-expected.txt: Added.
* imported/blink/fast/frames/navigation-in-pagehide.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (194918 => 194919)


--- trunk/LayoutTests/ChangeLog	2016-01-12 20:20:13 UTC (rev 194918)
+++ trunk/LayoutTests/ChangeLog	2016-01-12 20:28:54 UTC (rev 194919)
@@ -1,3 +1,14 @@
+2016-01-12  Jiewen Tan  <[email protected]>
+
+        Null dereference loading Blink layout test fast/frames/navigation-in-pagehide.html
+        https://bugs.webkit.org/show_bug.cgi?id=149303
+        <rdar://problem/22747634>
+
+        Reviewed by Brent Fulgham.
+
+        * imported/blink/fast/frames/navigation-in-pagehide-expected.txt: Added.
+        * imported/blink/fast/frames/navigation-in-pagehide.html: Added.
+
 2016-01-12  Adam Bergkvist  <[email protected]>
 
         WebRTC: Update RTCPeerConnection.add/removeTrack() and add test

Added: trunk/LayoutTests/imported/blink/fast/frames/navigation-in-pagehide-expected.txt (0 => 194919)


--- trunk/LayoutTests/imported/blink/fast/frames/navigation-in-pagehide-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/blink/fast/frames/navigation-in-pagehide-expected.txt	2016-01-12 20:28:54 UTC (rev 194919)
@@ -0,0 +1,4 @@
+This is a simple test that triggering a navigation from a pagehide handler in a frame being navigated doesn't crash.
+
+
+

Added: trunk/LayoutTests/imported/blink/fast/frames/navigation-in-pagehide.html (0 => 194919)


--- trunk/LayoutTests/imported/blink/fast/frames/navigation-in-pagehide.html	                        (rev 0)
+++ trunk/LayoutTests/imported/blink/fast/frames/navigation-in-pagehide.html	2016-01-12 20:28:54 UTC (rev 194919)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+var firstFrame;
+var secondFrame;
+var callbackCount = 0;
+
+function start() {
+  if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+  }
+
+  firstFrame = document.createElement('iframe');
+  document.body.appendChild(firstFrame);
+  var div = document.createElement('div');
+  firstFrame.appendChild(div);
+  secondFrame = document.createElement('iframe');
+  secondFrame.src = '';
+  div.appendChild(secondFrame);
+  var firstFrameRoot = firstFrame.contentDocument.documentElement;
+  document.documentElement.appendChild(div);
+  firstFrameRoot.appendChild(secondFrame);
+}
+
+function maybeStart() {
+  if (callbackCount++ > 1) {
+    reallyStart();
+    return;
+  }
+}
+
+function reallyStart(frame) {
+  secondFrame.contentWindow._onpagehide_ = function () {
+    firstFrame.src = '';
+  };
+  firstFrame.src = '';
+
+  if (window.location.hash == '#done') {
+    if (window.testRunner)
+      window.testRunner.notifyDone();
+    return;
+  }
+
+  window.setTimeout(function () {
+    window.location.hash = '#done';
+    window.location.reload();
+  }, 0);
+}
+
+function navigateHere() {
+  return 'a';
+}
+
+function navigateThere() {
+  firstFrame.src='';
+  return 'b';
+}
+
+function navigateThereNested() {
+  return 'c';
+}
+</script>
+</head>
+<body _onload_="start()">
+<p>This is a simple test that triggering a navigation from a pagehide handler in
+a frame being navigated doesn't crash.</p>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to