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 <!DOCTYPE html>
2 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
3 <script>
4 // Make sure that we cannot open private browsing windows from unprivileged content
5 var win = window.open("about:blank", "_blank", "private");
6 ok(!SpecialPowers.isWindowPrivate(win));
7 win.close();
8 // Also, make sure that passing non-private doesn't make any difference either
9 win = window.open("about:blank", "_blank", "non-private");
10 ok(!SpecialPowers.isWindowPrivate(win));
11 win.close();
12 </script>