blob: 965dd81ee4f4a2a47168b08a0e73c27d74483a67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
function test () {
// Load `constructor` as global since tabs uses `traits`
// that use this module
let loader = makeLoader({ globals: constructor });
let module = Module("./main", "scratchpad://");
let require = Require(loader, module);
let tabs = require("sdk/tabs");
tabs.open({
url: "about:blank",
onReady: function (tab) {
is(tab.url, "about:blank", "correct uri for tab");
is(tabs.activeTab, tab, "correctly active tab");
tab.close(finish);
}
});
}
|