Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default value to exclusionFilters #235

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

beaufortfrancois
Copy link
Contributor

@beaufortfrancois beaufortfrancois commented Jun 22, 2023

As suggested in https://chromium-review.googlesource.com/c/chromium/src/+/4614682/15..16/third_party/blink/renderer/modules/webusb/usb.cc#b247, this PR sets the default value of exclusionFilters to [] to avoid differentiating between no list and an empty list.

@reillyeon please review.

Related to #233 and #232


Preview | Diff

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 22, 2023
This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@beaufortfrancois
Copy link
Contributor Author

@reillyeon I've addressed your feedback. Feel free to merge if it looks good to you.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 23, 2023
This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
@reillyeon reillyeon merged commit 0f516e1 into WICG:main Jun 23, 2023
1 check passed
github-actions bot added a commit that referenced this pull request Jun 23, 2023
SHA: 0f516e1
Reason: push, by reillyeon

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Jun 23, 2023
SHA: 0f516e1
Reason: push, by reillyeon

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 23, 2023
This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4614682
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1161953}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 23, 2023
This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4614682
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1161953}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 23, 2023
This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4614682
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1161953}
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 5, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 6, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 6, 2023
…stDeviceOptions, a=testonly

Automatic update from web-platform-tests
WebUSB: Add exclusionFilters to USBRequestDeviceOptions

This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4614682
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1161953}

--

wpt-commits: b7727490c96a87eb3f40fe43f266ad05368ab2b0
wpt-pr: 40582
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 7, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Jul 7, 2023
…stDeviceOptions, a=testonly

Automatic update from web-platform-tests
WebUSB: Add exclusionFilters to USBRequestDeviceOptions

This CL adds a new "exclusionFilters" option in
navigator.usb.requestDevice() options so that web developers can
exclude from the browser picker some devices that are known to not work
as expected.

Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
Spec:
- WICG/webusb#233
- WICG/webusb#235
Demo: https://usb-exclusion-filters.glitch.me/

Bug: 1455392
Change-Id: I1b61d9daae3e14accedb24e493ae656316427893
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4614682
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1161953}

--

wpt-commits: b7727490c96a87eb3f40fe43f266ad05368ab2b0
wpt-pr: 40582
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 13, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 21, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 22, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Jul 27, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Aug 9, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Aug 14, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Aug 15, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Aug 17, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Aug 21, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Aug 22, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Sep 5, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
cdesouza-chromium added a commit to brave/brave-core that referenced this pull request Sep 6, 2023
Upstream has done changes to the constructor of `UsbChooserController`.
We happen to depend on this class for one of our tests, as way to insert
a fake.

This change makes the necessary adjustments to reflect the upstream
change.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/19b0f58776f13112c4490e912ff0850b52720a36

commit 19b0f58776f13112c4490e912ff0850b52720a36
Author: François Beaufort <[email protected]>
Date:   Fri Jun 23 21:18:39 2023 +0000

    WebUSB: Add exclusionFilters to USBRequestDeviceOptions

    This CL adds a new "exclusionFilters" option in
    navigator.usb.requestDevice() options so that web developers can
    exclude from the browser picker some devices that are known to not work
    as expected.

    Intent to Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/e1mgO-m8zvQ
    Spec:
    - WICG/webusb#233
    - WICG/webusb#235
    Demo: https://usb-exclusion-filters.glitch.me/

    Bug: 1455392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants