Skip to content

Commit

Permalink
HTML: fix joint session history test to not time out
Browse files Browse the repository at this point in the history
Part of #11269.
  • Loading branch information
zcorpan authored and stephenmcgruer committed Jan 27, 2020
1 parent 0dce1de commit 9083910
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
setup({timeout:10000});
var t = async_test("Session history length on initial load");
var t1 = async_test("Session history length on adding new iframe");
var t2 = async_test("Navigating second iframe");
Expand All @@ -13,6 +12,6 @@
var t5 = async_test("Traversing history back (2)");
var t6 = async_test("Traversing history forward");
var w = window.open("001-1.html");
//add_completion_callback(function() {w.close()});
add_completion_callback(function() {w.close()});
</script>

Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
document.body.appendChild(iframe);
o.assert_equals(history.length, 1);
frameloaded = o.t2.step_func(function() {
iframe.contentDocument.open();
iframe.contentDocument.write("3<script>onpageshow = function() {alert('pageshow'); parent.frameloaded()}<\/script>");
iframe.contentDocument.close();
frameloaded = o.t2.step_func(function () {
o.assert_equals(history.length, 2);
o.t2.done();
});
iframe.contentDocument.open();
iframe.contentDocument.write("3<script>parent.frameloaded();<\/script>");
iframe.contentDocument.close();
});
o.t1.done();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
setup({timeout:10000});
var t = async_test("Session history length on initial load");
var t1 = async_test("Session history length on adding new iframe");
var t2 = async_test("Navigating second iframe");
<!-- var t3 = async_test("Traversing history back (1)"); -->
<!-- var t4 = async_test("Navigating first iframe"); -->
<!-- var t5 = async_test("Traversing history back (2)"); -->
<!-- var t6 = async_test("Traversing history forward"); -->
// var t3 = async_test("Traversing history back (1)");
// var t4 = async_test("Navigating first iframe");
// var t5 = async_test("Traversing history back (2)");
// var t6 = async_test("Traversing history forward");
var w = window.open("002-1.html");
//add_completion_callback(function() {w.close()});
add_completion_callback(function() {w.close()});
</script>

0 comments on commit 9083910

Please sign in to comment.