browser_invalid_href_fallback.js (946B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 add_task(async () => { 5 const testPath = 6 // eslint-disable-next-line @microsoft/sdl/no-insecure-url 7 "http://example.com/browser/browser/base/content/test/favicons/"; 8 // eslint-disable-next-line @microsoft/sdl/no-insecure-url 9 const expectedIcon = "http://example.com/favicon.ico"; 10 11 await BrowserTestUtils.withNewTab( 12 { gBrowser, url: "about:blank" }, 13 async browser => { 14 let faviconPromise = waitForLinkAvailable(browser); 15 BrowserTestUtils.startLoadingURIString( 16 browser, 17 testPath + "file_invalid_href.html" 18 ); 19 await BrowserTestUtils.browserLoaded(browser); 20 21 let iconURI = await faviconPromise; 22 Assert.equal( 23 iconURI, 24 expectedIcon, 25 "Should have fallen back to the default site favicon for an invalid href attribute" 26 ); 27 } 28 ); 29 });