mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-11-20 10:33:36 +00:00
33 lines
692 B
HTML
33 lines
692 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for DataStore - event maker</title>
|
|
</head>
|
|
<body>
|
|
<script type="application/javascript;version=1.7">
|
|
|
|
function is(a, b, msg) {
|
|
alert((a === b ? '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');
|
|
is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
|
|
stores[0].add({a: 42}).then(finish, cbError);
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|