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

Unified Diff: ui/events/cocoa/events_mac_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/base/test/ui_controls_mac.mm ('k') | ui/gfx/color_profile_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/cocoa/events_mac_unittest.mm
diff --git a/ui/events/cocoa/events_mac_unittest.mm b/ui/events/cocoa/events_mac_unittest.mm
index c4169bf80de7729064c57b1db26a9544d4e46957..ff943b9f3de0b1d4727aa2b419c3aa15d5612cf9 100644
--- a/ui/events/cocoa/events_mac_unittest.mm
+++ b/ui/events/cocoa/events_mac_unittest.mm
@@ -109,7 +109,7 @@ class EventsMacTest : public CocoaTest {
NSPointFromCGPoint(Flip(window_location).ToCGPoint());
NSPoint screen_point = [test_window() convertBaseToScreen:window_point];
CGFloat primary_screen_height =
- NSHeight([[[NSScreen screens] objectAtIndex:0] frame]);
+ NSHeight([[[NSScreen screens] firstObject] frame]);
screen_point.y = primary_screen_height - screen_point.y;
CGEventSetLocation(scroll, NSPointToCGPoint(screen_point));
return [NSEvent eventWithCGEvent:scroll];
« no previous file with comments | « ui/base/test/ui_controls_mac.mm ('k') | ui/gfx/color_profile_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698