Files
tubestation/testing/web-platform/tests/webusb/usb-garbage-collection.https.window.js
moz-wptsync-bot 9e7b06a925 Bug 1801056 [wpt PR 37001] - Centralize on a single garbage collection helper, a=testonly
Automatic update from web-platform-tests
Centralize on a single garbage collection helper

Closes #36926.
--

wpt-commits: e97fac4791931fb7455ba3fad759d362c7108b09
wpt-pr: 37001
2022-11-21 02:53:57 +00:00

16 lines
461 B
JavaScript

// META: script=/resources/test-only-api.js
// META: script=/webusb/resources/fake-devices.js
// META: script=/webusb/resources/usb-helpers.js
// META: script=/common/gc.js
'use strict';
usb_test(async () => {
{
let {device} = await getFakeDevice();
await device.open();
await device.selectConfiguration(2);
await device.claimInterface(0);
}
await garbageCollect();
}, 'Run garbage collection when the device reference is out of scope');