test_bug512367.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. </div>
  19. <pre id="test">
  20. <script type="application/javascript">
  21. var frame = document.getElementById("i");
  22. SimpleTest.waitForExplicitFinish();
  23. addLoadEvent(function() {
  24. var viewer =
  25. SpecialPowers.wrap(frame.contentWindow)
  26. .QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
  27. .getInterface(SpecialPowers.Ci.nsIWebNavigation)
  28. .QueryInterface(SpecialPowers.Ci.nsIDocShell)
  29. .contentViewer;
  30. viewer.fullZoom = 1.5;
  31. setTimeout(function() {
  32. synthesizeMouse(frame, 30, 30, {});
  33. is(viewer.fullZoom, 1.5, "Zoom in the image frame should not have been reset");
  34. SimpleTest.finish();
  35. }, 0);
  36. });
  37. </script>
  38. </pre>
  39. </body>
  40. </html>