4 https://bugzilla.mozilla.org/show_bug.cgi?id=156716
7 <title>Test for Bug
156716</title>
8 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=156716">Mozilla Bug
156716</a>
14 <iframe id=
"display" src=
"media_queries_dynamic_xbl_iframe.html"></iframe>
16 <script class=
"testbody" type=
"text/javascript">
18 /** Test for Bug
156716 **/
21 var iframe = document.getElementById(
"display");
23 var subdoc = iframe.contentDocument;
24 var subwin = iframe.contentWindow;
25 var p = subdoc.getElementById(
"para");
27 iframe.setAttribute(
"style",
"height: 300px; width: 100px");
28 is(subwin.getComputedStyle(p,
"").color,
"rgb(128, 0, 128)",
29 "should be purple when portait");
30 iframe.setAttribute(
"style",
"height: 100px; width: 300px");
31 is(subwin.getComputedStyle(p,
"").color,
"rgb(0, 0, 255)",
32 "should be blue when landscape");
35 SimpleTest.waitForExplicitFinish();