mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
22 lines
574 B
JavaScript
22 lines
574 B
JavaScript
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
Services.ww.registerNotification(function (aSubject, aTopic, aData) {
|
|
if (aTopic == "domwindowopened") {
|
|
Services.ww.unregisterNotification(arguments.callee);
|
|
|
|
ok(true, "duplicateTabIn opened a new window");
|
|
|
|
aSubject.addEventListener("load", function () {
|
|
aSubject.removeEventListener("load", arguments.callee, false);
|
|
executeSoon(function () {
|
|
aSubject.close();
|
|
finish();
|
|
});
|
|
}, false);
|
|
}
|
|
});
|
|
|
|
duplicateTabIn(gBrowser.selectedTab, "window");
|
|
}
|