mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1477418 [wpt PR 12107] - Simplify the proximity IDL test, a=testonly
Automatic update from web-platform-testsSimplify the proximity IDL test (#12107) -- wpt-commits: f349306d1227ed23348f93ad780646f8cfa20e04 wpt-pr: 12107
This commit is contained in:
parent
c0a8e3243f
commit
267828fd55
@ -366399,9 +366399,9 @@
|
||||
{}
|
||||
]
|
||||
],
|
||||
"proximity/idlharness.https.html": [
|
||||
"proximity/idlharness.https.window.js": [
|
||||
[
|
||||
"/proximity/idlharness.https.html",
|
||||
"/proximity/idlharness.https.window.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
@ -604128,8 +604128,8 @@
|
||||
"5c6c0c5c8abd844fa89a01e646def9cd21f4864d",
|
||||
"manual"
|
||||
],
|
||||
"proximity/idlharness.https.html": [
|
||||
"7265649abefcaec47f159b4980b0c43ca7e47528",
|
||||
"proximity/idlharness.https.window.js": [
|
||||
"8e3e606f370b32c31d2acb1a1de32985c048ae36",
|
||||
"testharness"
|
||||
],
|
||||
"push-api/META.yml": [
|
||||
|
@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Proximity Sensor IDL tests</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://w3c.github.io/proximity/">
|
||||
<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, proximity]) {
|
||||
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(proximity);
|
||||
idl_array.add_objects({
|
||||
ProximitySensor: ['new ProximitySensor();']
|
||||
});
|
||||
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/proximity.idl",
|
||||
].map(fetchText)).then(doTest);
|
||||
}, "Test IDL implementation of Proximity Sensor");
|
||||
</script>
|
@ -0,0 +1,17 @@
|
||||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
// https://w3c.github.io/proximity/
|
||||
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['proximity'],
|
||||
['generic-sensor','dom'],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
ProximitySensor: ['new ProximitySensor();']
|
||||
});
|
||||
},
|
||||
'Test IDL implementation of Proximity Sensor'
|
||||
);
|
Loading…
Reference in New Issue
Block a user