no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / base / tests / test_bug449781.html
blob3326bb07517f33f7174154f8700ff8f154e74496
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=449781
5 -->
6 <head>
7 <title>Test for Bug 449781</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script src="/tests/SimpleTest/WindowSnapshot.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=449781">Mozilla Bug 449781</a>
14 <p id="display">Canary</p>
15 <iframe src="about:blank" id="ourFrame" style="visibility: hidden">
16 </iframe>
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
20 var s1, s2, s3, s4;
22 /** Test for Bug 449781 **/
23 SimpleTest.waitForExplicitFinish();
24 addLoadEvent(function() {
25 s1 = snapshotWindow(window);
27 $("ourFrame").style.display = "none";
28 is($("ourFrame").offsetWidth, 0, "Unexpected width after hiding");
29 $("ourFrame").style.display = "";
30 is($("ourFrame").clientWidth, 300, "Unexpected width after showing");
32 s2 = snapshotWindow(window);
34 var equal, str1, str2;
35 [equal, str1, str2] = compareSnapshots(s1, s2, true);
36 ok(equal, "Show/hide should have no effect - " +
37 "got " + str1 + " but expected " + str2);
39 SpecialPowers.setFullZoom($("ourFrame").contentWindow, 2);
41 s3 = snapshotWindow(window);
43 [equal, str1, str2] = compareSnapshots(s1, s3, true);
44 ok(equal, "Zoom should have no effect - " +
45 "got " + str1 + " but expected " + str2);
47 $("display").style.display = "none";
49 s4 = snapshotWindow(window);
50 [equal, str1, str2] = compareSnapshots(s3, s4, true);
51 ok(!equal, "Should be able to see the canary");
53 SimpleTest.finish();
54 });
58 </script>
59 </pre>
60 </body>
61 </html>