-
Notifications
You must be signed in to change notification settings - Fork 54
/
deny.sub.html
34 lines (27 loc) · 931 Bytes
/
deny.sub.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!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>