Bug 1467562 [wpt PR 11384] - Update existing WebUSB WPT to be multi-global, a=testonly

Automatic update from web-platform-testsUpdate existing WebUSB WPT to be multi-global

This change updates the remaining WebUSB web platform tests to be
multi-global so that the API is also tested in the worker contexts.

Bug: 841510
Change-Id: I9df24f1ae4289ab742db275c34552200bb477b22
Reviewed-on: https://chromium-review.googlesource.com/1089033
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565778}

--

wpt-commits: a82a385bd794d9120b0eb8b94f452d4d38bfe04b
wpt-pr: 11384
This commit is contained in:
Ovidio Henriquez 2018-07-06 21:35:15 +00:00 коммит произвёл James Graham
Родитель 1155bad23f
Коммит bf7a3ffdcf
8 изменённых файлов: 97 добавлений и 67 удалений

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

@ -385352,45 +385352,101 @@
{}
]
],
"webusb/usbDevice.https.html": [
"webusb/usbDevice.https.any.js": [
[
"/webusb/usbDevice.https.html",
"/webusb/usbDevice.https.any.html",
{}
],
[
"/webusb/usbDevice.https.any.sharedworker.html",
{}
],
[
"/webusb/usbDevice.https.any.worker.html",
{}
]
],
"webusb/usbInTransferResult.https.html": [
"webusb/usbInTransferResult.https.any.js": [
[
"/webusb/usbInTransferResult.https.html",
"/webusb/usbInTransferResult.https.any.html",
{}
],
[
"/webusb/usbInTransferResult.https.any.sharedworker.html",
{}
],
[
"/webusb/usbInTransferResult.https.any.worker.html",
{}
]
],
"webusb/usbIsochronousInTransferPacket.https.html": [
"webusb/usbIsochronousInTransferPacket.https.any.js": [
[
"/webusb/usbIsochronousInTransferPacket.https.html",
"/webusb/usbIsochronousInTransferPacket.https.any.html",
{}
],
[
"/webusb/usbIsochronousInTransferPacket.https.any.sharedworker.html",
{}
],
[
"/webusb/usbIsochronousInTransferPacket.https.any.worker.html",
{}
]
],
"webusb/usbIsochronousInTransferResult.https.html": [
"webusb/usbIsochronousInTransferResult.https.any.js": [
[
"/webusb/usbIsochronousInTransferResult.https.html",
"/webusb/usbIsochronousInTransferResult.https.any.html",
{}
],
[
"/webusb/usbIsochronousInTransferResult.https.any.sharedworker.html",
{}
],
[
"/webusb/usbIsochronousInTransferResult.https.any.worker.html",
{}
]
],
"webusb/usbIsochronousOutTransferPacket.https.html": [
"webusb/usbIsochronousOutTransferPacket.https.any.js": [
[
"/webusb/usbIsochronousOutTransferPacket.https.html",
"/webusb/usbIsochronousOutTransferPacket.https.any.html",
{}
],
[
"/webusb/usbIsochronousOutTransferPacket.https.any.sharedworker.html",
{}
],
[
"/webusb/usbIsochronousOutTransferPacket.https.any.worker.html",
{}
]
],
"webusb/usbIsochronousOutTransferResult.https.html": [
"webusb/usbIsochronousOutTransferResult.https.any.js": [
[
"/webusb/usbIsochronousOutTransferResult.https.html",
"/webusb/usbIsochronousOutTransferResult.https.any.html",
{}
],
[
"/webusb/usbIsochronousOutTransferResult.https.any.sharedworker.html",
{}
],
[
"/webusb/usbIsochronousOutTransferResult.https.any.worker.html",
{}
]
],
"webusb/usbOutTransferResult.https.html": [
"webusb/usbOutTransferResult.https.any.js": [
[
"/webusb/usbOutTransferResult.https.html",
"/webusb/usbOutTransferResult.https.any.html",
{}
],
[
"/webusb/usbOutTransferResult.https.any.sharedworker.html",
{}
],
[
"/webusb/usbOutTransferResult.https.any.worker.html",
{}
]
],
@ -626577,32 +626633,32 @@
"d2c3f13551a4d3b58e155aec01fb19f6fade5073",
"testharness"
],
"webusb/usbDevice.https.html": [
"db4de6d427f744294fc24f8a11c0971c2df207b1",
"webusb/usbDevice.https.any.js": [
"d657b9852f228786cb5573e7f85a4b19bd22533d",
"testharness"
],
"webusb/usbInTransferResult.https.html": [
"abfce8f939654027c4f9ef275878016dca126bb6",
"webusb/usbInTransferResult.https.any.js": [
"44a2a0864c0b0f632322fd8a09e4b601d6fbb1f9",
"testharness"
],
"webusb/usbIsochronousInTransferPacket.https.html": [
"0c13763ed243ed0981f00658d50eace2e49e654b",
"webusb/usbIsochronousInTransferPacket.https.any.js": [
"58629374099ec04761cd34f455a3939d8140fa5e",
"testharness"
],
"webusb/usbIsochronousInTransferResult.https.html": [
"131e36c8782adf4c02198b1905d233159295d5aa",
"webusb/usbIsochronousInTransferResult.https.any.js": [
"4ea4491ea4c73a72ea4bcc6a1536e76472040d95",
"testharness"
],
"webusb/usbIsochronousOutTransferPacket.https.html": [
"c8cd321d866b6ff693fe15b02d8808d092929ce1",
"webusb/usbIsochronousOutTransferPacket.https.any.js": [
"7f7e34236d6dbbc87262f7b1bdb370301f227949",
"testharness"
],
"webusb/usbIsochronousOutTransferResult.https.html": [
"ec9dfc49ebcb419d777c16995940d91678a26954",
"webusb/usbIsochronousOutTransferResult.https.any.js": [
"87db9a0e44a4ef1815a8303fc9e77c398cc2ff94",
"testharness"
],
"webusb/usbOutTransferResult.https.html": [
"f08a98a927d57cda8b780a8304a0fa6cf727cc81",
"webusb/usbOutTransferResult.https.any.js": [
"68b6d6779b66eddfbdee1d955b8360b643e213f0",
"testharness"
],
"webvr/META.yml": [

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

@ -1,9 +1,6 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/fake-devices.js"></script>
<script src="resources/usb-helpers.js"></script>
<script>
// META: script=/webusb/resources/fake-devices.js
// META: script=/webusb/resources/usb-helpers.js
// META: global=sharedworker
'use strict';
function assertRejectsWithNotFoundError(promise) {
@ -12,7 +9,7 @@ function assertRejectsWithNotFoundError(promise) {
function assertRejectsWithNotOpenError(promise) {
return assertRejectsWithError(
promise, 'InvalidStateError', 'The device must be opened first.')
promise, 'InvalidStateError', 'The device must be opened first.');
}
function assertRejectsWithNotConfiguredError(promise) {
@ -340,7 +337,7 @@ usb_test(() => {
assert_equals(result.status, 'ok');
assert_equals(result.bytesWritten, 8);
return device.close();
})
});
});
}, 'can issue OUT control transfer');
@ -651,4 +648,3 @@ usb_test(() => {
.then(() => assertRejectsWithNotFoundError(device.reset()));
});
}, 'resetDevice rejects when called on a disconnected device');
</script>

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

@ -1,7 +1,6 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// META: script=/webusb/resources/fake-devices.js
// META: script=/webusb/resources/usb-helpers.js
// META: global=sharedworker
'use strict';
test(t => {
@ -28,4 +27,3 @@ test(t => {
test(t => {
assert_throws(TypeError(), () => new USBInTransferResult());
}, 'Cannot construct USBInTransferResult without a status');
</script>

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

@ -1,7 +1,4 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// META: global=sharedworker
'use strict';
test(t => {
@ -30,4 +27,3 @@ test(t => {
test(t => {
assert_throws(TypeError(), () => new USBIsochronousInTransferPacket());
}, 'Cannot construct USBIsochronousInTransferPacket without a status');
</script>

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

@ -1,7 +1,4 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// META: global=sharedworker
'use strict';
test(t => {
@ -38,4 +35,3 @@ test(t => {
test(t => {
assert_throws(TypeError(), () => new USBIsochronousInTransferResult());
}, 'Cannot construct a USBIsochronousInTransferResult without packets');
</script>

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

@ -1,7 +1,4 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// META: global=sharedworker
'use strict';
test(t => {
@ -23,4 +20,3 @@ test(t => {
test(t => {
assert_throws(TypeError(), () => new USBIsochronousOutTransferPacket());
}, 'Cannot construct USBIsochronousOutTransferPacket without a status');
</script>

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

@ -1,7 +1,4 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// META: global=sharedworker
'use strict';
test(t => {
@ -21,4 +18,3 @@ test(t => {
test(t => {
assert_throws(TypeError(), () => new USBIsochronousOutTransferResult());
}, 'Cannot construct a USBIsochronousOutTransferResult without packets');
</script>

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

@ -1,7 +1,4 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// META: global=sharedworker
'use strict';
test(t => {
@ -21,4 +18,3 @@ test(t => {
test(t => {
assert_throws(TypeError(), () => new USBOutTransferResult());
}, 'Cannot construct USBOutTransferResult without a status');
</script>