Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / style / test / test_bug389464.html
blob074b49f29e4c966c28050f362eb82d204bb215dc
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 -->
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7 <!-- above is to force x-western language group -->
8 <title>Test for preference not to use document colors</title>
9 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
10 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
12 <style type="text/css">
15 </style>
16 </head>
17 <body>
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=58048">Mozilla Bug 58048</a>
19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=255411">Mozilla Bug 255411</a>
20 <div id="display">
22 <pre><font id="one" size="-1">text</font></pre>
23 <p><font id="two" size="-1">text</font></p>
25 </div>
26 <pre id="test">
27 <script class="testbody" type="text/javascript">
29 SimpleTest.waitForExplicitFinish();
31 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
32 var prefService = Components.classes["@mozilla.org/preferences-service;1"].
33 getService(Components.interfaces.nsIPrefService);
34 var fontSizeBranch = prefService.getBranch("font.size.");
36 function get_pref(pref)
38 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
39 return fontSizeBranch.getIntPref(pref);
42 function set_pref(pref, val)
44 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
45 fontSizeBranch.setIntPref(pref, val);
48 var cs1 = getComputedStyle(document.getElementById("one"), "");
49 var cs2 = getComputedStyle(document.getElementById("two"), "");
51 var oldVariable = get_pref("variable.x-western");
52 var oldFixed = get_pref("fixed.x-western");
53 set_pref("variable.x-western", 25);
54 set_pref("fixed.x-western", 20);
55 setTimeout(part1, 0);
57 function part1()
59 var fs1 = cs1.fontSize.match(/(.*)px/)[1];
60 var fs2 = cs2.fontSize.match(/(.*)px/)[1];
61 ok(fs1 < fs2, "<font size=-1> shrinks relative to font-family: -moz-fixed");
63 set_pref("variable.x-western", oldVariable);
64 set_pref("fixed.x-western", oldFixed);
65 SimpleTest.finish();
68 </script>
69 </pre>
70 </body>
71 </html>