Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / unit / test_want_components.js
blob1c203c3e9d37531a60a1232c2d1e80a1763a835e
1 function run_test() {
2   var sb;
4   sb = Cu.Sandbox(this, {wantComponents: false});
5   Assert.equal(Cu.evalInSandbox("this.Components", sb), undefined);
6   Assert.equal(Cu.evalInSandbox("this.Services", sb), undefined);
8   sb = Cu.Sandbox(this, {wantComponents: true});
9   Assert.equal(Cu.evalInSandbox("typeof this.Components", sb), "object");
10   Assert.equal(Cu.evalInSandbox("typeof this.Services", sb), "object");
12   // wantComponents defaults to true.
13   sb = Cu.Sandbox(this, {});
14   Assert.equal(Cu.evalInSandbox("typeof this.Components", sb), "object");
15   Assert.equal(Cu.evalInSandbox("typeof this.Services", sb), "object");