forked from mirrors/gecko-dev
		
	 ef235398aa
			
		
	
	
		ef235398aa
		
	
	
	
	
		
			
			And make callers rely on that instead of allowInheritPrincipal when creating lazy tabs. Unlike allowInheritPrincipal, skipLoad sets the nodefaultsrc attribute. This avoids a load instead of falling back to about:blank. One consequence of that is that switching to a lazy about:blank tab will not notify invoke listeners registered with addTabsProgressListener (listeners registered with addProgressListener will still be invoked). Thus test browser_open_in_lazy_tab.js needs to be updated. Differential Revision: https://phabricator.services.mozilla.com/D166012
		
			
				
	
	
		
			42 lines
		
	
	
	
		
			1,019 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
	
		
			1,019 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| "use strict";
 | |
| 
 | |
| /**
 | |
|  * Check that customize mode can be loaded in a lazy tab.
 | |
|  */
 | |
| add_task(async function open_customize_mode_in_lazy_tab() {
 | |
|   let tab = BrowserTestUtils.addTab(gBrowser, "about:blank", {
 | |
|     createLazyBrowser: true,
 | |
|   });
 | |
|   gCustomizeMode.setTab(tab);
 | |
| 
 | |
|   is(tab.linkedPanel, "", "Tab should be lazy");
 | |
| 
 | |
|   let title = gNavigatorBundle.getFormattedString("customizeMode.tabTitle", [
 | |
|     document.getElementById("bundle_brand").getString("brandShortName"),
 | |
|   ]);
 | |
|   is(tab.label, title, "Tab should have correct title");
 | |
| 
 | |
|   let customizePromise = BrowserTestUtils.waitForEvent(
 | |
|     gNavToolbox,
 | |
|     "customizationready"
 | |
|   );
 | |
|   gCustomizeMode.enter();
 | |
|   await customizePromise;
 | |
| 
 | |
|   is(
 | |
|     tab.getAttribute("customizemode"),
 | |
|     "true",
 | |
|     "Tab should be in customize mode"
 | |
|   );
 | |
| 
 | |
|   let customizationContainer = document.getElementById(
 | |
|     "customization-container"
 | |
|   );
 | |
|   is(
 | |
|     customizationContainer.hidden,
 | |
|     false,
 | |
|     "Customization container should be visible"
 | |
|   );
 | |
| 
 | |
|   await endCustomizing();
 | |
| });
 |