1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/browser-element/mochitest/file_browserElement_XFrameOptionsAllowFrom.sjs Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +function handleRequest(request, response) 1.5 +{ 1.6 + var content = 'step 1'; 1.7 + if (request.queryString == "iframe1") { 1.8 + response.setHeader("X-Frame-Options", "Allow-From http://mochi.test:8888/") 1.9 + content = 'finish'; 1.10 + } else { 1.11 + response.setHeader("X-Frame-Options", "Allow-From http://example.com") 1.12 + } 1.13 + 1.14 + response.setHeader("Content-Type", "text/html", false); 1.15 + 1.16 + // Tests rely on this page not being entirely blank, because they take 1.17 + // screenshots to determine whether this page was loaded. 1.18 + response.write("<html><body>XFrameOptions test<script>alert('" + content + "')</script></body></html>"); 1.19 +}