Add web tests to increase code coverage in third_party/blink/renderer/modules/webusb |
||
Issue descriptionLack of code coverage in third_party/blink/renderer/modules/webusb equates pretty strongly to missing web tests for WebUSB. For example, there is currently no test which calls controlTransferOut without the |data| parameter or any test which passes an ArrayBuffer rather than an ArrayBufferView to methods that can take either. Coverage reports: https://chromium-coverage.appspot.com/ For developers looking to make this their first contribution, please don't try to bring this directory to 100% all in one go. Pick a single function or branch that is untaken and add a new test that exercises it. Look at existing tests in third_party/WebKit/LayoutTests/external/wpt/webusb for examples.
,
Aug 20
,
Aug 28
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ad9bd4bc65b215274e80f99c90e028f76d8b9470 commit ad9bd4bc65b215274e80f99c90e028f76d8b9470 Author: Ovidio Henriquez <odejesush@chromium.org> Date: Tue Aug 28 23:32:53 2018 Improve Code Coverage for WebUSB This change improves the code coverage for the sources files under //third_party/blink/renderer/modules/webusb. The affected files are: * usb.cc * usb_alternate_interface.cc * usb_configuration.cc * usb_device.cc * usb_endpoint.cc * usb_interface.cc Bug: 854831 Change-Id: Ie67533ece27f1c944b0e9186d01a61219a30f805 Reviewed-on: https://chromium-review.googlesource.com/1183789 Commit-Queue: Ovidio Henriquez <odejesush@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#586930} [modify] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-disabled-by-feature-policy.https.sub.html [modify] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usb.https.window.js [add] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usbAlternateInterface.https.any.js [add] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usbConfiguration.https.any.js [modify] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usbDevice.https.any.js [add] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usbEndpoint.https.any.js [add] https://crrev.com/ad9bd4bc65b215274e80f99c90e028f76d8b9470/third_party/WebKit/LayoutTests/external/wpt/webusb/usbInterface.https.any.js
,
Aug 30
I increased the code coverage for WebUSB from 85.96% (https://chromium-coverage.appspot.com/reports/585679/linux/chromium/src/third_party/blink/renderer/modules/webusb/report.html) to 92.91%(http://chromium-coverage.appspot.com/reports/587357/linux/chromium/src/third_party/blink/renderer/modules/webusb/report.html). |
||
►
Sign in to add a comment |
||
Comment 1 by reillyg@chromium.org
, Jul 25