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

Unified Diff: ui/base/cocoa/base_view_unittest.mm

Issue 10545050: mac: Use NSWidth() and friends in a few more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 8 years, 6 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
« no previous file with comments | « ui/base/cocoa/base_view.mm ('k') | ui/base/cocoa/underlay_opengl_hosting_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/base_view_unittest.mm
diff --git a/ui/base/cocoa/base_view_unittest.mm b/ui/base/cocoa/base_view_unittest.mm
index 79a9f4af8d2877ce40abd97b5b02cbf57b71d40c..a28c6d3edc7d28220fd54740f5b5eebeecd4ed2c 100644
--- a/ui/base/cocoa/base_view_unittest.mm
+++ b/ui/base/cocoa/base_view_unittest.mm
@@ -34,15 +34,15 @@ TEST_F(BaseViewTest, flipNSRectToRect) {
gfx::Rect converted = [view_ flipNSRectToRect:convert];
EXPECT_EQ(converted.x(), 10);
EXPECT_EQ(converted.y(), 40); // Due to view being 100px tall.
- EXPECT_EQ(converted.width(), convert.size.width);
- EXPECT_EQ(converted.height(), convert.size.height);
+ EXPECT_EQ(converted.width(), NSWidth(convert));
+ EXPECT_EQ(converted.height(), NSHeight(convert));
// Go back the other way.
NSRect back_again = [view_ flipRectToNSRect:converted];
- EXPECT_EQ(back_again.origin.x, convert.origin.x);
- EXPECT_EQ(back_again.origin.y, convert.origin.y);
- EXPECT_EQ(back_again.size.width, convert.size.width);
- EXPECT_EQ(back_again.size.height, convert.size.height);
+ EXPECT_EQ(NSMinX(back_again), NSMinX(convert));
+ EXPECT_EQ(NSMinY(back_again), NSMinY(convert));
+ EXPECT_EQ(NSWidth(back_again), NSWidth(convert));
+ EXPECT_EQ(NSHeight(back_again), NSHeight(convert));
}
} // namespace
« no previous file with comments | « ui/base/cocoa/base_view.mm ('k') | ui/base/cocoa/underlay_opengl_hosting_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698