blob: f0f5c504ecc64c32ec8fb76618cd04119674d864 [file] [log] [blame]
<html>
<head>
<script src="resources/document-location.js"></script>
<script type="text/javascript">
testRunner.dumpAsText();
testRunner.waitUntilDone();
var myFrame;
function myCallbackFunction() {
myFrame.src = '#';
}
</script>
</head>
<body>
<p>This test verifies that setting the iframe.src through javascript to # does not add a history item. If the test passes you'll see only one history item.</p>
<script type="text/javascript">
let historyLength = history.length;
myFrame = document.createElement("iframe");
myFrame.src = "javascript:document.write('<script type=text/javascript>window.parent.myCallbackFunction();<\/script>'); document.close()";
myFrame.onload = () => {
document.body.appendChild(document.createTextNode(
historyLength == history.length ? "PASS" : "FAIL"));
testRunner.notifyDone();
}
document.body.appendChild(myFrame);
</script>
</body>
</html>