Verify that Referer Policy within Content-Disposition:attachment sandbox is always...
[WebKit-https.git] / LayoutTests / http / tests / contentdispositionattachmentsandbox / resources / referer-header-stripped.js
1 if (window.internals)
2     internals.settings.setContentDispositionAttachmentSandboxEnabled(true);
3
4 if (window.testRunner) {
5     testRunner.dumpAsText();
6     testRunner.dumpChildFramesAsText();
7     testRunner.waitUntilDone();
8 }
9
10 function navigation() {
11     // Due to the sandbox, it's not possible to run script in the iframe or even access its contentDocument.
12     var element = document.getElementsByTagName("iframe")[0];
13     var x = element.offsetLeft + 10;
14     var y = element.offsetTop + 10;
15
16     if (window.testRunner) {
17         if (window.eventSender) {
18             eventSender.mouseMoveTo(x, y);
19             eventSender.mouseDown();
20             eventSender.mouseUp();
21         }
22
23         if (testRunner.runUIScript)
24             testRunner.runUIScript("(function() { uiController.singleTapAtPoint(" + x + ", " + y + "); })()");
25     }
26 }