js/xpconnect/tests/mochitest/file1_bug629227.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <script>
michael@0 5 function doIt() {
michael@0 6 var doc = window.frames[0].document;
michael@0 7 var ok = (doc.form1 == doc.getElementById("test1"));
michael@0 8 window.parent.postMessage(
michael@0 9 JSON.stringify({ ok: ok,
michael@0 10 reason: "Should be able to get named items by name" }),
michael@0 11 "*");
michael@0 12 window.parent.postMessage("finish", "*");
michael@0 13 }
michael@0 14
michael@0 15 window.onmessage = function(ev) {
michael@0 16 if (ev.data == "start") {
michael@0 17 doIt();
michael@0 18 }
michael@0 19 }
michael@0 20
michael@0 21 document.domain = "example.org";
michael@0 22 </script>
michael@0 23 </head>
michael@0 24 <body>
michael@0 25 <iframe id="subframe"></iframe>
michael@0 26 <script>
michael@0 27 document.getElementById("subframe").src =
michael@0 28 "http://test2.example.org" +
michael@0 29 location.pathname.replace(/file1_bug629227.html/, "file2_bug629227.html");
michael@0 30 </script>
michael@0 31 </body>
michael@0 32 </html>

mercurial