summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_bug609700.js
blob: 615b63c3d86869733a956df4587b458e37b3aca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function test() {
  waitForExplicitFinish();

  Services.ww.registerNotification(function notification(aSubject, aTopic) {
    if (aTopic == "domwindowopened") {
      Services.ww.unregisterNotification(notification);

      ok(true, "duplicateTabIn opened a new window");

      whenDelayedStartupFinished(
        aSubject,
        function () {
          executeSoon(function () {
            aSubject.close();
            finish();
          });
        },
        false
      );
    }
  });

  duplicateTabIn(gBrowser.selectedTab, "window");
}