mirror of
				https://github.com/mozilla/gecko-dev.git
				synced 2025-10-31 16:28:05 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			549 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			549 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 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");
 | |
| }
 | 
