+2016-01-12 Jiewen Tan <jiewen_tan@apple.com>
+
+ 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 <adam.bergkvist@ericsson.com>
WebRTC: Update RTCPeerConnection.add/removeTrack() and add test
--- /dev/null
+<!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 = 'javascript:window.top.maybeStart();';
+ 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 = 'javascript:window.top.navigateThere();';
+ };
+ firstFrame.src = 'javascript:window.top.navigateHere();';
+
+ 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='javascript:window.top.navigateThereNested();';
+ 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>