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

Unified Diff: ui/gfx/mac/coordinate_conversion_unittest.mm

Issue 1380083005: Mac: Use [NSArray firstObject] for [NSScreen screens] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/gfx/mac/coordinate_conversion.mm ('k') | ui/gfx/screen_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mac/coordinate_conversion_unittest.mm
diff --git a/ui/gfx/mac/coordinate_conversion_unittest.mm b/ui/gfx/mac/coordinate_conversion_unittest.mm
index ac882fa65dff57e2125b90d6f8d34fee0680d060..ccddbe81dbc3eed50f33f727312ebfab6f4d034b 100644
--- a/ui/gfx/mac/coordinate_conversion_unittest.mm
+++ b/ui/gfx/mac/coordinate_conversion_unittest.mm
@@ -48,7 +48,7 @@ class MacCoordinateConversionTest : public PlatformTest {
void MacCoordinateConversionTest::SetUp() {
// Before swizzling, do a sanity check that the primary screen's origin is
// (0, 0). This should always be true.
- NSRect primary_screen_frame = [[[NSScreen screens] objectAtIndex:0] frame];
+ NSRect primary_screen_frame = [[[NSScreen screens] firstObject] frame];
EXPECT_EQ(0, primary_screen_frame.origin.x);
EXPECT_EQ(0, primary_screen_frame.origin.y);
@@ -57,7 +57,7 @@ void MacCoordinateConversionTest::SetUp() {
[MacCoordinateConversionTestScreenDonor class],
@selector(frame)));
- primary_screen_frame = [[[NSScreen screens] objectAtIndex:0] frame];
+ primary_screen_frame = [[[NSScreen screens] firstObject] frame];
EXPECT_EQ(kTestWidth, primary_screen_frame.size.width);
EXPECT_EQ(kTestHeight, primary_screen_frame.size.height);
}
« no previous file with comments | « ui/gfx/mac/coordinate_conversion.mm ('k') | ui/gfx/screen_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698