layout/base/tests/test_bug842853.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=842853
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 842853</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    13   /** Test for Bug 842853 **/
    15 SimpleTest.waitForExplicitFinish();
    17 function runTest() {
    18   var win = e.contentWindow;
    19   if (win.location.hash != '') {
    20     is(win.scrollY,500);
    21     SimpleTest.finish();
    22     return;
    23   }
    24   win.location.hash='#anchor'
    25   win.scrollTo(0,500);
    26   win.location.reload()
    27 }
    30   </script>
    31 </head>
    32 <body>
    33 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=842853">Mozilla Bug 842853</a>
    34 <p id="display"></p>
    35 <div id="content" style="display: none">
    37 </div>
    38 <pre id="test">
    39 </pre>
    40 <script>
    42 var e = document.createElement('iframe');
    43 var url = 'data:text/html,<a href="%23anchor">Click to scroll to anchor</a><div style="height:5000px"></div><a name="anchor">FAIL</a>'
    44 e.setAttribute('src',url);
    45 e.setAttribute('onload','runTest()');
    46 document.body.appendChild(e);
    48 </script>
    49 </body>
    50 </html>

mercurial