4 https://bugzilla.mozilla.org/show_bug.cgi?id=771043
8 <title>Test for Bug
771043</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
13 /** Test for Bug
771043 **/
17 function callback(arg) {
19 is(arg.matches, expectedValue,
20 "Should have the right value on call #" + callCount +
" to the callback");
21 SimpleTest.executeSoon(tests.shift());
24 function flushLayout() {
25 storedHeight = document.querySelector(
"iframe").offsetHeight;
28 function setHeight(height) {
29 var ifr = document.querySelector(
"iframe");
30 ifr.style.height = height +
"px";
34 SimpleTest.waitForExplicitFinish();
37 () =
> { expectedValue = true; setHeight(
50); },
38 () =
> { expectedValue = false; setHeight(
200); },
40 var ifr = document.querySelector(
"iframe");
41 ifr.style.display =
"none";
43 ifr.style.display =
"";
47 () =
> { expectedValue = false; setHeight(
200); },
48 SimpleTest.finish.bind(SimpleTest)
51 addLoadEvent(function() {
52 var mql = frames[
0].matchMedia(
"(orientation: landscape)");
53 mql.addListener(callback);
60 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=771043">Mozilla Bug
771043</a>
61 <!-- Important: the iframe needs to be displayed -->
62 <p id=
"display"><iframe style=
"width: 100px; height: 200px"</p>
63 <div id=
"content" style=
"display: none">