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

Unified Diff: content/test/content_browser_test_utils_mac.mm

Issue 10806056: Move plugin_browsertests.cc from browser_tests to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to mac+win fixes Created 8 years, 5 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
Index: content/test/content_browser_test_utils_mac.mm
===================================================================
--- content/test/content_browser_test_utils_mac.mm (revision 0)
+++ content/test/content_browser_test_utils_mac.mm (revision 0)
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/test/content_browser_test_utils.h"
+
+#include <Carbon/Carbon.h>
+#import <Cocoa/Cocoa.h>
+
+#include "ui/gfx/rect.h"
+
+namespace content {
+
+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 -
+ new_bounds.origin.y - new_bounds.size.height;
+ }
+
+ [window setFrame:new_bounds display:NO];
+}
+
+} // namespace content
Property changes on: content\test\content_browser_test_utils_mac.mm
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698