js/xpconnect/tests/chrome/test_bug743843.xul

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.

     1 <?xml version="1.0"?>
     2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
     3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
     4 <!--
     5 https://bugzilla.mozilla.org/show_bug.cgi?id=743843
     6 -->
     7 <window title="Mozilla Bug 743843"
     8         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
     9   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    11   <!-- test results are displayed in the html:body -->
    12   <body xmlns="http://www.w3.org/1999/xhtml">
    13   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=743843"
    14      target="_blank">Mozilla Bug 743843</a>
    15   </body>
    17   <!-- test code goes here -->
    18   <script type="application/javascript">
    19   <![CDATA[
    20   /** Test for Components.Exception options objects. **/
    22   // Note: We pass |window| as the 'data' field here because Components.Exception
    23   // doesn't handle JS Objects here all that nicely. See bug 743121.
    25   // Test the old interface.
    26   var e1 = Components.Exception('foo', Components.results.NS_BINDING_ABORTED, null, window);
    27   is(e1.result, Components.results.NS_BINDING_ABORTED, "Result should get set properly");
    28   is(e1.data, window, "User data should get set properly");
    30   // Test the options object.
    31   var e2 = Components.Exception('foo', { result: Components.results.NS_BINDING_ABORTED,
    32                                          data: window,
    33                                          foobar: 2 });
    34   is(e2.result, Components.results.NS_BINDING_ABORTED, "Result should get set properly");
    35   is(e2.data.window, window, "User data should get set properly");
    37   ]]>
    38   </script>
    39 </window>

mercurial