forked from mirrors/gecko-dev
		
	MozReview-Commit-ID: KMgNw5QsMIX --HG-- extra : rebase_source : b3f3e2dbd568e88c0e8461fb4bfadbbdd9baaa99
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/* Any copyright is dedicated to the Public Domain.
 | 
						|
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 | 
						|
 | 
						|
add_task(async function test_blank() {
 | 
						|
  await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
 | 
						|
                                    async function(browser) {
 | 
						|
    BrowserTestUtils.loadURI(browser, "http://example.com");
 | 
						|
    await BrowserTestUtils.browserLoaded(browser);
 | 
						|
    ok(!gBrowser.canGoBack, "about:blank wasn't added to session history");
 | 
						|
  });
 | 
						|
});
 | 
						|
 | 
						|
add_task(async function test_newtab() {
 | 
						|
  await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
 | 
						|
                                    async function(browser) {
 | 
						|
    // Can't load it directly because that'll use a preloaded tab if present.
 | 
						|
    BrowserTestUtils.loadURI(browser, "about:newtab");
 | 
						|
    await BrowserTestUtils.browserLoaded(browser);
 | 
						|
 | 
						|
    BrowserTestUtils.loadURI(browser, "http://example.com");
 | 
						|
    await BrowserTestUtils.browserLoaded(browser);
 | 
						|
    is(gBrowser.canGoBack, true, "about:newtab was added to the session history when AS was enabled.");
 | 
						|
  });
 | 
						|
});
 |