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

Unified Diff: content/renderer/disambiguation_popup_helper_unittest.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO Created 8 years, 1 month 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
« no previous file with comments | « content/renderer/disambiguation_popup_helper.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/disambiguation_popup_helper_unittest.cc
diff --git a/content/renderer/disambiguation_popup_helper_unittest.cc b/content/renderer/disambiguation_popup_helper_unittest.cc
index 2aaeb84e06f5d87023182ec825795e6162247809..b3da46af73e863e3c0abcd93b095c3a67cb0a0bb 100644
--- a/content/renderer/disambiguation_popup_helper_unittest.cc
+++ b/content/renderer/disambiguation_popup_helper_unittest.cc
@@ -39,7 +39,7 @@ TEST_F(DisambiguationPopupHelperUnittest, ClipByViewport) {
EXPECT_TRUE(gfx::Rect(kViewportSize_).Contains(zoom_rect));
EXPECT_LE(kDisambiguationPopupMinScale, scale);
- gfx::Size scaled_size = ToCeiledSize(zoom_rect.size().Scale(scale));
+ gfx::Size scaled_size = ToCeiledSize(ScaleSize(zoom_rect.size(), scale));
EXPECT_TRUE(gfx::Rect(kViewportSize_).Contains(gfx::Rect(scaled_size)));
}
@@ -56,7 +56,7 @@ TEST_F(DisambiguationPopupHelperUnittest, MiniTarget) {
EXPECT_EQ(kDisambiguationPopupMaxScale, scale);
EXPECT_TRUE(zoom_rect.Contains(target_rects[0]));
- gfx::Size scaled_size = ToCeiledSize(zoom_rect.size().Scale(scale));
+ gfx::Size scaled_size = ToCeiledSize(ScaleSize(zoom_rect.size(), scale));
EXPECT_TRUE(gfx::Rect(kViewportSize_).Contains(gfx::Rect(scaled_size)));
}
@@ -74,7 +74,7 @@ TEST_F(DisambiguationPopupHelperUnittest, LongLinks) {
EXPECT_EQ(kDisambiguationPopupMaxScale, scale);
EXPECT_TRUE(zoom_rect.Contains(tap_rect));
- gfx::Size scaled_size = ToCeiledSize(zoom_rect.size().Scale(scale));
+ gfx::Size scaled_size = ToCeiledSize(ScaleSize(zoom_rect.size(), scale));
EXPECT_TRUE(gfx::Rect(kViewportSize_).Contains(gfx::Rect(scaled_size)));
}
« no previous file with comments | « content/renderer/disambiguation_popup_helper.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698