mirror of
				https://github.com/mozilla/gecko-dev.git
				synced 2025-10-31 16:28:05 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			509 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			509 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| function test() {
 | |
|   waitForExplicitFinish();
 | |
| 
 | |
|   var tab = BrowserTestUtils.addTab(gBrowser);
 | |
| 
 | |
|   tab.addEventListener(
 | |
|     "TabClose",
 | |
|     function () {
 | |
|       ok(
 | |
|         tab.linkedBrowser,
 | |
|         "linkedBrowser should still exist during the TabClose event"
 | |
|       );
 | |
| 
 | |
|       executeSoon(function () {
 | |
|         ok(
 | |
|           !tab.linkedBrowser,
 | |
|           "linkedBrowser should be gone after the TabClose event"
 | |
|         );
 | |
| 
 | |
|         finish();
 | |
|       });
 | |
|     },
 | |
|     { once: true }
 | |
|   );
 | |
| 
 | |
|   gBrowser.removeTab(tab);
 | |
| }
 | 
