5 testRunner
.dumpAsText();
13 #zoomed_and_displayed {
24 <div id=
"result">FAIL.
</div>
27 <div id=
"zoomed_and_displayed" class=
"test_div">
28 This div has a zoom value of
"2." It has a width of
300px.
30 <div id=
"zoomed_and_hidden" class=
"test_div">
31 This div is has a zoom value of
"2" and is hidden. It has a width of
300px.
34 <script type=
"text/javascript" charset=
"utf-8">
35 var zoomedAndDisplayed = document.getElementById(
"zoomed_and_displayed");
36 var zoomedAndHidden = document.getElementById(
"zoomed_and_hidden");
37 var renderedWidth = zoomedAndDisplayed.scrollWidth;
38 var computedWidthDisplayed = parseFloat(document.defaultView.getComputedStyle(zoomedAndDisplayed).width);
39 var computedWidthHidden = parseFloat(document.defaultView.getComputedStyle(zoomedAndHidden).width);
41 var result = document.getElementById(
"result");
42 if (computedWidthHidden == computedWidthDisplayed && computedWidthDisplayed == renderedWidth)
43 result.innerHTML =
"PASS! Neither the computed width of the displayed div nor the computed width of the display:none div has been affected by the zoom factor.";