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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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