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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webusb/usbIsochronousInTransferPacket.https.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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="/resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="/resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 'use strict'; 5 'use strict';
6 6
7 test(t => { 7 test(t => {
8 let data_view = new DataView(Uint8Array.from([1, 2, 3, 4]).buffer); 8 let data_view = new DataView(Uint8Array.from([1, 2, 3, 4]).buffer);
9 let packet = new USBIsochronousInTransferPacket('ok', data_view); 9 let packet = new USBIsochronousInTransferPacket('ok', data_view);
10 assert_equals(packet.status, 'ok'); 10 assert_equals(packet.status, 'ok');
11 assert_equals(packet.data.getInt32(0), 16909060); 11 assert_equals(packet.data.getInt32(0), 16909060);
12 }, 'Can construct a USBIsochronousInTransferPacket'); 12 }, 'Can construct a USBIsochronousInTransferPacket');
13 13
(...skipping 10 matching lines...) Expand all
24 test(t => { 24 test(t => {
25 assert_throws(TypeError(), () => { 25 assert_throws(TypeError(), () => {
26 new USBIsochronousInTransferPacket('invalid_status'); 26 new USBIsochronousInTransferPacket('invalid_status');
27 }); 27 });
28 }, 'Cannot construct USBIsochronousInTransferPacket with an invalid status'); 28 }, 'Cannot construct USBIsochronousInTransferPacket with an invalid status');
29 29
30 test(t => { 30 test(t => {
31 assert_throws(TypeError(), () => new USBIsochronousInTransferPacket()); 31 assert_throws(TypeError(), () => new USBIsochronousInTransferPacket());
32 }, 'Cannot construct USBIsochronousInTransferPacket without a status'); 32 }, 'Cannot construct USBIsochronousInTransferPacket without a status');
33 </script> 33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698