Created
May 2, 2013 04:45
-
-
Save darkowlzz/5500188 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let { promise } = require('sdk/window/helpers'); | |
console.log("foo1"); | |
promise(open('chrome://foo/content/'), 'load').then(function(window) { | |
console.log("foo2"); | |
assert.ok(~windows().indexOf(window), 'chrome URI works'); | |
console.log("foo3"); | |
return window; // pass window to next function | |
}).then(close). | |
then(promise.bind(null, 'resource://foo', 'load')).then(function(window) { | |
assert.ok(~windows().indexOf(window), 'resource URI works'); | |
console.log("foo4"); | |
return window; | |
}).then(close).then(done); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment