Auto merge of #14159 - upsuper:media-query, r=Wafflespeanut

Allow empty media query list

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14159)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-10 01:37:57 -06:00 committed by GitHub
commit c3dc50b7ac
9 changed files with 41 additions and 23 deletions

View file

@ -37753,6 +37753,12 @@
"url": "/cookies/path/match.html"
}
],
"cssom-view/MediaQueryList-with-empty-string.html": [
{
"path": "cssom-view/MediaQueryList-with-empty-string.html",
"url": "/cssom-view/MediaQueryList-with-empty-string.html"
}
],
"html/semantics/forms/the-form-element/form-action-url.html": [
{
"path": "html/semantics/forms/the-form-element/form-action-url.html",

View file

@ -0,0 +1,12 @@
<!doctype html>
<meta charset="utf-8">
<title>cssom-view - MediaQueryList with empty string</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function () {
var mql = window.matchMedia('');
assert_equals(mql.media, '', "This should be an empty media query list");
assert_equals(mql.matches, true, "Empty media query list should evaluate to true");
});
</script>