Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Fix positioning test for chrome-linux. Browser size change
Browse files Browse the repository at this point in the history
is causing bad values on positioning.

R=chrishenry
DELTA=5 (4 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6264


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2511 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information
nnaze@google.com committed Feb 6, 2013
1 parent 2194df1 commit ab09db2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion closure/goog/positioning/positioning_test.html
Expand Up @@ -479,12 +479,16 @@
popup, corner.TOP_START); popup, corner.TOP_START);
anchorRect = goog.style.getBounds(anchor); anchorRect = goog.style.getBounds(anchor);
popupRect = goog.style.getBounds(popup); popupRect = goog.style.getBounds(popup);

var visibleAnchorRect = goog.positioning.getVisiblePart_(anchor);
var visibleAnchorBox = visibleAnchorRect.toBox();

assertRoundedEquals('Right edge of popup should line up with right edge ' + assertRoundedEquals('Right edge of popup should line up with right edge ' +
'of anchor.', 'of anchor.',
anchorRect.left + anchorRect.width, anchorRect.left + anchorRect.width,
popupRect.left + popupRect.width); popupRect.left + popupRect.width);
assertRoundedEquals('Popup should be positioned just below the anchor.', assertRoundedEquals('Popup should be positioned just below the anchor.',
anchorRect.top + anchorRect.height, visibleAnchorBox.bottom,
popupRect.top); popupRect.top);
} }


Expand Down

0 comments on commit ab09db2

Please sign in to comment.