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

Issue 2940133002: [Extensions] Update DeclarativeApiTest.DeclarativeApi (Closed)

Created:
3 years, 6 months ago by Devlin
Modified:
3 years, 6 months ago
Reviewers:
lazyboy
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, jbroman
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -8 lines) Patch
M chrome/test/data/extensions/api_test/declarative/api/background.js View 5 chunks +23 lines, -8 lines 0 comments Download

Messages

Total messages: 12 (8 generated)
Devlin
lazyboy@, mind taking a look? Good news - native bindings are catching bugs we never ...
3 years, 6 months ago (2017-06-15 20:42:51 UTC) #6
lazyboy
lgtm
3 years, 6 months ago (2017-06-15 21:15:03 UTC) #7
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/2940133002/1
3 years, 6 months ago (2017-06-15 21:30:28 UTC) #9
commit-bot: I haz the power
3 years, 6 months ago (2017-06-15 21:35:23 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/df6434db4fb6f58af26c25696f19...

Powered by Google App Engine
This is Rietveld 408576698