Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: third_party/WebKit/LayoutTests/usb/usb-isochronous-out-transfer-result.html

Issue 2789723003: Migrate WebUSB LayoutTests into external/wpt (Closed)
Patch Set: Add README.md and more comments explaining the polyfill Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script>
5 'use strict';
6
7 test(t => {
8 let packets = [
9 new USBIsochronousOutTransferPacket('ok', 42),
10 new USBIsochronousOutTransferPacket('stall')
11 ];
12
13 let result = new USBIsochronousOutTransferResult(packets);
14 assert_equals(result.packets.length, 2);
15 assert_equals(result.packets[0].status, 'ok');
16 assert_equals(result.packets[0].bytesWritten, 42);
17 assert_equals(result.packets[1].status, 'stall');
18 assert_equals(result.packets[1].bytesWritten, 0);
19 }, 'Can construct a USBIsochronousOutTransferResult');
20
21 test(t => {
22 assert_throws(TypeError(), () => new USBIsochronousOutTransferResult());
23 }, 'Cannot construct a USBIsochronousOutTransferResult without packets');
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698