Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / security / calling-versus-current.html
blob3714679f6aafbf62599c23ed94d6d3488e0a6230
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <script>
9 if (document.location.hostname == "127.0.0.1") {
10 document.location.hostname = "subdomain.example.test";
11 } else {
12 var t = async_test("Calling context doesn't change via document.domain.");
14 t.step(function () {
15 var i = document.createElement('iframe');
16 i.src = 'resources/innocent-victim.html';
17 i.onload = t.step_func(function () {
18 window.f = frames[0].atob;
19 document.domain = 'example.test';
20 assert_equals(btoa(window.f('PASS')), 'PASS');
21 t.done();
22 });
23 document.body.appendChild(i);
24 });
26 </script>
27 </body>
28 </html>