Bug 1466796 [wpt PR 11348] - Make IndexedDB/support.js work in workers, a=testonly

Automatic update from web-platform-testsMake IndexedDB/support.js work in workers

This should fix the test
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.worker.html

Part of #11269.

--

wpt-commits: 60a937de7bd20eb1890893a48423a79b096866d8
wpt-pr: 11348
This commit is contained in:
Simon Pieters 2018-06-25 22:00:00 +00:00
Родитель a9ac6e75d1
Коммит 718819e565
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -411079,7 +411079,7 @@
"support"
],
"IndexedDB/support.js": [
"1a2e89e3be7ba2af3352d5d284666465a5663fb5",
"df25e578a049e65114cedd280d3d7faf5685c09c",
"support"
],
"IndexedDB/transaction-abort-generator-revert.html": [

Просмотреть файл

@ -12,7 +12,7 @@ add_completion_callback(function(tests)
if(tests[i].db)
{
tests[i].db.close();
window.indexedDB.deleteDatabase(tests[i].db.name);
self.indexedDB.deleteDatabase(tests[i].db.name);
}
}
});
@ -43,9 +43,9 @@ function createdb_for_multiple_tests(dbname, version) {
dbname = (dbname ? dbname : "testdb-" + new Date().getTime() + Math.random() );
if (version)
rq_open = window.indexedDB.open(dbname, version);
rq_open = self.indexedDB.open(dbname, version);
else
rq_open = window.indexedDB.open(dbname);
rq_open = self.indexedDB.open(dbname);
function auto_fail(evt, current_test) {
/* Fail handlers, if we haven't set on/whatever/, don't
@ -107,7 +107,7 @@ function assert_key_equals(actual, expected, description) {
function indexeddb_test(upgrade_func, open_func, description, options) {
async_test(function(t) {
options = Object.assign({upgrade_will_abort: false}, options);
var dbname = document.location + '-' + t.name;
var dbname = location + '-' + t.name;
var del = indexedDB.deleteDatabase(dbname);
del.onerror = t.unreached_func('deleteDatabase should succeed');
var open = indexedDB.open(dbname, 1);