Closed Bug 1413754 Opened 2 years ago Closed 2 years ago

Test parsing of non-content-exposed media-queries.

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Flags: needinfo?(emilio)
Comment on attachment 8925055 [details]
Bug 1413754: Add tests for parsing of non-content-exposed media queries.

https://reviewboard.mozilla.org/r/196290/#review201676

::: layout/style/test/chrome/test_chrome_only_media_queries.html:12
(Diff revision 1)
> +
> +function expect(q, shouldBeParseable) {
> +  const NOT_PARSEABLE_TEXT = "@media screen, not all {\n}";
> +
> +  let text = "@media screen, " + q + " {\n}";
> +  SHEET.innerHTML = text;

I'd somehow prefer using `textContent` instead. `innerHTML` is more a hack for webcompat...

::: layout/style/test/chrome/test_chrome_only_media_queries.html:13
(Diff revision 1)
> +function expect(q, shouldBeParseable) {
> +  const NOT_PARSEABLE_TEXT = "@media screen, not all {\n}";
> +
> +  let text = "@media screen, " + q + " {\n}";
> +  SHEET.innerHTML = text;
> +  isnot(SHEET.sheet, null);

This is probably not necessary...

::: layout/style/test/chrome/test_chrome_only_media_queries.html:66
(Diff revision 1)
> +for (let i = 0; i < TOGGLES; ++i)
> +  testToggle(TOGGLES[i])

Please add `{` and `}` around the statement inside.
Attachment #8925055 - Flags: review?(xidorn+moz) → review+
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1e81b27bd602
Add tests for parsing of non-content-exposed media queries. r=xidorn
https://hg.mozilla.org/mozilla-central/rev/1e81b27bd602
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.