gecko/dom/datastore/tests/file_app_install.html
Andrea Marchesini fbd4ec2a30 Bug 871445 - patch 4 - DatAStore: permissions, owned/access, r=mounir, r=ehsan
--HG--
rename : dom/datastore/tests/file_app.template.webapp => dom/datastore/tests/file_app2.template.webapp
rename : dom/datastore/tests/test_revision.html => dom/datastore/tests/file_revision.html
2013-10-02 13:27:14 -04:00

41 lines
1.1 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test for DataStore - install/uninstall apps</title>
<body>
<script type="application/javascript;version=1.7">
function is(a, b, msg) {
alert((a === b ? 'OK' : 'KO') + ' ' + msg)
}
function ok(a, msg) {
alert((a ? 'OK' : 'KO')+ ' ' + msg)
}
function cbError() {
alert('KO error');
}
function finish() {
alert('DONE');
}
navigator.getDataStores('foo').then(function(stores) {
is(stores.length, 1, "getDataStores('foo') returns 1 element");
is(stores[0].name, 'foo', 'The dataStore.name is foo');
ok(stores[0].owner, 'The dataStore.owner exists');
is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
navigator.getDataStores('bar').then(function(stores) {
is(stores.length, 1, "getDataStores('bar') returns 1 element");
is(stores[0].name, 'bar', 'The dataStore.name is bar');
ok(stores[0].owner, 'The dataStore.owner exists');
is(stores[0].readOnly, false, 'The dataStore bar is in readonly');
finish();
}, cbError);
}, cbError);
</script>
</html>