Bug 1568271 [wpt PR 18006] - Include typedefs as idlharness dependencies, a=testonly

Automatic update from web-platform-tests
Include typedefs as idlharness dependencies (#18006)

* Include typedefs as dependencies

* Fix credential-management

* Add FileAPI dep to html/dom interfaces test

--

wpt-commits: bc908ac5428cd665341ff7c990fccfb95d3f07ef
wpt-pr: 18006
This commit is contained in:
Luke Bjerring 2019-08-01 14:23:59 +00:00 коммит произвёл moz-wptsync-bot
Родитель ba2bcea094
Коммит 728939e2ba
3 изменённых файлов: 30 добавлений и 20 удалений

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

@ -5,31 +5,32 @@
'use strict';
promise_test(async () => {
const idl = await fetch('/interfaces/credential-management.idl').then(r => r.text());
const html = await fetch('/interfaces/html.idl').then(r => r.text());
idl_test(
['credential-management'],
['html', 'dom'],
idl_array => {
idl_array.add_objects({
CredentialsContainer: ['navigator.credentials'],
PasswordCredential: ['passwordCredential'],
FederatedCredential: ['federatedCredential'],
});
var idl_array = new IdlArray();
idl_array.add_idls(idl);
idl_array.add_dependency_idls(html);
idl_array.add_objects({
CredentialsContainer: ['navigator.credentials'],
PasswordCredential: [
`new PasswordCredential({
try {
self.passwordCredential = new PasswordCredential({
id: "id",
password: "pencil",
iconURL: "https://example.com/",
name: "name"
})`
],
FederatedCredential: [
`new FederatedCredential({
});
} catch (e) {}
try {
self.federatedCredential = new FederatedCredential({
id: "id",
provider: "https://example.com",
iconURL: "https://example.com/",
name: "name"
})`
]
});
idl_array.test();
})
});
} catch (e) {}
}
)

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

@ -38,7 +38,7 @@ const waitForLoad = new Promise(resolve => { addEventListener('load', resolve);
idl_test(
['html'],
['SVG', 'cssom', 'touch-events', 'uievents', 'dom', 'xhr'],
['SVG', 'cssom', 'touch-events', 'uievents', 'dom', 'xhr', 'FileAPI'],
async idlArray => {
self.documentWithHandlers = new Document();
const handler = function(e) {};

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

@ -251,6 +251,15 @@ IdlArray.prototype.add_dependency_idls = function(raw_idls, options)
this.includes[k].forEach(v => all_deps.add(v));
});
this.partials.forEach(p => all_deps.add(p.name));
// Add 'TypeOfType' for each "typedef TypeOfType MyType;" entry.
Object.entries(this.members).forEach(([k, v]) => {
if (v instanceof IdlTypedef) {
let defs = v.idlType.union
? v.idlType.idlType.map(t => t.idlType)
: [v.idlType.idlType];
defs.forEach(d => all_deps.add(d));
}
});
// Add the attribute idlTypes of all the nested members of idls.
const attrDeps = parsedIdls => {