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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webusb/usbOutTransferResult.https.html

Issue 2789723003: Migrate WebUSB LayoutTests into external/wpt (Closed)
Patch Set: Upstream tests that will work in stable Chrome 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 result = new USBOutTransferResult('ok', 42); 8 let result = new USBOutTransferResult('ok', 42);
9 assert_equals(result.status, 'ok'); 9 assert_equals(result.status, 'ok');
10 assert_equals(result.bytesWritten, 42); 10 assert_equals(result.bytesWritten, 42);
11 11
12 result = new USBOutTransferResult('stall'); 12 result = new USBOutTransferResult('stall');
13 assert_equals(result.status, 'stall'); 13 assert_equals(result.status, 'stall');
14 assert_equals(result.bytesWritten, 0); 14 assert_equals(result.bytesWritten, 0);
15 }, 'Can construct USBOutTransferResult'); 15 }, 'Can construct USBOutTransferResult');
16 16
17 test(t => { 17 test(t => {
18 assert_throws(TypeError(), () => new USBOutTransferResult('invalid_status')); 18 assert_throws(TypeError(), () => new USBOutTransferResult('invalid_status'));
19 }, 'Cannot construct USBOutTransferResult with an invalid status'); 19 }, 'Cannot construct USBOutTransferResult with an invalid status');
20 20
21 test(t => { 21 test(t => {
22 assert_throws(TypeError(), () => new USBOutTransferResult()); 22 assert_throws(TypeError(), () => new USBOutTransferResult());
23 }, 'Cannot construct USBOutTransferResult without a status'); 23 }, 'Cannot construct USBOutTransferResult without a status');
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698