test_orpahnedQuotaObject.js (938B)
1 /** 2 * Any copyright is dedicated to the Public Domain. 3 * http://creativecommons.org/publicdomain/zero/1.0/ 4 */ 5 6 async function testSteps() { 7 const principal = getPrincipal("https://example.com"); 8 9 info("Setting pref"); 10 11 Services.prefs.setBoolPref("dom.storage.client_validation", false); 12 13 info("Clearing"); 14 15 let request = clear(); 16 await requestFinished(request); 17 18 info("Creating simpledb"); 19 20 let database = getSimpleDatabase(principal); 21 22 request = database.open("data"); 23 await requestFinished(request); 24 25 info("Creating localStorage"); 26 27 let storage = Services.domStorageManager.createStorage( 28 null, 29 principal, 30 principal, 31 "" 32 ); 33 storage.setItem("key", "value"); 34 35 info("Clearing simpledb"); 36 37 request = clearClient(principal, "sdb", "default"); 38 await requestFinished(request); 39 40 info("Resetting localStorage"); 41 42 request = resetClient(principal, "ls"); 43 await requestFinished(request); 44 }