browser_multiple_pushState.js (729B)
1 add_task(async function test_multiple_pushState() { 2 await BrowserTestUtils.withNewTab( 3 { 4 gBrowser, 5 url: 6 // eslint-disable-next-line @microsoft/sdl/no-insecure-url 7 "http://example.org/browser/docshell/test/browser/file_multiple_pushState.html", 8 }, 9 async function (browser) { 10 // eslint-disable-next-line @microsoft/sdl/no-insecure-url 11 const kExpected = "http://example.org/bar/ABC/DEF?key=baz"; 12 13 let contentLocation = await SpecialPowers.spawn( 14 browser, 15 [], 16 async function () { 17 return content.document.location.href; 18 } 19 ); 20 21 is(contentLocation, kExpected); 22 is(browser.documentURI.spec, kExpected); 23 } 24 ); 25 });