michael@0: function test () { michael@0: // Load `constructor` as global since tabs uses `traits` michael@0: // that use this module michael@0: let loader = makeLoader({ globals: constructor }); michael@0: let module = Module("./main", "scratchpad://"); michael@0: let require = Require(loader, module); michael@0: michael@0: let tabs = require("sdk/tabs"); michael@0: michael@0: tabs.open({ michael@0: url: "about:blank", michael@0: onReady: function (tab) { michael@0: is(tab.url, "about:blank", "correct uri for tab"); michael@0: is(tabs.activeTab, tab, "correctly active tab"); michael@0: tab.close(finish); michael@0: } michael@0: }); michael@0: }