|
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"> |
|
18 |
|
19 </div> |
|
20 <pre id="test"> |
|
21 <script type="application/javascript"> |
|
22 |
|
23 var frame = document.getElementById("i"); |
|
24 |
|
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); |
|
34 |
|
35 viewer.fullZoom = 1.5; |
|
36 |
|
37 setTimeout(function() { |
|
38 synthesizeMouse(frame, 30, 30, {}); |
|
39 |
|
40 is(viewer.fullZoom, 1.5, "Zoom in the image frame should not have been reset"); |
|
41 |
|
42 SimpleTest.finish(); |
|
43 }, 0); |
|
44 }); |
|
45 </script> |
|
46 </pre> |
|
47 </body> |
|
48 </html> |