зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1477262 [wpt PR 12093] - Simplify the ambient-light IDL test, a=testonly
Automatic update from web-platform-testsSimplify the ambient-light IDL test (#12093) -- wpt-commits: 149b01dd3c58baa247d137de6217c68b535b062a wpt-pr: 12093
This commit is contained in:
Родитель
c4bbb0da4f
Коммит
c10d097b31
|
@ -310771,9 +310771,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"ambient-light/idlharness.https.html": [
|
||||
"ambient-light/idlharness.https.window.js": [
|
||||
[
|
||||
"/ambient-light/idlharness.https.html",
|
||||
"/ambient-light/idlharness.https.window.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -417210,8 +417210,8 @@
|
|||
"a1f6a1ae10eeaccc4288d31a9a1c1584cfbafb22",
|
||||
"support"
|
||||
],
|
||||
"ambient-light/idlharness.https.html": [
|
||||
"0b3417b7e88f77777d124793e2179eac0e5e5b4d",
|
||||
"ambient-light/idlharness.https.window.js": [
|
||||
"10e42151ea1345b66c0daa273ffd65ffe85ac3f1",
|
||||
"testharness"
|
||||
],
|
||||
"animation-worklet/META.yml": [
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Ambient Light Sensor IDL tests</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://w3c.github.io/ambient-light/">
|
||||
<link rel="help" href="https://w3c.github.io/sensors/">
|
||||
<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([dom, generic_sensor, ambient_light]) {
|
||||
const idl_array = new IdlArray();
|
||||
idl_array.add_untested_idls(dom);
|
||||
idl_array.add_untested_idls('interface EventHandler {};');
|
||||
idl_array.add_idls(generic_sensor, { only: ['Sensor'] });
|
||||
idl_array.add_idls(ambient_light);
|
||||
idl_array.add_objects({
|
||||
AmbientLightSensor: ['new AmbientLightSensor()']
|
||||
});
|
||||
idl_array.test();
|
||||
}
|
||||
|
||||
function fetchText(url) {
|
||||
return fetch(url).then((response) => response.text());
|
||||
}
|
||||
|
||||
promise_test(() => {
|
||||
return Promise.all([
|
||||
"/interfaces/dom.idl",
|
||||
"/interfaces/sensors.idl",
|
||||
"/interfaces/ambient-light.idl",
|
||||
].map(fetchText)).then(doTest);
|
||||
}, "Test IDL implementation of Ambient Light Sensor");
|
||||
</script>
|
|
@ -0,0 +1,17 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
// https://w3c.github.io/ambient-light/
|
||||
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['ambient-light'],
|
||||
['generic-sensor', 'dom'],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
AmbientLightSensor: ['new AmbientLightSensor()']
|
||||
});
|
||||
},
|
||||
'Test IDL implementation of Ambient Light Sensor'
|
||||
);
|
Загрузка…
Ссылка в новой задаче