The default bug view has changed. See this FAQ.

Theming API - implement WebExtension framework

RESOLVED FIXED in Firefox 53

Status

()

Toolkit
WebExtensions: Frontend
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: mikedeboer, Assigned: mattw)

Tracking

(Blocks: 1 bug)

unspecified
mozilla53
Points:
---
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox53 fixed)

Details

(Whiteboard: user-story)

User Story

As a user I’d like to create a WebExtension that contains a manifest file which lists a set of properties and adheres to a schema definition and can be interpreted by the browser.
Example:
```json
{
  "manifest_version": 2,
  "version": "0.1",
  "name": "Crazy theme",
  "theme": {
    "colors": {
      "background_tab": [255, 255, 255, 0.6],
      "background_tab_inactive": [255, 255, 255, 0.2],
    },
    "images": {
      "theme_frame": "sample.jpeg"
    },
    "properties": {
      "square_tabs": true
    }
  }
}
```

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
(Reporter)

Updated

3 months ago
Summary: Theming API - Implement framework → Theming API - create a WebExtension schema
(Assignee)

Updated

3 months ago
Assignee: nobody → mwein
(Assignee)

Updated

3 months ago
Summary: Theming API - create a WebExtension schema → Theming API - implement WebExtension framework
Comment hidden (mozreview-request)
(Reporter)

Comment 2

3 months ago
mozreview-review
Comment on attachment 8825916 [details]
Bug 1330337 - Add basic theme framework hidden behind pref

https://reviewboard.mozilla.org/r/103982/#review104888

Looks good to me, but can you also add a test for this? (for example, test flipping the pref)
Attachment #8825916 - Flags: review?(mdeboer) → review-
Comment hidden (mozreview-request)
(Reporter)

Comment 4

2 months ago
mozreview-review
Comment on attachment 8825916 [details]
Bug 1330337 - Add basic theme framework hidden behind pref

https://reviewboard.mozilla.org/r/103982/#review105236

::: browser/components/extensions/test/browser/browser_ext_themes.js:14
(Diff revision 2)
> +  });
> +
> +  SimpleTest.waitForExplicitFinish();
> +  let waitForConsole = new Promise(resolve => {
> +    SimpleTest.monitorConsole(resolve, [{
> +      message: /Themes are not enabled/,

Neat! I am curious: Why didn't you use `extension.emit("test-theme-enabled")` instead? If it works, please use that so we can keep it indefinitely. I don't want to spam our browser console with theming API messages indefinitely.
Attachment #8825916 - Flags: review?(mdeboer) → review+
(Assignee)

Comment 5

2 months ago
> Neat! I am curious: Why didn't you use
> `extension.emit("test-theme-enabled")` instead? If it works, please use that
> so we can keep it indefinitely. I don't want to spam our browser console
> with theming API messages indefinitely.

I tried this and it didn't work so I thought we didn't support it, but I just found out we have a way to send messages to tests using the event name "test-message". The second argument is then the event name you listen for. I'll update the patch to use this before adding checkin-needed :)
Comment hidden (mozreview-request)
(Assignee)

Updated

2 months ago
Keywords: checkin-needed

Comment 7

2 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3b0cc40ebbbf
Add basic theme framework hidden behind pref r=mikedeboer
Keywords: checkin-needed

Comment 8

2 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3b0cc40ebbbf
Status: NEW → RESOLVED
Last Resolved: 2 months ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Is manual testing necessary here? If yes, could you please provide some reliable steps and expected results in order to verify this bug?

I tried to load an extension that contains a manifest.json as it is described in User Story but I was unable to install it because of the following errors: http://pastebin.com/Lp4hGems

Am I missing something? Maybe some prefs?
Flags: needinfo?(mwein)
(Assignee)

Comment 10

2 months ago
Since no support for any of the global properties - colors, images, etc - was added in this bug, I don't think it's necessary for us to have any manual testing. I think it will be very helpful in later bugs though!
Flags: needinfo?(mwein)
(In reply to Matthew Wein [:mattw] from comment #10)
> Since no support for any of the global properties - colors, images, etc -
> was added in this bug, I don't think it's necessary for us to have any
> manual testing. I think it will be very helpful in later bugs though!

Thanks Matthew for your reply. In this case I am making this bug as qe-verify -
For those bugs which you consider that need our attention, please assign me a needinfo (or as qa contact) and we will gladly test them.
Flags: qe-verify-
(Assignee)

Comment 12

2 months ago
Thanks Vasilica, will do :)
You need to log in before you can comment on or make changes to this bug.