layout/base/tests/test_bug749186.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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      }
    20      function setEmPerLineTo0() {
    21        SpecialPowers.setIntPref("font.size.inflation.emPerLine", 0);
    22        setTimeout(endTest, 100);
    23      }
    25      function removeBoldStyle() {
    26        document.getElementById('b').removeAttribute('style');
    27        setTimeout(setEmPerLineTo0, 100);
    28      }
    30      function setEmPerLineTo8() {
    31        SpecialPowers.setIntPref("font.size.inflation.emPerLine", 8);
    32        setTimeout(removeBoldStyle, 100);
    33      }
    35      function startTest() {
    36        SimpleTest.waitForExplicitFinish();
    37        setTimeout(setEmPerLineTo8, 100);
    38      }
    40      startTest();
    41     </script>
    42     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    43   </head>
    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