Closed Bug 1297229 Opened 8 years ago Closed 8 years ago

Experiments APIs don't get schema wrappers

Categories

(WebExtensions :: Experiments, defect, P1)

51 Branch
defect

Tracking

(firefox51 fixed)

RESOLVED FIXED
mozilla51
Iteration:
51.2 - Aug 29
Tracking Status
firefox51 --- fixed

People

(Reporter: aswan, Assigned: aswan)

Details

Attachments

(1 file)

The summary pretty much says it all.
Comment on attachment 8783754 [details]
Bug 1297229 Run experiments APIs through schemas

https://reviewboard.mozilla.org/r/73438/#review71464

::: toolkit/components/extensions/test/xpcshell/test_ext_experiments.js:92
(Diff revision 1)
> +      // The test code below checks that hello() is called at the right
> +      // time with the string "Here I am".  Verify that the api schema is
> +      // being correctly interpreted by calling hello() with bad arguments
> +      // and only calling hello() with the magic string if the call with
> +      // bad arguments throws.
> +      try {
> +        browser.meh.hello("I should not see this", "since two arguments are bad");
> +      } catch (err) {
> -      browser.meh.hello("Here I am");
> +        browser.meh.hello("Here I am");
> +      }

Would be nice to test the promise/callback wrappers too.

::: toolkit/components/extensions/test/xpcshell/test_ext_simple.js:63
(Diff revision 1)
> +    manifest: {
> +      "name": "Simple extension test",
> +      "version": "1.0",
> +      "manifest_version": 2,
> +      "description": "",
> +    },

Shouldn't need any of this.
Attachment #8783754 - Flags: review?(kmaglione+bmo) → review+
Comment on attachment 8783754 [details]
Bug 1297229 Run experiments APIs through schemas

https://reviewboard.mozilla.org/r/73438/#review71464

> Would be nice to test the promise/callback wrappers too.

My logic here is that this tests that the schema wrappers actually do get applied, and testing that the schema async wrappers work properly is really the job of the schema wrapper unit tests.
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/abf8b6e8ebed
Run experiments APIs through schemas r=kmag
https://hg.mozilla.org/mozilla-central/rev/abf8b6e8ebed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: