summaryrefslogtreecommitdiffstats
path: root/dom/xbl/test/file_bug950909.xml
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/xbl/test/file_bug950909.xml
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/xbl/test/file_bug950909.xml')
-rw-r--r--dom/xbl/test/file_bug950909.xml37
1 files changed, 37 insertions, 0 deletions
diff --git a/dom/xbl/test/file_bug950909.xml b/dom/xbl/test/file_bug950909.xml
new file mode 100644
index 000000000..c711d9ed4
--- /dev/null
+++ b/dom/xbl/test/file_bug950909.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<bindings id="chromeTestBindings" xmlns="http://www.mozilla.org/xbl">
+ <binding id="testBinding" bindToUntrustedContent="true">
+ <implementation implements="nsIObserver">
+ <constructor>
+ <![CDATA[
+ // This binding gets applied to a content object, and thus is actually
+ // running in a content XBL scope.
+ var win = XPCNativeWrapper.unwrap(window);
+ var SpecialPowers = win.SpecialPowers;
+ var ok = SpecialPowers.unwrap(SpecialPowers.wrap(window).parent.ok);
+ ok(win != window, "Should be running in an XBL scope with Xrays");
+
+ // Generate an XPCWrappedJS for the reflector. We need to do this
+ // explicitly with a testing helper, because we're converging on
+ // removing XPConnect from the web, which means that it won't be
+ // possible to generate an XPCWrappedJS from content (or XBL) code.
+ var scope = {};
+ var holder = SpecialPowers.Cu.generateXPCWrappedJS(this, scope);
+
+ // Now, QI |this|, which will generate an aggregated native.
+ this.QueryInterface(Components.interfaces.nsIObserver);
+
+ ok(true, "Didn't assert or crash");
+
+ SpecialPowers.wrap(window).parent.SimpleTest.finish();
+ ]]>
+ </constructor>
+ <method name="observe">
+ <parameter name="aSubject"/>
+ <parameter name="aTopic"/>
+ <parameter name="aData"/>
+ <body><![CDATA[]]></body>
+ </method>
+ </implementation>
+ </binding>
+</bindings>