content/html/document/test/test_bug512367.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=512367
     5 -->
     6 <head>
     7   <title>Test for Bug 512367</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=512367">Mozilla Bug 512367</a>
    14 <p id="display">
    15   <iframe src="bug369370-popup.png" id="i" style="width:200px; height:200px"></iframe>
    16 </p>
    17 <div id="content" style="display: none">
    19 </div>
    20 <pre id="test">
    21 <script type="application/javascript">
    23 var frame = document.getElementById("i");
    25 SimpleTest.waitForExplicitFinish();
    26 addLoadEvent(function() {
    27   var viewer =
    28     SpecialPowers.wrap(frame.contentWindow)
    29                  .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
    30                  .getInterface(SpecialPowers.Ci.nsIWebNavigation)
    31                  .QueryInterface(SpecialPowers.Ci.nsIDocShell)
    32                  .contentViewer
    33                  .QueryInterface(SpecialPowers.Ci.nsIMarkupDocumentViewer);
    35   viewer.fullZoom = 1.5;
    37   setTimeout(function() {
    38     synthesizeMouse(frame, 30, 30, {});
    40     is(viewer.fullZoom, 1.5, "Zoom in the image frame should not have been reset");
    42     SimpleTest.finish();
    43   }, 0);
    44 });
    45 </script>
    46 </pre>
    47 </body>
    48 </html>

mercurial