layout/base/tests/test_bug749186.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/base/tests/test_bug749186.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=749186
     1.8 +Note that this is a crashtest, but because of the special privileges
     1.9 +required, it needs to be run as a mochitest. Thus, the expected
    1.10 +behavior of this test is that it actually loads and doesn't crash the
    1.11 +browser.
    1.12 +-->
    1.13 +  <head>
    1.14 +    <title>Test for Bug 749186 (Crashtest)</title>
    1.15 +    <script type="application/javascript" src="/MochiKit/packed.js"></script>
    1.16 +    <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.17 +    <script>
    1.18 +     function endTest() {
    1.19 +       ok(true, 'test finished without crashing');
    1.20 +       SimpleTest.finish();
    1.21 +     }
    1.22 +
    1.23 +     function setEmPerLineTo0() {
    1.24 +       SpecialPowers.setIntPref("font.size.inflation.emPerLine", 0);
    1.25 +       setTimeout(endTest, 100);
    1.26 +     }
    1.27 +
    1.28 +     function removeBoldStyle() {
    1.29 +       document.getElementById('b').removeAttribute('style');
    1.30 +       setTimeout(setEmPerLineTo0, 100);
    1.31 +     }
    1.32 +
    1.33 +     function setEmPerLineTo8() {
    1.34 +       SpecialPowers.setIntPref("font.size.inflation.emPerLine", 8);
    1.35 +       setTimeout(removeBoldStyle, 100);
    1.36 +     }
    1.37 +
    1.38 +     function startTest() {
    1.39 +       SimpleTest.waitForExplicitFinish();
    1.40 +       setTimeout(setEmPerLineTo8, 100);
    1.41 +     }
    1.42 +
    1.43 +     startTest();
    1.44 +    </script>
    1.45 +    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.46 +  </head>
    1.47 +
    1.48 +  <body>
    1.49 +    <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749186">Bug 749186</a>
    1.50 +    <iframe id="a" style="display: none;"></iframe>
    1.51 +    <div id="b" style="display: inline;"></div>
    1.52 +  </body>
    1.53 +</html>

mercurial