Skip to content

Commit

Permalink
Merge pull request #3268 from w3c/sync_dda62d1be9ecc35d3f1ee028e8b476…
Browse files Browse the repository at this point in the history
…4580f3549d

Merge pull request #3268 from sync_dda62d1be9ecc35d3f1ee028e8b4764580f3549d
  • Loading branch information
Ms2ger committed Jul 5, 2016
2 parents d04ffd4 + dda62d1 commit a6609cb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
@@ -0,0 +1,20 @@
<!doctype html>
<meta charset="utf-8">
<title>Navigating to the same URL with an empty fragment aborts the navigation</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe src="empty_fragment_iframe.html"></iframe>
<script>
// If the navigation were not aborted, we would expect multiple load events
// as the page continually reloads itself.
async_test(function(t) {
var count = 0;
var iframe = document.querySelector('iframe');
iframe.onload = t.step_func(function() {
count++;
});
window.child_succeeded = t.step_func_done(function() {
assert_equals(count, 1);
});
});
</script>
@@ -0,0 +1,11 @@
<script>
var timeout;
onload = function() {
location.hash = "";
timeout = setTimeout(function() { parent.child_succeeded() }, 2000);
};

onbeforeunload = function() {
clearTimeout(timeout);
}
</script>

0 comments on commit a6609cb

Please sign in to comment.