Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / style / test / test_bug450191.html
blob8a61c154b7b73523ae3fb2462693275a5e8f3347
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=450191
5 -->
6 <head>
7 <title>Test for Bug 450191</title>
8 <script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="application/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=450191">Mozilla Bug 450191</a>
14 <iframe id="display" src="about:blank"></iframe>
15 <pre id="test">
16 <script type="application/javascript">
18 /** Test for Bug 450191 **/
20 SimpleTest.waitForExplicitFinish();
22 function run() {
23 var iframe = document.getElementById("display");
24 var subdoc = iframe.contentDocument;
25 var subwin = iframe.contentWindow;
27 var doctext = "<div style='font-size: 2em'>div text <table><tr><td id='t'>table text</td></tr></table></div>";
29 function subdoc_body_font() {
30 return subwin.getComputedStyle(subdoc.body, "").fontSize;
33 function subdoc_cell_font() {
34 return subwin.getComputedStyle(subdoc.getElementById("t"), "").fontSize;
37 subdoc.open();
38 subdoc.write(doctext);
39 subdoc.close();
41 is(subdoc_cell_font(), subdoc_body_font(),
42 "Quirks style sheet should be applied.");
44 subdoc.open();
45 subdoc.write("<!DOCTYPE HTML>" + doctext);
46 subdoc.close();
48 isnot(subdoc_cell_font(), subdoc_body_font(),
49 "Quirks style sheet should NOT be applied.");
51 subdoc.open();
52 subdoc.write(doctext);
53 subdoc.close();
55 is(subdoc_cell_font(), subdoc_body_font(),
56 "Quirks style sheet should be applied.");
58 SimpleTest.finish();
62 </script>
63 </pre>
64 </body>
65 </html>