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 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
2 class="reftest-wait"
3 onload="
4 var result = '';
5 try {
6 document.commandDispatcher.advanceFocusIntoSubtree({});
7 result += '1';
8 } catch (ex) {
9 result += '.';
10 }
12 try {
13 document.commandDispatcher.advanceFocusIntoSubtree(document.documentElement);
14 result += '2';
15 } catch (ex) {
16 result += '.';
17 }
19 try {
20 document.commandDispatcher.advanceFocusIntoSubtree(null);
21 result += '3';
22 } catch (ex) {
23 result += '.';
24 }
26 try {
27 document.commandDispatcher.focusedElement = {};
28 result += '4';
29 } catch (ex) {
30 result += '.';
31 }
33 try {
34 document.commandDispatcher.focusedElement = document.documentElement;
35 result += '5';
36 } catch (ex) {
37 result += '.';
38 }
40 try {
41 document.commandDispatcher.focusedElement = null;
42 result += '6';
43 } catch (ex) {
44 result += '.';
45 }
47 try {
48 document.popupNode = {};
49 result += '7';
50 } catch (ex) {
51 result += '.';
52 }
54 try {
55 document.popupNode = document.documentElement;
56 result += '8';
57 } catch (ex) {
58 result += '.';
59 }
61 try {
62 document.popupNode = null;
63 result += '9';
64 } catch (ex) {
65 result += '.';
66 }
68 try {
69 document.commandDispatcher.focusedWindow = {};
70 result += 'a';
71 } catch (ex) {
72 result += '.';
73 }
75 try {
76 document.commandDispatcher.focusedWindow = null;
77 result += 'b';
78 } catch (ex) {
79 result += '.';
80 }
82 try {
83 document.commandDispatcher.focusedWindow = window;
84 result += 'c';
85 } catch (ex) {
86 result += '.';
87 }
89 document.documentElement.textContent = result == '.23.56.89.bc' ? 'PASSED' : 'FAILED';
90 if (document.documentElement.textContent == 'PASSED') {
91 document.documentElement.removeAttribute('class');
92 }
93 "/>