gecko/dom/datastore/tests/file_worker_close.js
Andrea Marchesini 76ea507b88 Bug 1057994 - DataStore should not dispatch runnables in a worker when it is shutting down, r=bent
--HG--
rename : dom/datastore/tests/file_basic_worker.html => dom/datastore/tests/file_worker_close.html
rename : dom/datastore/tests/test_basic_worker.html => dom/datastore/tests/test_worker_close.html
2014-12-17 14:49:36 +00:00

19 lines
472 B
JavaScript

function is(a, b, msg) {
postMessage((a == b ? 'OK' : 'KO')+ ' ' + msg)
}
var store;
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');
store = stores[0];
postMessage('DONE');
});
onclose = function() {
for (var i = 0; i < 100; ++i) {
store.get(123);
}
}