This issue tracks the work necessary to upstream the existing WebUSB layout tests into the Web Platform Tests repository.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e1edfbbb4b3a192e210c031628e4f12aa93057cd commit e1edfbbb4b3a192e210c031628e4f12aa93057cd Author: reillyg <reillyg@chromium.org> Date: Fri Mar 31 01:22:07 2017 Refactor WebUSB LayoutTests to separate out the Mojo service mocks In preparation for being able to upstream the existing WebUSB tests to the Web Platform Tests repository this patch splits out the Mojo service mocks into webusb-test.js. This file is a polyfil for a fictional "WebUSB Test API" that could in theory be implemented by any browser (an idea borrowed from a proposed plan for Web Bluetooth). BUG= 705734 Review-Url: https://codereview.chromium.org/2775323003 Cr-Commit-Position: refs/heads/master@{#460978} [delete] https://crrev.com/ec4a8e3a9d0000eaaefe7a02bd2a405bf510d49d/third_party/WebKit/LayoutTests/usb/mock-services.html [modify] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js [modify] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js [add] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js [add] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/test-polyfil.html [modify] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/usb-connection-event.html [modify] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/usb.html [modify] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html [modify] https://crrev.com/e1edfbbb4b3a192e210c031628e4f12aa93057cd/third_party/WebKit/LayoutTests/usb/usbDevice.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/245d44d8347cb000d4d78b46b9f120e3fc9f10d3 commit 245d44d8347cb000d4d78b46b9f120e3fc9f10d3 Author: ortuno <ortuno@chromium.org> Date: Fri Mar 31 05:09:03 2017 Revert of Refactor WebUSB LayoutTests to separate out the Mojo service mocks (patchset #1 id:1 of https://codereview.chromium.org/2775323003/ ) Reason for revert: Breaks leak bot: https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/3557 * usb/test-polyfil.html * usb/usb-connection-event.html * usb/usb.html * usb/usbDevice-iframe.html * usb/usbDevice.html seem to be leaking :( Original issue's description: > Refactor WebUSB LayoutTests to separate out the Mojo service mocks > > In preparation for being able to upstream the existing WebUSB tests to > the Web Platform Tests repository this patch splits out the Mojo > service mocks into webusb-test.js. This file is a polyfil for a > fictional "WebUSB Test API" that could in theory be implemented by any > browser (an idea borrowed from a proposed plan for Web Bluetooth). > > BUG= 705734 > > Review-Url: https://codereview.chromium.org/2775323003 > Cr-Commit-Position: refs/heads/master@{#460978} > Committed: https://chromium.googlesource.com/chromium/src/+/e1edfbbb4b3a192e210c031628e4f12aa93057cd TBR=yzshen@chromium.org,reillyg@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 705734 Review-Url: https://codereview.chromium.org/2791573002 Cr-Commit-Position: refs/heads/master@{#461045} [add] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/mock-services.html [modify] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js [modify] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js [delete] https://crrev.com/b4b59de15639559e9fbdc818d3ca1ca960dbc0c0/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js [delete] https://crrev.com/b4b59de15639559e9fbdc818d3ca1ca960dbc0c0/third_party/WebKit/LayoutTests/usb/test-polyfil.html [modify] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/usb-connection-event.html [modify] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/usb.html [modify] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html [modify] https://crrev.com/245d44d8347cb000d4d78b46b9f120e3fc9f10d3/third_party/WebKit/LayoutTests/usb/usbDevice.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/08513f9d231c07202bb6b2956f045f128950c194 commit 08513f9d231c07202bb6b2956f045f128950c194 Author: reillyg <reillyg@chromium.org> Date: Wed Apr 05 20:36:11 2017 Reland of Refactor WebUSB LayoutTests to separate out the Mojo service mocks (patchset #1 id:1 of https://codereview.chromium.org/2791573002/ ) Reason for revert: Fixed the leak. Original issue's description: > Revert of Refactor WebUSB LayoutTests to separate out the Mojo service mocks (patchset #1 id:1 of https://codereview.chromium.org/2775323003/ ) > > Reason for revert: > Breaks leak bot: > > https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/3557 > > * usb/test-polyfil.html > * usb/usb-connection-event.html > * usb/usb.html > * usb/usbDevice-iframe.html > * usb/usbDevice.html > > seem to be leaking :( > > Original issue's description: > > Refactor WebUSB LayoutTests to separate out the Mojo service mocks > > > > In preparation for being able to upstream the existing WebUSB tests to > > the Web Platform Tests repository this patch splits out the Mojo > > service mocks into webusb-test.js. This file is a polyfil for a > > fictional "WebUSB Test API" that could in theory be implemented by any > > browser (an idea borrowed from a proposed plan for Web Bluetooth). > > > > BUG= 705734 > > > > Review-Url: https://codereview.chromium.org/2775323003 > > Cr-Commit-Position: refs/heads/master@{#460978} > > Committed: https://chromium.googlesource.com/chromium/src/+/e1edfbbb4b3a192e210c031628e4f12aa93057cd > > TBR=yzshen@chromium.org,reillyg@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG= 705734 > > Review-Url: https://codereview.chromium.org/2791573002 > Cr-Commit-Position: refs/heads/master@{#461045} > Committed: https://chromium.googlesource.com/chromium/src/+/245d44d8347cb000d4d78b46b9f120e3fc9f10d3 TBR=yzshen@chromium.org,ortuno@chromium.org BUG= 705734 Review-Url: https://codereview.chromium.org/2788463005 Cr-Commit-Position: refs/heads/master@{#462203} [delete] https://crrev.com/722584c2e23d7f2c75bc05d0bfb36f866ca71b4f/third_party/WebKit/LayoutTests/usb/mock-services.html [modify] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js [modify] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js [add] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js [add] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/test-polyfil.html [modify] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/usb-connection-event.html [modify] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/usb.html [modify] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html [modify] https://crrev.com/08513f9d231c07202bb6b2956f045f128950c194/third_party/WebKit/LayoutTests/usb/usbDevice.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da15150a621a853c809cfc0375ef78822bfd54b7 commit da15150a621a853c809cfc0375ef78822bfd54b7 Author: reillyg <reillyg@chromium.org> Date: Tue Apr 18 19:38:27 2017 Ensure tests don't depend on fake devices being added synchronously As specified navigator.usb.test.addFakeDevice and removeFakeDevice do not synchronously add and remove the fake device however the Mojo-based polyfill does. This patch adds a delay and fixes the WebUSB tests so that they do not depend on this behaviors. BUG= 705734 Review-Url: https://codereview.chromium.org/2816663002 Cr-Commit-Position: refs/heads/master@{#465329} [modify] https://crrev.com/da15150a621a853c809cfc0375ef78822bfd54b7/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js [modify] https://crrev.com/da15150a621a853c809cfc0375ef78822bfd54b7/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js [modify] https://crrev.com/da15150a621a853c809cfc0375ef78822bfd54b7/third_party/WebKit/LayoutTests/usb/usb-connection-event.html [modify] https://crrev.com/da15150a621a853c809cfc0375ef78822bfd54b7/third_party/WebKit/LayoutTests/usb/usb.html [modify] https://crrev.com/da15150a621a853c809cfc0375ef78822bfd54b7/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html [modify] https://crrev.com/da15150a621a853c809cfc0375ef78822bfd54b7/third_party/WebKit/LayoutTests/usb/usbDevice.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/702856a2f7731a9e85ada740247b2c64d13704fb commit 702856a2f7731a9e85ada740247b2c64d13704fb Author: reillyg <reillyg@chromium.org> Date: Mon Apr 24 19:25:45 2017 Add link to WebUSB Test API specification Now that it is published online instead of including the WebIDL definitions for the WebUSB Test API inline in the polyfill this patch replaces them with a link to the editor's draft. BUG= 705734 Review-Url: https://codereview.chromium.org/2829643003 Cr-Commit-Position: refs/heads/master@{#466714} [modify] https://crrev.com/702856a2f7731a9e85ada740247b2c64d13704fb/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/34237a69cf404e36413627836b4a5e501759dafd commit 34237a69cf404e36413627836b4a5e501759dafd Author: reillyg <reillyg@chromium.org> Date: Mon Apr 24 21:35:01 2017 Move the onclose event handler to the FakeUSBDevice object This updates the WebUSB Testing API polyfill to put the onclose event handler on the FakeUSBDevice object which makes tests a little simpler. BUG= 705734 Review-Url: https://codereview.chromium.org/2831223003 Cr-Commit-Position: refs/heads/master@{#466774} [modify] https://crrev.com/34237a69cf404e36413627836b4a5e501759dafd/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js [modify] https://crrev.com/34237a69cf404e36413627836b4a5e501759dafd/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a58aca05fb59a513a0857538de9e79eea712d4e4 commit a58aca05fb59a513a0857538de9e79eea712d4e4 Author: reillyg <reillyg@chromium.org> Date: Fri Jun 23 00:01:11 2017 Migrate WebUSB LayoutTests into external/wpt This test moves all the tests from third_party/WebKit/LayoutTests/usb to third_party/WebKit/LayoutTests/external/wpt/webusb. The WebUSB Test API polyfill is included in a new resources/chromium directory and loaded automatically when the tests are run in a Chromium-based browser with the --enable-blink-features=MojoJS,MojoJSTest flag set. BUG= 705734 Review-Url: https://codereview.chromium.org/2789723003 Cr-Commit-Position: refs/heads/master@{#481732} [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/FlagExpectations/enable-network-service [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/SlowTests [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/README.md [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/chooser_service.mojom.js [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/device.mojom.js [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/device_manager.mojom.js [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/mojo_bindings.js [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/webusb-test.js [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/OWNERS [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/idlharness.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/fake-devices.js [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/open-in-iframe.html [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/usb-helpers.js [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-manual.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbConnectionEvent.https.html [add] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbDevice-iframe.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbDevice.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbInTransferResult.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbIsochronousInTransferPacket.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbIsochronousInTransferResult.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbIsochronousOutTransferPacket.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbIsochronousOutTransferResult.https.html [rename] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/external/wpt/webusb/usbOutTransferResult.https.html [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/resources/testharnessreport.js [delete] https://crrev.com/bedb4b202b4b909e7e1f79439cadd2842f105470/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js [delete] https://crrev.com/bedb4b202b4b909e7e1f79439cadd2842f105470/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js [delete] https://crrev.com/bedb4b202b4b909e7e1f79439cadd2842f105470/third_party/WebKit/LayoutTests/usb/test-polyfil.html [modify] https://crrev.com/a58aca05fb59a513a0857538de9e79eea712d4e4/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
Comment 1 by bugdroid1@chromium.org
, Mar 31 2017