Chromium Code Reviews
Description[Extensions] Update DeclarativeApiTest.DeclarativeApi
The DeclarativeApiTest.DeclarativeApi test exercises calling invalid
invocations of [declarativeEvent].getRules() and removeRules(). However,
the "invalid" invocations they have been using simply omit the first
parameter, which is a filter. In the documentation and the schema, this
first parameter is listed as *optional*, and in extension APIs, omitted
optional parameters are allowed. Thus, this is contradictory.
This happens because the get/removeRules functions are defined in
event.js and take two named parameters, using those for validation,
rather than validating on the `arguments` property. Native bindings
actually do the right thing here, and allow the invocation.
Update the test to use truly invalid invocations for the invalid
invocations tests, and add a (disabled) test for using getRules with an
omitted filter.
BUG=733764
BUG=653596
Review-Url: https://codereview.chromium.org/2940133002
Cr-Commit-Position: refs/heads/master@{#479846}
Committed: https://chromium.googlesource.com/chromium/src/+/df6434db4fb6f58af26c25696f19332853938288
Patch Set 1 #
Messages
Total messages: 12 (8 generated)
|
|||||||||||||||||||