tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

back-forward-cache-with-closed-webtransport-connection.https.window.js (930B)


      1 // META: title=Testing BFCache support for page with closed WebTransport connection.
      2 // META: script=/common/dispatcher/dispatcher.js
      3 // META: script=/common/get-host-info.sub.js
      4 // META: script=/common/utils.js
      5 // META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
      6 // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
      7 // META: script=resources/webtransport-test-helpers.sub.js
      8 
      9 'use strict';
     10 
     11 promise_test(async t => {
     12  const rcHelper = new RemoteContextHelper();
     13 
     14  // Open a window with noopener so that BFCache will work.
     15  const rc1 = await rcHelper.addWindow(
     16      /*config=*/ null, /*options=*/ { features: 'noopener' });
     17  await openThenCloseWebTransport(rc1);
     18  // The page should be eligible for BFCache because the WebTransport connection is closed.
     19  await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ true);
     20 });