mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision d3cf77a7b8c20c678b725238eaa8a72eca3787ae
This commit is contained in:
parent
880f3b8b7a
commit
efca990ffe
541 changed files with 8000 additions and 2276 deletions
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test: matchMedia works on display: none iframes</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-window-matchmedia">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
function frameLoaded(frame) {
|
||||
test(function() {
|
||||
assert_true(frame.contentWindow.matchMedia("all").matches);
|
||||
}, "matchMedia should work in display: none iframes");
|
||||
test(function() {
|
||||
assert_true(frame.contentWindow.matchMedia("(min-width: 0)").matches);
|
||||
assert_true(!frame.contentWindow.matchMedia("(min-width: 1px)").matches);
|
||||
}, "matchMedia should assume a 0x0 viewport in display: none iframes");
|
||||
}
|
||||
</script>
|
||||
<iframe style="display: none" onload="frameLoaded(this)"></iframe>
|
Loading…
Add table
Add a link
Reference in a new issue