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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <title>X-Frame-Options tests</title>
michael@0 4 <script type="text/javascript">
michael@0 5 // This frame loading means all subframes have either loaded or errored out. We
michael@0 6 // can now tell the test harness to check each subframe for the expected result.
michael@0 7 window.addEventListener('load', parent.testFramesLoaded, false);
michael@0 8 </script>
michael@0 9 </head>
michael@0 10 <body>
michael@0 11
michael@0 12 <iframe id="control1" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=control1"></iframe><br>
michael@0 13 <iframe id="control2" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=control2"></iframe><br>
michael@0 14 <iframe id="deny" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=deny&xfo=deny"></iframe><br>
michael@0 15 <iframe id="sameorigin1" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin1&xfo=sameorigin"></iframe><br>
michael@0 16 <iframe id="sameorigin2" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin2&xfo=sameorigin"></iframe><br>
michael@0 17 <iframe id="sameorigin5" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin5&xfo=sameorigin2"></iframe><br>
michael@0 18 <iframe id="sameorigin6" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin6&xfo=sameorigin2"></iframe><br>
michael@0 19 <iframe id="sameorigin7" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin7&xfo=sameorigin3"></iframe><br>
michael@0 20 <iframe id="sameorigin8" src="http://example.com/tests/content/base/test/file_x-frame-options_page.sjs?testid=sameorigin8&xfo=sameorigin3"></iframe><br>
michael@0 21 <iframe id="mixedpolicy" src="http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs?testid=mixedpolicy&xfo=mixedpolicy"></iframe><br>
michael@0 22 <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>
michael@0 23 <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>
michael@0 24 <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>
michael@0 25 <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>
michael@0 26
michael@0 27 <!-- added for bug 836132 -->
michael@0 28 <script type="text/javascript">
michael@0 29
michael@0 30 function addFrame(test, xfo) {
michael@0 31 var baseurl = "http://mochi.test:8888/tests/content/base/test/file_x-frame-options_page.sjs";
michael@0 32 var ifr = "<iframe id='" + test + "'" + "src='" + baseurl + "?testid=" + test + "&xfo=" + xfo + "' style='border:2px solid red;'></iframe>";
michael@0 33 document.write(ifr);
michael@0 34 }
michael@0 35
michael@0 36 addFrame("allow-from-allow-1", "afa1");
michael@0 37 for (var i = 1; i<=14; i++)
michael@0 38 addFrame("allow-from-deny-"+i, "afd"+i);
michael@0 39
michael@0 40 </script>
michael@0 41
michael@0 42
michael@0 43 </body>
michael@0 44 </html>

mercurial