layout/base/tests/test_bug749186.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:961147ab04ac
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=749186
5 Note that this is a crashtest, but because of the special privileges
6 required, it needs to be run as a mochitest. Thus, the expected
7 behavior of this test is that it actually loads and doesn't crash the
8 browser.
9 -->
10 <head>
11 <title>Test for Bug 749186 (Crashtest)</title>
12 <script type="application/javascript" src="/MochiKit/packed.js"></script>
13 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
14 <script>
15 function endTest() {
16 ok(true, 'test finished without crashing');
17 SimpleTest.finish();
18 }
19
20 function setEmPerLineTo0() {
21 SpecialPowers.setIntPref("font.size.inflation.emPerLine", 0);
22 setTimeout(endTest, 100);
23 }
24
25 function removeBoldStyle() {
26 document.getElementById('b').removeAttribute('style');
27 setTimeout(setEmPerLineTo0, 100);
28 }
29
30 function setEmPerLineTo8() {
31 SpecialPowers.setIntPref("font.size.inflation.emPerLine", 8);
32 setTimeout(removeBoldStyle, 100);
33 }
34
35 function startTest() {
36 SimpleTest.waitForExplicitFinish();
37 setTimeout(setEmPerLineTo8, 100);
38 }
39
40 startTest();
41 </script>
42 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
43 </head>
44
45 <body>
46 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749186">Bug 749186</a>
47 <iframe id="a" style="display: none;"></iframe>
48 <div id="b" style="display: inline;"></div>
49 </body>
50 </html>

mercurial