3 var hasItem =
Application.storage.has(
"fuel-test-missing");
4 is(hasItem,
false,
"Check 'Application.storage.has' for non-existing item");
7 is(hasItem,
true,
"Check 'Application.storage.has' for existing item");
10 var itemValue =
Application.storage.get(
"fuel-test-missing",
"default");
11 is(itemValue,
"default",
"Check 'Application.storage.get' for non-existing item");
12 itemValue =
Application.storage.get(
"fuel-test",
"default");
13 is(itemValue,
"dummy",
"Check 'Application.storage.get' for existing item");
17 itemValue =
Application.storage.get(
"fuel-test",
"default");
18 is(itemValue,
"smarty",
"Check 'Application.storage.get' for overwritten item");
23 Application.storage.set(
"fuel-test",
"change event");
27 is(evt.data,
"fuel-test",
"Check 'Application.storage.set' fired a change event");
function onStorageChange(evt)