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/panels/panel_cocoa.h" |
| 6 |
5 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
6 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
7 | 9 |
| 10 #include <memory> |
| 11 |
8 #include "base/command_line.h" | 12 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 13 #include "base/debug/debugger.h" |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 14 #include "base/mac/scoped_nsautorelease_pool.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/strings/sys_string_conversions.h" | 15 #include "base/strings/sys_string_conversions.h" |
13 #include "chrome/app/chrome_command_ids.h" // IDC_* | 16 #include "chrome/app/chrome_command_ids.h" // IDC_* |
14 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
15 #import "chrome/browser/ui/cocoa/browser_window_utils.h" | 18 #import "chrome/browser/ui/cocoa/browser_window_utils.h" |
16 #import "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 19 #import "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
17 #import "chrome/browser/ui/cocoa/panels/panel_cocoa.h" | |
18 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h" | 20 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h" |
19 #import "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" | 21 #import "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" |
20 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 22 #include "chrome/browser/ui/cocoa/run_loop_testing.h" |
21 #include "chrome/browser/ui/panels/panel.h" | 23 #include "chrome/browser/ui/panels/panel.h" |
22 #include "chrome/browser/ui/panels/panel_manager.h" | 24 #include "chrome/browser/ui/panels/panel_manager.h" |
23 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/test/base/testing_profile.h" | 26 #include "chrome/test/base/testing_profile.h" |
25 #include "content/public/test/test_utils.h" | 27 #include "content/public/test/test_utils.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "testing/gtest_mac.h" | 29 #include "testing/gtest_mac.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 EXPECT_NSEQ(frontmostWindow, [native_window->controller_ window]); | 403 EXPECT_NSEQ(frontmostWindow, [native_window->controller_ window]); |
402 | 404 |
403 native_window2->ActivatePanel(); | 405 native_window2->ActivatePanel(); |
404 chrome::testing::NSRunLoopRunAllPending(); | 406 chrome::testing::NSRunLoopRunAllPending(); |
405 frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0]; | 407 frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0]; |
406 EXPECT_NSEQ(frontmostWindow, [native_window2->controller_ window]); | 408 EXPECT_NSEQ(frontmostWindow, [native_window2->controller_ window]); |
407 | 409 |
408 ClosePanelAndWait(panel); | 410 ClosePanelAndWait(panel); |
409 ClosePanelAndWait(panel2); | 411 ClosePanelAndWait(panel2); |
410 } | 412 } |
OLD | NEW |