diff options
Diffstat (limited to 'netwerk/test/unit/test_cookies_privatebrowsing.js')
-rw-r--r-- | netwerk/test/unit/test_cookies_privatebrowsing.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/netwerk/test/unit/test_cookies_privatebrowsing.js b/netwerk/test/unit/test_cookies_privatebrowsing.js index 9d3528440a..dab719954e 100644 --- a/netwerk/test/unit/test_cookies_privatebrowsing.js +++ b/netwerk/test/unit/test_cookies_privatebrowsing.js @@ -96,10 +96,21 @@ add_task(async () => { Services.cookies.setCookieStringFromHttp(uri2, "oh=hai; max-age=1000", chan2); Assert.equal(await getCookieStringFromPrivateDocument(uri2.spec), "oh=hai"); + // on android fission the privateBrowsingHolder prevents + // the cookies on the content process from being updated + // Let's release the last PB window. + await privateBrowsingHolder.close(); + // Fake a profile change. await promise_close_profile(); do_load_profile(); + // keep the private browsing window open again + const privateBrowsingHolder2 = await CookieXPCShellUtils.loadContentPage( + "http://bar.com/", + { privateBrowsing: true } + ); + // We're still in private browsing mode, but should have a new session. // Check counts. Assert.equal(await getCookieStringFromPrivateDocument(uri1.spec), ""); @@ -127,6 +138,6 @@ add_task(async () => { Assert.equal(Services.cookies.countCookiesFromHost(uri2.host), 0); // Let's release the last PB window. - privateBrowsingHolder.close(); + await privateBrowsingHolder2.close(); Services.prefs.clearUserPref("dom.security.https_first"); }); |