1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/style/test/test_bug389464.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 + 1.8 +--> 1.9 +<head> 1.10 + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 1.11 + <!-- above is to force x-western language group --> 1.12 + <title>Test for preference not to use document colors</title> 1.13 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.14 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.15 + <style type="text/css"> 1.16 + 1.17 + 1.18 + </style> 1.19 +</head> 1.20 +<body> 1.21 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=58048">Mozilla Bug 58048</a> 1.22 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=255411">Mozilla Bug 255411</a> 1.23 +<div id="display"> 1.24 + 1.25 +<pre><font id="one" size="-1">text</font></pre> 1.26 +<p><font id="two" size="-1">text</font></p> 1.27 + 1.28 +</div> 1.29 +<pre id="test"> 1.30 +<script class="testbody" type="text/javascript"> 1.31 + 1.32 +SimpleTest.waitForExplicitFinish(); 1.33 + 1.34 +var cs1 = getComputedStyle(document.getElementById("one"), ""); 1.35 +var cs2 = getComputedStyle(document.getElementById("two"), ""); 1.36 + 1.37 +SpecialPowers.pushPrefEnv({'set': [['variable.x-western', 25], ['fixed.x-western', 20]]}, part1); 1.38 + 1.39 +function part1() 1.40 +{ 1.41 + var fs1 = cs1.fontSize.match(/(.*)px/)[1]; 1.42 + var fs2 = cs2.fontSize.match(/(.*)px/)[1]; 1.43 + ok(fs1 < fs2, "<font size=-1> shrinks relative to font-family: -moz-fixed"); 1.44 + 1.45 + SimpleTest.finish(); 1.46 +} 1.47 + 1.48 +</script> 1.49 +</pre> 1.50 +</body> 1.51 +</html>