Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix positioning test that fails when the anchor is partially visible.

This is causing a failure when testing team is updating its
browser sizes.

R=chrishenry
DELTA=6 (4 added, 0 deleted, 2 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6206


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2473 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information...
commit 4798bcc7fbbdc1363d629a6cb1447c2932f28e29 1 parent a2847d3
nnaze@google.com authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 closure/goog/positioning/positioning_test.html
View
8 closure/goog/positioning/positioning_test.html
@@ -397,12 +397,16 @@
new goog.math.Box(1, 2, 3, 4));
anchorRect = goog.style.getBounds(anchor);
popupRect = goog.style.getBounds(popup);
+
+ var visibleAnchorRect = goog.positioning.getVisiblePart_(anchor);
+
assertRoundedEquals('Right edge of popup should line up with right edge ' +
'of anchor.',
- anchorRect.left + anchorRect.width,
+ visibleAnchorRect.left + visibleAnchorRect.width,
popupRect.left + popupRect.width + 2);
+
assertRoundedEquals('Popup should be positioned just below the anchor.',
- anchorRect.top + anchorRect.height,
+ visibleAnchorRect.top + visibleAnchorRect.height,
popupRect.top - 1);
}
Please sign in to comment.
Something went wrong with that request. Please try again.