4 https://bugzilla.mozilla.org/show_bug.cgi?id=450191
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"/>
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>
16 <script type=
"application/javascript">
18 /** Test for Bug
450191 **/
20 SimpleTest.waitForExplicitFinish();
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;
38 subdoc.write(doctext);
41 is(subdoc_cell_font(), subdoc_body_font(),
42 "Quirks style sheet should be applied.");
45 subdoc.write(
"<!DOCTYPE HTML>" + doctext);
48 isnot(subdoc_cell_font(), subdoc_body_font(),
49 "Quirks style sheet should NOT be applied.");
52 subdoc.write(doctext);
55 is(subdoc_cell_font(), subdoc_body_font(),
56 "Quirks style sheet should be applied.");