summaryrefslogtreecommitdiffstats
path: root/devtools/client/storage/test/browser_storage_dom_cache_disabled.js
blob: db0aca392cadd9be18de32d5505d127ecb7b0f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* import-globals-from ../../framework/test/shared-head.js */

"use strict";

// Test the storage inspector when dom.caches.enabled=false.

add_task(function* () {
  // Disable the DOM cache
  Services.prefs.setBoolPref(DOM_CACHE, false);

  yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html");

  const state = [
    [["localStorage", "http://test1.example.org"],
      ["ls1", "ls2"]],
    [["localStorage", "http://sectest1.example.org"],
      ["iframe-u-ls1"]],
    [["localStorage", "https://sectest1.example.org"],
      ["iframe-s-ls1"]],
    [["sessionStorage", "http://test1.example.org"],
      ["ss1"]],
    [["sessionStorage", "http://sectest1.example.org"],
      ["iframe-u-ss1", "iframe-u-ss2"]],
    [["sessionStorage", "https://sectest1.example.org"],
      ["iframe-s-ss1"]],
    [["indexedDB", "http://test1.example.org", "idb1 (default)", "obj1"],
      [1, 2, 3]],
  ];

  yield checkState(state);

  yield finishTests();
});