mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 04:27:37 +00:00
17 lines
614 B
JavaScript
17 lines
614 B
JavaScript
function handleRequest(request, response)
|
|
{
|
|
var content = 'step 1';
|
|
if (request.queryString == "iframe1") {
|
|
response.setHeader("X-Frame-Options", "Allow-From http://mochi.test:8888/")
|
|
content = 'finish';
|
|
} else {
|
|
response.setHeader("X-Frame-Options", "Allow-From http://example.com")
|
|
}
|
|
|
|
response.setHeader("Content-Type", "text/html", false);
|
|
|
|
// Tests rely on this page not being entirely blank, because they take
|
|
// screenshots to determine whether this page was loaded.
|
|
response.write("<html><body>XFrameOptions test<script>alert('" + content + "')</script></body></html>");
|
|
}
|