browser_UITour_showNewTab.js (577B)
1 "use strict"; 2 3 var gTestTab; 4 var gContentAPI; 5 6 add_task(setup_UITourTest); 7 8 // Test that we can switch to about:newtab 9 add_UITour_task(async function test_aboutNewTab() { 10 let newTabLoaded = BrowserTestUtils.browserLoaded( 11 gBrowser.selectedBrowser, 12 false, 13 "about:newtab" 14 ); 15 info("Showing about:newtab"); 16 await gContentAPI.showNewTab(); 17 info("Waiting for about:newtab to load"); 18 await newTabLoaded; 19 is( 20 gBrowser.selectedBrowser.currentURI.spec, 21 "about:newtab", 22 "Loaded about:newtab" 23 ); 24 ok(gURLBar.focused, "Address bar gets focus"); 25 });