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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webusb/usbIsochronousInTransferResult.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 7
8 test(t => { 8 test(t => {
9 let data_view = new DataView(Uint8Array.from([1, 2, 3, 4]).buffer); 9 let data_view = new DataView(Uint8Array.from([1, 2, 3, 4]).buffer);
10 let packet_data_view = new DataView(data_view.buffer); 10 let packet_data_view = new DataView(data_view.buffer);
11 let packets = [ 11 let packets = [
12 new USBIsochronousInTransferPacket('ok', packet_data_view), 12 new USBIsochronousInTransferPacket('ok', packet_data_view),
13 new USBIsochronousInTransferPacket('stall') 13 new USBIsochronousInTransferPacket('stall')
(...skipping 19 matching lines...) Expand all
33 assert_equals(result.packets[0].status, 'stall'); 33 assert_equals(result.packets[0].status, 'stall');
34 assert_equals(result.packets[0].data, null); 34 assert_equals(result.packets[0].data, null);
35 assert_equals(result.packets[1].status, 'stall'); 35 assert_equals(result.packets[1].status, 'stall');
36 assert_equals(result.packets[1].data, null); 36 assert_equals(result.packets[1].data, null);
37 }, 'Can construct a USBIsochronousInTransferResult without a DataView'); 37 }, 'Can construct a USBIsochronousInTransferResult without a DataView');
38 38
39 test(t => { 39 test(t => {
40 assert_throws(TypeError(), () => new USBIsochronousInTransferResult()); 40 assert_throws(TypeError(), () => new USBIsochronousInTransferResult());
41 }, 'Cannot construct a USBIsochronousInTransferResult without packets'); 41 }, 'Cannot construct a USBIsochronousInTransferResult without packets');
42 </script> 42 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698