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 xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=872273
4 -->
5 <head>
6 <bindings xmlns="http://www.mozilla.org/xbl">
7 <binding id="foo">
8 <implementation>
9 <method name="throwSomething" exposeToUntrustedContent="true">
10 <body>
11 throw new Error("foopy");
12 </body>
13 </method>
14 </implementation>
15 </binding>
16 </bindings>
17 <title>Test for Bug 872273</title>
18 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
19 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
20 </head>
21 <body>
22 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=872273">Mozilla Bug 872273</a>
23 <p id="display" style="-moz-binding: url(#foo)"></p>
24 <div id="content" style="display: none">
25 </div>
26 <pre id="test">
27 <script type="application/javascript">
28 <![CDATA[
30 /** Test for Bug 872273 **/
31 SimpleTest.waitForExplicitFinish();
32 addLoadEvent(function() {
34 // Prevent the test from failing when the exception hits onerror.
35 SimpleTest.expectUncaughtException();
37 // Tell the test to expect exactly one console error with the given parameters,
38 // with SimpleTest.finish as a continuation function.
39 SimpleTest.monitorConsole(SimpleTest.finish, [{errorMessage: new RegExp('foopy')}]);
41 // Schedule the console accounting (and continuation) to run next, right
42 // after we throw (below).
43 SimpleTest.executeSoon(SimpleTest.endMonitorConsole);
45 // Throw.
46 $('display').throwSomething();
47 });
49 ]]>
50 </script>
51 </pre>
52 </body>
53 </html>