layout/generic/test/test_bug503813.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=503813
     5 -->
     6 <head>
     7   <title>Test for Bug 503813</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     9   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>        
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    11   <style>
    12    #a:after { content:"anonymous text"; display:block; height:10px; }
    13    #a:hover:after { content:"hover content"; display:block; height:20px; }
    14    #b:after { content:"anonymous text"; display:block; height:10px; }
    15    #b:hover:after { content:url(file_Dolske.png); display:block; height:20px; }
    16   </style>
    17 </head>
    18 <body>
    19 <div id="content" style="width:300px;">
    20   <div id="a" style="margin:10px;"></div>
    21   <div id="b" style="margin:10px;"></div>
    22 </div>
    23 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=503813">Mozilla Bug 503813</a>
    24 <pre id="test">
    25 <script class="testbody" type="text/javascript">
    26 /** Test for Bug 503813 **/
    27 function test()
    28 {
    29   synthesizeMouse(document.getElementById("a"), 5, 5, { type: "mousemove" });
    30   is(document.getElementById("a").getBoundingClientRect().height, 20,
    31      "Expected hover style");
    32   synthesizeMouse(document.getElementById("b"), 5, 5, { type: "mousemove" });
    33   is(document.getElementById("b").getBoundingClientRect().height, 20,
    34      "Expected hover style");
    35   SimpleTest.finish();
    36 }
    37 // Run 'test' when we've exited paint suppression and done layout
    38 window.onload = function() { setTimeout(test, 0); };
    39 SimpleTest.waitForExplicitFinish();
    40 </script>
    41 </pre>
    42 </body>
    43 </html>

mercurial