summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html
blob: ad2943e2bb0977bb84139a7d20833e099da7370a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<!-- This behavior is not explicitly specified. -->

<iframe id=myframe name=framename></iframe>
<form id=myform target=framename action="resources/form.html"></form>

<script>
async_test(t => {
  myframe.onload = t.step_func_done(() => {
    assert_equals(
      myframe.contentDocument.location.pathname,
      '/html/semantics/forms/form-submission-0/resources/location.html');
  });
  myform.submit();
  myframe.contentDocument.location = 'resources/location.html';
}, 'Verifies that location navigations take precedence when following form submissions.');
</script>