Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / style / test / test_media_queries_dynamic_xbl.html
blob7ab8a6d6670f0c1e1391dd8097b2d5a62f9ecd8e
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=156716
5 -->
6 <head>
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" />
11 </head>
12 <body onload="run()">
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>
15 <pre id="test">
16 <script class="testbody" type="text/javascript">
18 /** Test for Bug 156716 **/
20 function run() {
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");
33 SimpleTest.finish();
35 SimpleTest.waitForExplicitFinish();
37 </script>
38 </pre>
39 </body>
40 </html>