Loading layout/xul/test/test_popupReflowPos.xhtml +7 −6 Original line number Diff line number Diff line Loading @@ -7,12 +7,10 @@ <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> <!-- test results are displayed in the html:body --> <body xmlns="http://www.w3.org/1999/xhtml"> </body> <!-- test code goes here --> <script type="application/javascript"><![CDATA[ <script><![CDATA[ SimpleTest.waitForExplicitFinish(); function openPopup() Loading @@ -23,12 +21,15 @@ function popupShown(event) { document.getElementById("parent").className = ""; var popup = document.getElementById("thepopup"); var buttonbcr = document.getElementById("thebutton").getBoundingClientRect(); var popupbcr = document.getElementById("thepopup").getOuterScreenRect(); var popupbcr = popup.getOuterScreenRect(); var popupMarginLeft = parseFloat(getComputedStyle(popup).marginLeft); var popupMarginTop = parseFloat(getComputedStyle(popup).marginLeft); ok(Math.abs(popupbcr.x - window.mozInnerScreenX - buttonbcr.x) < 3, "x pos is correct"); ok(Math.abs(popupbcr.y - window.mozInnerScreenY - buttonbcr.bottom) < 3, "y pos is correct"); ok(Math.abs(popupbcr.x - popupMarginLeft - window.mozInnerScreenX - buttonbcr.x) < 3, "x pos is correct"); ok(Math.abs(popupbcr.y - popupMarginTop - window.mozInnerScreenY - buttonbcr.bottom) < 3, "y pos is correct"); event.target.hidePopup(); } Loading layout/xul/test/test_popupZoom.xhtml +5 −5 Original line number Diff line number Diff line Loading @@ -6,12 +6,10 @@ <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> <!-- test results are displayed in the html:body --> <body xmlns="http://www.w3.org/1999/xhtml"> </body> <!-- test code goes here --> <script type="application/javascript"><![CDATA[ <script><![CDATA[ SimpleTest.waitForExplicitFinish(); var savedzoom; Loading @@ -29,11 +27,13 @@ function popupShown(event) { var panel = document.getElementById("panel"); var panelMarginLeft = parseFloat(getComputedStyle(panel).marginLeft); var panelMarginTop = parseFloat(getComputedStyle(panel).marginLeft); var panelbcr = panel.getBoundingClientRect(); var anchorbcr = document.getElementById("anchor").getBoundingClientRect(); ok(Math.abs(panelbcr.x - anchorbcr.x) < 3, "x pos is correct"); ok(Math.abs(panelbcr.y - anchorbcr.bottom) < 3, "y pos is correct"); ok(Math.abs(panelbcr.x - panelMarginLeft - anchorbcr.x) < 3, "x pos is correct"); ok(Math.abs(panelbcr.y - panelMarginTop - anchorbcr.bottom) < 3, "y pos is correct"); SpecialPowers.setFullZoom(window, savedzoom); Loading Loading
layout/xul/test/test_popupReflowPos.xhtml +7 −6 Original line number Diff line number Diff line Loading @@ -7,12 +7,10 @@ <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> <!-- test results are displayed in the html:body --> <body xmlns="http://www.w3.org/1999/xhtml"> </body> <!-- test code goes here --> <script type="application/javascript"><![CDATA[ <script><![CDATA[ SimpleTest.waitForExplicitFinish(); function openPopup() Loading @@ -23,12 +21,15 @@ function popupShown(event) { document.getElementById("parent").className = ""; var popup = document.getElementById("thepopup"); var buttonbcr = document.getElementById("thebutton").getBoundingClientRect(); var popupbcr = document.getElementById("thepopup").getOuterScreenRect(); var popupbcr = popup.getOuterScreenRect(); var popupMarginLeft = parseFloat(getComputedStyle(popup).marginLeft); var popupMarginTop = parseFloat(getComputedStyle(popup).marginLeft); ok(Math.abs(popupbcr.x - window.mozInnerScreenX - buttonbcr.x) < 3, "x pos is correct"); ok(Math.abs(popupbcr.y - window.mozInnerScreenY - buttonbcr.bottom) < 3, "y pos is correct"); ok(Math.abs(popupbcr.x - popupMarginLeft - window.mozInnerScreenX - buttonbcr.x) < 3, "x pos is correct"); ok(Math.abs(popupbcr.y - popupMarginTop - window.mozInnerScreenY - buttonbcr.bottom) < 3, "y pos is correct"); event.target.hidePopup(); } Loading
layout/xul/test/test_popupZoom.xhtml +5 −5 Original line number Diff line number Diff line Loading @@ -6,12 +6,10 @@ <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> <!-- test results are displayed in the html:body --> <body xmlns="http://www.w3.org/1999/xhtml"> </body> <!-- test code goes here --> <script type="application/javascript"><![CDATA[ <script><![CDATA[ SimpleTest.waitForExplicitFinish(); var savedzoom; Loading @@ -29,11 +27,13 @@ function popupShown(event) { var panel = document.getElementById("panel"); var panelMarginLeft = parseFloat(getComputedStyle(panel).marginLeft); var panelMarginTop = parseFloat(getComputedStyle(panel).marginLeft); var panelbcr = panel.getBoundingClientRect(); var anchorbcr = document.getElementById("anchor").getBoundingClientRect(); ok(Math.abs(panelbcr.x - anchorbcr.x) < 3, "x pos is correct"); ok(Math.abs(panelbcr.y - anchorbcr.bottom) < 3, "y pos is correct"); ok(Math.abs(panelbcr.x - panelMarginLeft - anchorbcr.x) < 3, "x pos is correct"); ok(Math.abs(panelbcr.y - panelMarginTop - anchorbcr.bottom) < 3, "y pos is correct"); SpecialPowers.setFullZoom(window, savedzoom); Loading