content/html/document/test/test_bug512367.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/html/document/test/test_bug512367.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=512367
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 512367</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.14 +</head>
    1.15 +<body>
    1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=512367">Mozilla Bug 512367</a>
    1.17 +<p id="display">
    1.18 +  <iframe src="bug369370-popup.png" id="i" style="width:200px; height:200px"></iframe>
    1.19 +</p>
    1.20 +<div id="content" style="display: none">
    1.21 +  
    1.22 +</div>
    1.23 +<pre id="test">
    1.24 +<script type="application/javascript">
    1.25 +
    1.26 +var frame = document.getElementById("i");
    1.27 +
    1.28 +SimpleTest.waitForExplicitFinish();
    1.29 +addLoadEvent(function() {
    1.30 +  var viewer =
    1.31 +    SpecialPowers.wrap(frame.contentWindow)
    1.32 +                 .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
    1.33 +                 .getInterface(SpecialPowers.Ci.nsIWebNavigation)
    1.34 +                 .QueryInterface(SpecialPowers.Ci.nsIDocShell)
    1.35 +                 .contentViewer
    1.36 +                 .QueryInterface(SpecialPowers.Ci.nsIMarkupDocumentViewer);
    1.37 +
    1.38 +  viewer.fullZoom = 1.5;
    1.39 +
    1.40 +  setTimeout(function() {
    1.41 +    synthesizeMouse(frame, 30, 30, {});
    1.42 +
    1.43 +    is(viewer.fullZoom, 1.5, "Zoom in the image frame should not have been reset");
    1.44 +
    1.45 +    SimpleTest.finish();
    1.46 +  }, 0);
    1.47 +});
    1.48 +</script>
    1.49 +</pre>
    1.50 +</body>
    1.51 +</html>

mercurial