layout/style/test/test_bug383075.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <html>
michael@0 3 <!--
michael@0 4 https://bugzilla.mozilla.org/show_bug.cgi?id=383075
michael@0 5 -->
michael@0 6 <head>
michael@0 7 <title>Test for bug 383075</title>
michael@0 8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
michael@0 10 <style type="text/css">
michael@0 11
michael@0 12 html,body {
michael@0 13 color:black; background-color:white; font-size:16px; font-family: Arial;
michael@0 14 }
michael@0 15
michael@0 16
michael@0 17 </style>
michael@0 18 </head>
michael@0 19 <body>
michael@0 20 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=383075">Mozilla bug 383075</a>
michael@0 21 <p id="display">
michael@0 22
michael@0 23 The X'es below should have the same size:<br>
michael@0 24
michael@0 25 <span id="a1" style="font-size:72px;">X</span>
michael@0 26 <span id="a2" style="font-size:72px;">X</span>
michael@0 27 <span id="a3" style="font-size:72px;">X</span>
michael@0 28 <span id="a4" style="font-size:72px;">X</span>
michael@0 29 <span id="a5" style="font-size:72px;">X</span>
michael@0 30 <span id="a6" style="font-size:72px;">X</span>
michael@0 31 <span id="a7" style="font-size:24px;">X</span>
michael@0 32 <span id="a8" style="font-size:72px;">X</span>
michael@0 33 <span id="a9" style="font:24px Arial;">X</span>
michael@0 34
michael@0 35 <br>
michael@0 36
michael@0 37 <span id="b1" style="font-size:72px;">X</span>
michael@0 38 <span id="b2" style="font-size:72px;">X</span>
michael@0 39 <span id="b3" style="font-size:72px;">X</span>
michael@0 40 <span id="b4" style="font-size:72px;">X</span>
michael@0 41 <span id="b5" style="font-size:72px;">X</span>
michael@0 42 <span id="b6" style="font-size:72px;">X</span>
michael@0 43 <span id="b7" style="font-size:24px;">X</span>
michael@0 44 <span id="b8" style="font-size:72px;">X</span>
michael@0 45 <span id="b9" style="font:24px Arial;">X</span>
michael@0 46 </p>
michael@0 47
michael@0 48 <pre id="test">
michael@0 49 <script class="testbody" type="text/javascript">
michael@0 50
michael@0 51 document.getElementById("a1").style.fontSize = "illegal";
michael@0 52 document.getElementById("a2").style.fontSize = "24px;";
michael@0 53 document.getElementById("a3").style.fontSize = "24px; font-size-adjust:2";
michael@0 54 document.getElementById("a4").style.fontSize = ";";
michael@0 55 document.getElementById("a5").style.font = "24px Arial;";
michael@0 56 document.getElementById("a6").style.font = "24px;";
michael@0 57 document.getElementById("a7").style.fontSize = " 72px "; // correct
michael@0 58 document.getElementById("a8").style.font = ";";
michael@0 59 document.getElementById("a9").style.font = " 72px Arial "; // correct
michael@0 60
michael@0 61 document.getElementById("b1").style.setProperty("font-size", "illegal", null);
michael@0 62 document.getElementById("b2").style.setProperty("font-size", "24px;", null);
michael@0 63 document.getElementById("b3").style.setProperty("font-size", "24px; font-size-adjust:2", null);
michael@0 64 document.getElementById("b4").style.setProperty("font-size", ";", null);
michael@0 65 document.getElementById("b5").style.setProperty("font", "24px Arial;", null);
michael@0 66 document.getElementById("b6").style.setProperty("font", "24px;", null);
michael@0 67 document.getElementById("b7").style.setProperty("font-size", " 72px ", null); // correct
michael@0 68 document.getElementById("b8").style.setProperty("font", ";", null);
michael@0 69 document.getElementById("b9").style.setProperty("font", " 72px Arial ", null); // correct
michael@0 70
michael@0 71
michael@0 72 for (i=1; i <= 9; ++i)
michael@0 73 is($('a'+i).style.fontSize, '72px', "font size");
michael@0 74
michael@0 75 for (i=1; i <= 9; ++i)
michael@0 76 is($('b'+i).style.fontSize, '72px', "font size");
michael@0 77
michael@0 78
michael@0 79 </script>
michael@0 80 </pre>
michael@0 81
michael@0 82 </body>
michael@0 83 </html>
michael@0 84

mercurial