docshell/test/navigation/file_bug1326251_evict_cache.html
author Razvan Maries <rmaries@mozilla.com>
Sat, 18 Jan 2020 21:57:45 +0200
changeset 571223 fe6f34b2859f0706c88ec07199e30395041af258
parent 489577 e2ac39e3e6b7d3960570e13f6d7866477393f6b1
permissions -rw-r--r--
Backed out changeset b9df24255be1 (bug 1609665) for build bustages on ServiceWorkerManager.cpp. a=backout

<!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>