tor-browser

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

request-cache-no-store.any.js (1319B)


      1 // META: global=window,worker
      2 // META: title=Request cache - no store
      3 // META: script=/common/utils.js
      4 // META: script=/common/get-host-info.sub.js
      5 // META: script=request-cache.js
      6 
      7 var tests = [
      8  {
      9    name: 'RequestCache "no-store" mode does not check the cache for previously cached content and goes to the network regardless',
     10    state: "stale",
     11    request_cache: ["default", "no-store"],
     12    expected_validation_headers: [false, false],
     13    expected_no_cache_headers: [false, true],
     14  },
     15  {
     16    name: 'RequestCache "no-store" mode does not check the cache for previously cached content and goes to the network regardless',
     17    state: "fresh",
     18    request_cache: ["default", "no-store"],
     19    expected_validation_headers: [false, false],
     20    expected_no_cache_headers: [false, true],
     21  },
     22  {
     23    name: 'RequestCache "no-store" mode does not store the response in the cache',
     24    state: "stale",
     25    request_cache: ["no-store", "default"],
     26    expected_validation_headers: [false, false],
     27    expected_no_cache_headers: [true, false],
     28  },
     29  {
     30    name: 'RequestCache "no-store" mode does not store the response in the cache',
     31    state: "fresh",
     32    request_cache: ["no-store", "default"],
     33    expected_validation_headers: [false, false],
     34    expected_no_cache_headers: [true, false],
     35  },
     36 ];
     37 run_tests(tests);