Skip to content

Commit

Permalink
Indexed DB: Consolidate window/worker IDL tests into any.js
Browse files Browse the repository at this point in the history
Also, rely on HTML and DOM interfaces for dependencies rather
than inline definitions for Event, EventTarget, etc.

Change-Id: I58ac6515f8d2769aec6bbf1b90d9a4105639ad24
Reviewed-on: https://chromium-review.googlesource.com/965452
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544429}
  • Loading branch information
inexorabletash authored and chromium-wpt-export-bot committed Mar 20, 2018
1 parent 6e1b5f4 commit ccca6be
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 114 deletions.
32 changes: 32 additions & 0 deletions IndexedDB/interfaces.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

promise_test(async t => {
const [html, dom, indexeddb] = await Promise.all([
'/interfaces/html.idl',
'/interfaces/dom.idl',
'/interfaces/IndexedDB.idl',
].map(url => fetch(url).then(response => response.text())));

const idl_array = new IdlArray();
idl_array.add_untested_idls('interface LinkStyle {};'); // Needed by html
idl_array.add_untested_idls(html);
idl_array.add_untested_idls(dom);
idl_array.add_idls(indexeddb);
idl_array.add_objects({
IDBCursor: [],
IDBCursorWithValue: [],
IDBDatabase: [],
IDBFactory: [self.indexedDB],
IDBIndex: [],
IDBKeyRange: [IDBKeyRange.only(0)],
IDBObjectStore: [],
IDBOpenDBRequest: [],
IDBRequest: [],
IDBTransaction: [],
IDBVersionChangeEvent: [new IDBVersionChangeEvent('')],
DOMStringList: [],
});

idl_array.test();
}, 'Test driver');
61 changes: 0 additions & 61 deletions IndexedDB/interfaces.html

This file was deleted.

53 changes: 0 additions & 53 deletions IndexedDB/interfaces.worker.js

This file was deleted.

0 comments on commit ccca6be

Please sign in to comment.