4 https://bugzilla.mozilla.org/show_bug.cgi?id=449781
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" />
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">
19 <script class=
"testbody" type=
"text/javascript">
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");