Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2417)

Unified Diff: ash/launcher/launcher_view_unittest.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/launcher/launcher_view_unittest.cc
diff --git a/ash/launcher/launcher_view_unittest.cc b/ash/launcher/launcher_view_unittest.cc
index 3e1e80660add82dde5513f6b6394d0b53c6de39f..2513d553e08d5b896aeae1747a1b8a8b4a532c1c 100644
--- a/ash/launcher/launcher_view_unittest.cc
+++ b/ash/launcher/launcher_view_unittest.cc
@@ -645,9 +645,8 @@ TEST_F(LauncherViewTest, ShouldHideTooltipTest) {
gfx::Rect app_button_rect = GetButtonByID(app_button_id)->GetMirroredBounds();
gfx::Rect tab_button_rect = GetButtonByID(tab_button_id)->GetMirroredBounds();
ASSERT_FALSE(app_button_rect.Intersects(tab_button_rect));
- gfx::Rect union_rect = app_button_rect;
- union_rect.Union(tab_button_rect);
- EXPECT_FALSE(launcher_view_->ShouldHideTooltip(union_rect.CenterPoint()));
+ EXPECT_FALSE(launcher_view_->ShouldHideTooltip(
+ gfx::Union(app_button_rect, tab_button_rect).CenterPoint()));
// The tooltip should hide if it's outside of all buttons.
gfx::Rect all_area;

Powered by Google App Engine
This is Rietveld 408576698