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

Unified Diff: content/public/test/content_browser_test_utils_mac.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 | « content/browser/web_contents/web_contents_view_mac.mm ('k') | ui/base/test/ui_controls_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/content_browser_test_utils_mac.mm
diff --git a/content/public/test/content_browser_test_utils_mac.mm b/content/public/test/content_browser_test_utils_mac.mm
index 165a1776c9de0acf9928f1659a38431e69fac6b9..d2e879cfa3526bdd20a88b0a5625c60feaa9a15f 100644
--- a/content/public/test/content_browser_test_utils_mac.mm
+++ b/content/public/test/content_browser_test_utils_mac.mm
@@ -15,7 +15,7 @@ void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds) {
NSRect new_bounds = NSRectFromCGRect(bounds.ToCGRect());
if ([[NSScreen screens] count] > 0) {
new_bounds.origin.y =
- [[[NSScreen screens] objectAtIndex:0] frame].size.height -
+ [[[NSScreen screens] firstObject] frame].size.height -
new_bounds.origin.y - new_bounds.size.height;
}
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | ui/base/test/ui_controls_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698