| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #import "base/mac/mac_util.h" | 7 #import "base/mac/mac_util.h" |
| 8 #include "base/mac/sdk_forward_declarations.h" |
| 8 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/devtools/devtools_window.h" | 12 #include "chrome/browser/devtools/devtools_window.h" |
| 12 #include "chrome/browser/infobars/infobar_service.h" | 13 #include "chrome/browser/infobars/infobar_service.h" |
| 13 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" | 14 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" | 17 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" |
| 17 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 32 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 32 #include "chrome/browser/ui/find_bar/find_bar.h" | 33 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 33 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 34 #include "chrome/test/base/in_process_browser_test.h" | 35 #include "chrome/test/base/in_process_browser_test.h" |
| 35 #include "chrome/test/base/testing_profile.h" | 36 #include "chrome/test/base/testing_profile.h" |
| 36 #include "content/public/browser/web_contents.h" | 37 #include "content/public/browser/web_contents.h" |
| 37 #import "testing/gtest_mac.h" | 38 #import "testing/gtest_mac.h" |
| 38 | 39 |
| 39 namespace { | 40 namespace { |
| 40 | 41 |
| 41 #if !defined(MAC_OS_X_VERSION_10_7) || \ | |
| 42 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | |
| 43 enum { | |
| 44 NSWindowDocumentVersionsButton = 6, | |
| 45 NSWindowFullScreenButton | |
| 46 }; | |
| 47 #endif // MAC_OS_X_VERSION_10_7 | |
| 48 | |
| 49 void CreateProfileCallback(const base::Closure& quit_closure, | 42 void CreateProfileCallback(const base::Closure& quit_closure, |
| 50 Profile* profile, | 43 Profile* profile, |
| 51 Profile::CreateStatus status) { | 44 Profile::CreateStatus status) { |
| 52 EXPECT_TRUE(profile); | 45 EXPECT_TRUE(profile); |
| 53 EXPECT_NE(Profile::CREATE_STATUS_LOCAL_FAIL, status); | 46 EXPECT_NE(Profile::CREATE_STATUS_LOCAL_FAIL, status); |
| 54 EXPECT_NE(Profile::CREATE_STATUS_REMOTE_FAIL, status); | 47 EXPECT_NE(Profile::CREATE_STATUS_REMOTE_FAIL, status); |
| 55 // This will be called multiple times. Wait until the profile is initialized | 48 // This will be called multiple times. Wait until the profile is initialized |
| 56 // fully to quit the loop. | 49 // fully to quit the loop. |
| 57 if (status == Profile::CREATE_STATUS_INITIALIZED) | 50 if (status == Profile::CREATE_STATUS_INITIALIZED) |
| 58 quit_closure.Run(); | 51 quit_closure.Run(); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 StatusBubblePositioning) { | 366 StatusBubblePositioning) { |
| 374 NSPoint origin = [controller() statusBubbleBaseFrame].origin; | 367 NSPoint origin = [controller() statusBubbleBaseFrame].origin; |
| 375 | 368 |
| 376 DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindowForTest( | 369 DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindowForTest( |
| 377 browser(), true); | 370 browser(), true); |
| 378 SetDevToolsWindowContentsBounds(devtools_window, gfx::Rect(10, 10, 100, 100)); | 371 SetDevToolsWindowContentsBounds(devtools_window, gfx::Rect(10, 10, 100, 100)); |
| 379 | 372 |
| 380 NSPoint originWithDevTools = [controller() statusBubbleBaseFrame].origin; | 373 NSPoint originWithDevTools = [controller() statusBubbleBaseFrame].origin; |
| 381 EXPECT_FALSE(NSEqualPoints(origin, originWithDevTools)); | 374 EXPECT_FALSE(NSEqualPoints(origin, originWithDevTools)); |
| 382 } | 375 } |
| OLD | NEW |