summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html
blob: 7a94f1ce4a867ce98ddb2429b87d12c18c98d31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<meta charset="utf-8">
<title>Check that sandboxed iframe can navigate their self</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
  var t = async_test();
  onmessage = t.step_func((e) => {
    if (e.data == 'pushstatebackdone') t.done();
  });

  function doNavigation() {
    frames[0].postMessage('pushstateback', '*');
  }
</script>
<iframe id="child_frame" sandbox="allow-scripts" src="support/iframe-tried-to-be-navigated-by-history.html" onload="doNavigation();"></iframe>