https://github.com/web-platform-tests/wpt
Raw File
Tip revision: c952312a927eb56c33bf72d2062c6986cac96ff0 authored by Darwin Huang on 26 December 2018, 21:55:09 UTC
Async Clipboard Refactor: Update tests to use arrow functions
Tip revision: c952312
deny.sub.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<body>
<script>
  async_test(t => {
    var i = document.createElement('iframe');
    i.src = "./support/xfo.py?value=DENY";

    assert_no_message_from(i, t);

    i.onload = t.step_func_done(_ => {
      assert_equals(i.contentDocument, null);
      i.remove();
    });

    document.body.appendChild(i);
  }, "`XFO: DENY` blocks same-origin framing.");

  async_test(t => {
    var i = document.createElement('iframe');
    i.src = "http://{{domains[www]}}:{{ports[http][0]}}/x-frame-options/support/xfo.py?value=DENY";

    assert_no_message_from(i, t);

    i.onload = t.step_func_done(_ => {
      assert_equals(i.contentDocument, null);
      i.remove();
    });

    document.body.appendChild(i);
  }, "`XFO: DENY` blocks cross-origin framing.");
</script>
back to top