editor/libeditor/base/crashtests/382527-1.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 class="reftest-wait">
michael@0 3 <head>
michael@0 4 <script>
michael@0 5
michael@0 6
michael@0 7 function init1()
michael@0 8 {
michael@0 9 targetIframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
michael@0 10 targetIframe.src = "data:text/html,";
michael@0 11 targetIframe.setAttribute("style", "width: 300px; height: 200px; border: 1px dotted green;");
michael@0 12 targetIframe.addEventListener("load", init2, false);
michael@0 13 document.body.appendChild(targetIframe);
michael@0 14 }
michael@0 15
michael@0 16
michael@0 17 function init2()
michael@0 18 {
michael@0 19 targetWindow = targetIframe.contentWindow;
michael@0 20 targetDocument = targetWindow.document;
michael@0 21
michael@0 22 var div = document.getElementById("div");
michael@0 23 textNode = div.firstChild;
michael@0 24
michael@0 25 targetDocument.body.appendChild(targetDocument.adoptNode(div, true));
michael@0 26
michael@0 27 targetDocument.designMode = 'on';
michael@0 28 setTimeout(init3, 0);
michael@0 29 }
michael@0 30
michael@0 31
michael@0 32 function init3()
michael@0 33 {
michael@0 34 var rng = targetDocument.createRange();
michael@0 35 rng.setStart(textNode, 1);
michael@0 36 rng.setEnd(textNode, 1);
michael@0 37 targetWindow.getSelection().addRange(rng);
michael@0 38
michael@0 39 try {
michael@0 40 targetDocument.execCommand("inserthtml", false, "<p>");
michael@0 41 } catch(e) {}
michael@0 42
michael@0 43 document.documentElement.removeAttribute("class");
michael@0 44 }
michael@0 45
michael@0 46
michael@0 47 </script>
michael@0 48
michael@0 49 </head>
michael@0 50
michael@0 51 <body onload="init1();">
michael@0 52
michael@0 53 <div id="div"> </div>
michael@0 54
michael@0 55 <script>
michael@0 56 </script>
michael@0 57 </body>
michael@0 58 </html>

mercurial