Sat, 03 Jan 2015 20:18:00 +0100
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.
1 <html>
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=299673
4 -->
5 <head>
6 <title>Test #1 for Bug 299673</title>
7 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
8 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 </head>
11 <body id="Body">
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=299673">Mozilla Bug 299673</a>
13 <p id="display">
15 <SELECT id="Select1" onchange="log(event); OpenWindow()" onfocus="log(event); " onblur="log(event)">
16 <OPTION selected>option1</OPTION>
17 <OPTION>option2</OPTION>
18 <OPTION>option3</OPTION>
19 </SELECT>
21 <INPUT id="Text1" type="text" onfocus="log(event)" onblur="log(event)">
22 <INPUT id="Text2" type="text" onfocus="log(event)" onblur="log(event)">
24 </p>
25 <div id="content" style="display: none">
27 </div>
29 <pre id="test">
31 <script src="bug299673.js"></script>
33 <script class="testbody" type="text/javascript">
35 /** Test #1 for Bug 299673 **/
36 function doTest(expectedEventLog) {
37 var eventLogForNewWindow = '\
38 : Test with browser.link.open_newwindow = 2\n\
39 : focus top-doc\n\
40 SELECT(Select1): focus \n\
41 SELECT(Select1): change \n\
42 : >>> OpenWindow\n\
43 : blur top-doc\n\
44 : focus popup-doc\n\
45 INPUT(popupText1): focus \n\
46 : <<< OpenWindow\n\
47 SELECT(Select1): blur \n\
48 INPUT(popupText1): blur \n\
49 : blur popup-doc\n\
50 : focus top-doc\n\
51 '
53 setPrefAndDoTest(eventLogForNewWindow,'Body',2); // 2 = open new window as window
54 }
56 todo(false, "Please write a test for bug 299673 that actually works");
58 </script>
59 </pre>
60 </body>
61 </html>