content/base/test/file_x-frame-options_main.html
author Margaret Leibovic <margaret.leibovic@gmail.com>
Mon, 25 Aug 2014 15:28:10 -0700
changeset 216776 8d7b3bfaf3ab9bb3c32afb51d9714246d7c854f4
parent 140605 e5f8c65894da148f3ef95e22a57f8a7ab510ed88
permissions -rw-r--r--
Bug 996753 - Telemetry probes for settings pages. r=liuche, a=sledru

<html>
<head>
<title>X-Frame-Options tests</title>
<script type="text/javascript">
// This frame loading means all subframes have either loaded or errored out.  We
// can now tell the test harness to check each subframe for the expected result.
window.addEventListener('load', parent.testFramesLoaded, false);
</script>
</head>
<body>

<iframe id="control1" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=control1"></iframe><br>
<iframe id="control2" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=control2"></iframe><br>
<iframe id="deny" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=deny&xfo=deny"></iframe><br>
<iframe id="sameorigin1" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin1&xfo=sameorigin"></iframe><br>
<iframe id="sameorigin2" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin2&xfo=sameorigin"></iframe><br>
<iframe id="sameorigin5" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin5&xfo=sameorigin2"></iframe><br>
<iframe id="sameorigin6" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin6&xfo=sameorigin2"></iframe><br>
<iframe id="sameorigin7" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin7&xfo=sameorigin3"></iframe><br>
<iframe id="sameorigin8" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin8&xfo=sameorigin3"></iframe><br>
<iframe id="mixedpolicy" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=mixedpolicy&xfo=mixedpolicy"></iframe><br>
<iframe id="allow-from-allow" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=allow-from-allow&xfo=afa"></iframe><br>
<iframe id="allow-from-deny" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=allow-from-deny&xfo=afd"></iframe><br>
<iframe id="sameorigin-multipart" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin-multipart&xfo=sameorigin&multipart=1"></iframe><br>
<iframe id="sameorigin-multipart2" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin-multipart2&xfo=sameorigin&multipart=1"></iframe><br>

<!-- added for bug 836132 -->
<script type="text/javascript">

  function addFrame(test, xfo) {
    var baseurl = "http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs";
    var ifr = "<iframe id='" + test + "'" + "src='" + baseurl + "?testid=" + test + "&xfo=" + xfo + "' style='border:2px solid red;'></iframe>";
    document.write(ifr);
  }

  addFrame("allow-from-allow-1", "afa1");
  for (var i = 1; i<=14; i++)
    addFrame("allow-from-deny-"+i, "afd"+i);

</script>


</body>
</html>