content/base/test/file_x-frame-options_main.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/file_x-frame-options_main.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +<html>
     1.5 +<head>
     1.6 +<title>X-Frame-Options tests</title>
     1.7 +<script type="text/javascript">
     1.8 +// This frame loading means all subframes have either loaded or errored out.  We
     1.9 +// can now tell the test harness to check each subframe for the expected result.
    1.10 +window.addEventListener('load', parent.testFramesLoaded, false);
    1.11 +</script>
    1.12 +</head>
    1.13 +<body>
    1.14 +
    1.15 +<iframe id="control1" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=control1"></iframe><br>
    1.16 +<iframe id="control2" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=control2"></iframe><br>
    1.17 +<iframe id="deny" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=deny&xfo=deny"></iframe><br>
    1.18 +<iframe id="sameorigin1" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin1&xfo=sameorigin"></iframe><br>
    1.19 +<iframe id="sameorigin2" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin2&xfo=sameorigin"></iframe><br>
    1.20 +<iframe id="sameorigin5" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin5&xfo=sameorigin2"></iframe><br>
    1.21 +<iframe id="sameorigin6" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin6&xfo=sameorigin2"></iframe><br>
    1.22 +<iframe id="sameorigin7" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin7&xfo=sameorigin3"></iframe><br>
    1.23 +<iframe id="sameorigin8" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin8&xfo=sameorigin3"></iframe><br>
    1.24 +<iframe id="mixedpolicy" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=mixedpolicy&xfo=mixedpolicy"></iframe><br>
    1.25 +<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>
    1.26 +<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>
    1.27 +<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>
    1.28 +<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>
    1.29 +
    1.30 +<!-- added for bug 836132 -->
    1.31 +<script type="text/javascript">
    1.32 +
    1.33 +  function addFrame(test, xfo) {
    1.34 +    var baseurl = "http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs";
    1.35 +    var ifr = "<iframe id='" + test + "'" + "src='" + baseurl + "?testid=" + test + "&xfo=" + xfo + "' style='border:2px solid red;'></iframe>";
    1.36 +    document.write(ifr);
    1.37 +  }
    1.38 +
    1.39 +  addFrame("allow-from-allow-1", "afa1");
    1.40 +  for (var i = 1; i<=14; i++)
    1.41 +    addFrame("allow-from-deny-"+i, "afd"+i);
    1.42 +
    1.43 +</script>
    1.44 +
    1.45 +
    1.46 +</body>
    1.47 +</html>

mercurial