summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/loader/frame-location-change-not-added-to-history.html
blob: 35a28ef9660dc66d608acb73f9e7e2615e138960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<head>
<script> 
// Test that the very first navigation made on a newly created IFRAME does not
// create another session history entry, even if the IFRAME is already attached
// to the document and the page has fully loaded.
function runTest() {
  var f = document.createElement("iframe");
  document.body.appendChild(f);

  f.contentWindow.location = "data:,hello";

  f.onload = function() {
    document.body.innerText = "history.length = " + history.length;
    if (window.testRunner)
      testRunner.notifyDone();
  }
}

onunload = function() {
  // Disable page cache
}

onload = function() {
  if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpBackForwardList();
    testRunner.clearBackForwardList();
    testRunner.waitUntilDone();
  }
  setTimeout(runTest, 0);
}
</script> 
</head>
<body></body>