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

Unified Diff: ui/views/widget/native_widget_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/views/event_monitor_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac_unittest.mm
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm
index 0ff4fbf20e95fb99abf1ea56dca5d625c920aebb..2670ed6b13407904b5d35b482aea20877f93d6d7 100644
--- a/ui/views/widget/native_widget_mac_unittest.mm
+++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -1081,7 +1081,7 @@ TEST_F(NativeWidgetMacTest, GetWorkAreaBoundsInScreen) {
params.bounds = gfx::Rect(100, 100, 300, 200);
widget.Init(params);
widget.Show();
- NSRect expected = [[[NSScreen screens] objectAtIndex:0] visibleFrame];
+ NSRect expected = [[[NSScreen screens] firstObject] visibleFrame];
NSRect actual = gfx::ScreenRectToNSRect(widget.GetWorkAreaBoundsInScreen());
EXPECT_FALSE(NSIsEmptyRect(actual));
EXPECT_NSEQ(expected, actual);
« no previous file with comments | « ui/views/event_monitor_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698