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

Issue 2348703003: Update USBConnectionEvent.idl to match the spec. (Closed)

Created:
4 years, 3 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 2 months ago
Reviewers:
Jeffrey Yasskin
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update USBConnectionEvent.idl to match the spec. The spec has been updated to properly define a constructor for USBConnectionEvent. This patch updates Blink's version of the IDL to match. Committed: https://crrev.com/bce2e76bb44542c850aacd6b5f7637760a53f3b6 Cr-Commit-Position: refs/heads/master@{#421115}

Patch Set 1 #

Patch Set 2 : Add tests. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -9 lines) Patch
A third_party/WebKit/LayoutTests/usb/usb-connection-event.html View 1 1 chunk +36 lines, -0 lines 3 comments Download
M third_party/WebKit/Source/modules/webusb/USBConnectionEvent.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBConnectionEventInit.idl View 1 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 23 (12 generated)
Reilly Grant (use Gerrit)
Jeffrey, please take a look.
4 years, 3 months ago (2016-09-16 19:49:20 UTC) #6
haraken
Can we have a test?
4 years, 3 months ago (2016-09-17 00:02:01 UTC) #7
Jeffrey Yasskin
On 2016/09/16 19:49:20, Reilly Grant wrote: > Jeffrey, please take a look. LGTM, except that ...
4 years, 2 months ago (2016-09-26 22:29:08 UTC) #8
Reilly Grant (use Gerrit)
On 2016/09/26 at 22:29:08, jyasskin wrote: > On 2016/09/16 19:49:20, Reilly Grant wrote: > > ...
4 years, 2 months ago (2016-09-27 00:55:27 UTC) #9
Reilly Grant (use Gerrit)
Add tests.
4 years, 2 months ago (2016-09-27 02:31:47 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2348703003/20001
4 years, 2 months ago (2016-09-27 04:01:21 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-09-27 05:19:37 UTC) #18
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/bce2e76bb44542c850aacd6b5f7637760a53f3b6 Cr-Commit-Position: refs/heads/master@{#421115}
4 years, 2 months ago (2016-09-27 05:21:56 UTC) #20
Jeffrey Yasskin
https://codereview.chromium.org/2348703003/diff/20001/third_party/WebKit/LayoutTests/usb/usb-connection-event.html File third_party/WebKit/LayoutTests/usb/usb-connection-event.html (right): https://codereview.chromium.org/2348703003/diff/20001/third_party/WebKit/LayoutTests/usb/usb-connection-event.html#newcode23 third_party/WebKit/LayoutTests/usb/usb-connection-event.html:23: new USBConnectionEvent('connect', { device: null }); FWIW, I think ...
4 years, 2 months ago (2016-09-27 19:54:57 UTC) #21
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2348703003/diff/20001/third_party/WebKit/LayoutTests/usb/usb-connection-event.html File third_party/WebKit/LayoutTests/usb/usb-connection-event.html (right): https://codereview.chromium.org/2348703003/diff/20001/third_party/WebKit/LayoutTests/usb/usb-connection-event.html#newcode23 third_party/WebKit/LayoutTests/usb/usb-connection-event.html:23: new USBConnectionEvent('connect', { device: null }); On 2016/09/27 at ...
4 years, 2 months ago (2016-09-28 02:07:24 UTC) #22
Jeffrey Yasskin
4 years, 2 months ago (2016-09-28 20:21:52 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/2348703003/diff/20001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/usb/usb-connection-event.html (right):

https://codereview.chromium.org/2348703003/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/usb/usb-connection-event.html:23: new
USBConnectionEvent('connect', { device: null });
On 2016/09/28 02:07:24, Reilly Grant wrote:
> On 2016/09/27 at 19:54:57, Jeffrey Yasskin wrote:
> > FWIW, I think you can use promise_rejects() for this:
>
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/resources...
> > 
> > I forget the exact syntax for asserting that it's a TypeError.
> 
> There is assert_throws() but it only accepts DOMExceptions as the expected
error
> and TypeError is a pure JavaScript concept.

It turns out that TypeError() works, while 'TypeError' doesn't. I learned this
from https://github.com/w3c/testharness.js/issues/62 and have now sent
https://github.com/w3c/testharness.js/pull/211 to make 'TypeError' work too.

Powered by Google App Engine
This is Rietveld 408576698