summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_bug609700.js
blob: 923e816f81660a4e61924fd2bd7fbf5277471587 (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
25
26
27
28
function test() {
  waitForExplicitFinish();

  Services.ww.registerNotification(function notification(
    aSubject,
    aTopic,
    aData
  ) {
    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");
}