dom/xbl/test/file_bug950909.xml

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.

michael@0 1 <?xml version="1.0"?>
michael@0 2 <bindings id="chromeTestBindings" xmlns="http://www.mozilla.org/xbl">
michael@0 3 <binding id="testBinding">
michael@0 4 <implementation implements="nsIObserver">
michael@0 5 <constructor>
michael@0 6 <![CDATA[
michael@0 7 // This binding gets applied to a content object, and thus is actually
michael@0 8 // running in a content XBL scope.
michael@0 9 var win = XPCNativeWrapper.unwrap(window);
michael@0 10 var SpecialPowers = win.SpecialPowers;
michael@0 11 var ok = SpecialPowers.unwrap(SpecialPowers.wrap(window).parent.ok);
michael@0 12 ok(win != window, "Should be running in an XBL scope with Xrays");
michael@0 13
michael@0 14 // Generate an XPCWrappedJS for the reflector. We need to do this
michael@0 15 // explicitly with a testing helper, because we're converging on
michael@0 16 // removing XPConnect from the web, which means that it won't be
michael@0 17 // possible to generate an XPCWrappedJS from content (or XBL) code.
michael@0 18 var scope = {};
michael@0 19 var holder = SpecialPowers.Cu.generateXPCWrappedJS(this, scope);
michael@0 20
michael@0 21 // Now, QI |this|, which will generate an aggregated native.
michael@0 22 this.QueryInterface(Components.interfaces.nsIObserver);
michael@0 23
michael@0 24 ok(true, "Didn't assert or crash");
michael@0 25
michael@0 26 SpecialPowers.wrap(window).parent.SimpleTest.finish();
michael@0 27 ]]>
michael@0 28 </constructor>
michael@0 29 <method name="observe">
michael@0 30 <parameter name="aSubject"/>
michael@0 31 <parameter name="aTopic"/>
michael@0 32 <parameter name="aData"/>
michael@0 33 <body><![CDATA[]]></body>
michael@0 34 </method>
michael@0 35 </implementation>
michael@0 36 </binding>
michael@0 37 </bindings>

mercurial