Revision 09329e8bb6498a74cc8c054a263b2698a72d2f8e authored by Chris Nardi on 13 March 2018, 21:27:03 UTC, committed by François REMY on 03 April 2018, 18:09:56 UTC
1 parent d30e620
usbIsochronousOutTransferResult.https.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
test(t => {
let packets = [
new USBIsochronousOutTransferPacket('ok', 42),
new USBIsochronousOutTransferPacket('stall')
];
let result = new USBIsochronousOutTransferResult(packets);
assert_equals(result.packets.length, 2);
assert_equals(result.packets[0].status, 'ok');
assert_equals(result.packets[0].bytesWritten, 42);
assert_equals(result.packets[1].status, 'stall');
assert_equals(result.packets[1].bytesWritten, 0);
}, 'Can construct a USBIsochronousOutTransferResult');
test(t => {
assert_throws(TypeError(), () => new USBIsochronousOutTransferResult());
}, 'Cannot construct a USBIsochronousOutTransferResult without packets');
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...