Bug 1477325 [wpt PR 12101] - Simplify the keyboard-lock IDL test, a=testonly

Automatic update from web-platform-testsSimplify the keyboard-lock IDL test (#12101)

--

wpt-commits: 5c643d6b40e8282aa196eebb7efa5c3a413ec8be
wpt-pr: 12101
This commit is contained in:
Luke Bjerring 2018-07-25 17:54:47 +00:00 committed by James Graham
parent eab9b3f0d6
commit c96f3e866c
3 changed files with 22 additions and 38 deletions

View File

@ -353145,9 +353145,9 @@
{}
]
],
"keyboard-lock/idlharness.https.html": [
"keyboard-lock/idlharness.https.window.js": [
[
"/keyboard-lock/idlharness.https.html",
"/keyboard-lock/idlharness.https.window.html",
{}
]
],
@ -592710,8 +592710,8 @@
"94a99910be54c9c6db2a318a8a6bcbd18947541d",
"support"
],
"keyboard-lock/idlharness.https.html": [
"d196b06e8606572e1e6c1a9e81e2f0920641c069",
"keyboard-lock/idlharness.https.window.js": [
"70fb3044f9154dd97ca82c5b3f76a4e383252ff3",
"testharness"
],
"keyboard-lock/navigator-keyboard-lock-blocked-from-cross-origin-iframe.https.html": [

View File

@ -1,34 +0,0 @@
<!doctype html>
<html>
<head>
<title>Keyboard Lock IDL tests</title>
<link rel="help" href="https://w3c.github.io/keyboard-lock/"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script>
'use strict';
function doTest(idls) {
var idl_array = new IdlArray();
idl_array.add_untested_idls('interface Navigator {};');
for (let idl of idls) {
idl_array.add_idls(idl);
}
idl_array.add_objects({
Navigator: ['navigator'],
Keyboard: ['navigator.keyboard'],
});
idl_array.test();
};
function fetchText(url) {
return fetch(url).then((response) => response.text());
}
promise_test(() => {
return Promise.all(["/interfaces/keyboard-lock.idl"].map(fetchText))
.then(doTest);
}, "Test driver");
</script>

View File

@ -0,0 +1,18 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://w3c.github.io/keyboard-lock/
'use strict';
idl_test(
['keyboard-lock'],
['html'],
idl_array => {
idl_array.add_objects({
Navigator: ['navigator'],
Keyboard: ['navigator.keyboard'],
});
},
'keyboard-lock interfaces'
);