| Index: chrome/browser/automation/automation_provider_mac.mm
|
| diff --git a/chrome/browser/automation/automation_provider_mac.mm b/chrome/browser/automation/automation_provider_mac.mm
|
| index b475f4d4e02d536bcfc53be54c506cd1525235bc..e17d59c9b9b2c013d4483a963ab10cb3de9b4e54 100644
|
| --- a/chrome/browser/automation/automation_provider_mac.mm
|
| +++ b/chrome/browser/automation/automation_provider_mac.mm
|
| @@ -22,10 +22,11 @@ void AutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds,
|
| if (window) {
|
| NSRect new_bounds = NSRectFromCGRect(bounds.ToCGRect());
|
|
|
| - // This is likely incorrect for a multiple-monitor setup; OK because this
|
| - // is used only for testing purposes.
|
| - new_bounds.origin.y = [[window screen] frame].size.height -
|
| - new_bounds.origin.y - new_bounds.size.height;
|
| + 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];
|
| *success = true;
|
|
|