docshell/test/navigation/file_bug1326251_evict_cache.html
author Daisuke Akatsuka <dakatsuka@mozilla.com>
Tue, 26 Feb 2019 10:21:29 +0000
changeset 518943 383b6665578306219dd34b178353e100ca2848eb
parent 489577 e2ac39e3e6b7d3960570e13f6d7866477393f6b1
permissions -rw-r--r--
Bug 1525615: Introduce 'card' style. r=jdescottes,ladybenko Depends on D20295 Differential Revision: https://phabricator.services.mozilla.com/D20640

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bug 1326251</title>
    <script>
    SpecialPowers.Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);

    // Evict bfcache and then go back.
    async function evictCache() {
      let shistory = SpecialPowers.wrap(window)
                       .docShell
                       .QueryInterface(SpecialPowers.Ci.nsIWebNavigation)
                       .sessionHistory;
      shistory.legacySHistory.evictAllContentViewers();
      history.back();
    }
    </script>
  </head>
  <body onload="setTimeout(evictCache, 0);">
  </body>
</html>