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 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 6 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
7 #include "chrome/browser/ui/panels/detached_panel_strip.h" | 7 #include "chrome/browser/ui/panels/detached_panel_strip.h" |
8 #include "chrome/browser/ui/panels/native_panel.h" | 8 #include "chrome/browser/ui/panels/native_panel.h" |
9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 EXPECT_FALSE(panel->IsMinimized()); | 128 EXPECT_FALSE(panel->IsMinimized()); |
129 | 129 |
130 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin(), | 130 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin(), |
131 panel::APPLY_TO_ALL); | 131 panel::APPLY_TO_ALL); |
132 test_panel->ReleaseMouseButtonTitlebar(panel::APPLY_TO_ALL); | 132 test_panel->ReleaseMouseButtonTitlebar(panel::APPLY_TO_ALL); |
133 EXPECT_TRUE(panel->IsActive()); | 133 EXPECT_TRUE(panel->IsActive()); |
134 EXPECT_FALSE(panel->IsMinimized()); | 134 EXPECT_FALSE(panel->IsMinimized()); |
135 | 135 |
136 // Create a second panel to cause the first to become inactive. | 136 // Create a second panel to cause the first to become inactive. |
137 CreateDetachedPanel("2", gfx::Rect(100, 200, 230, 345)); | 137 CreateDetachedPanel("2", gfx::Rect(100, 200, 230, 345)); |
138 EXPECT_FALSE(panel->IsActive()); | 138 WaitForPanelActiveState(panel, SHOW_AS_INACTIVE); |
139 | 139 |
140 // Clicking on an inactive detached panel's titlebar activates it. | 140 // Clicking on an inactive detached panel's titlebar activates it. |
141 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin()); | 141 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin()); |
142 test_panel->ReleaseMouseButtonTitlebar(); | 142 test_panel->ReleaseMouseButtonTitlebar(); |
143 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE); | 143 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE); |
144 EXPECT_FALSE(panel->IsMinimized()); | 144 EXPECT_FALSE(panel->IsMinimized()); |
145 | 145 |
146 panel_manager->CloseAll(); | 146 panel_manager->CloseAll(); |
147 } | 147 } |
148 | 148 |
149 #endif // OS_MACOSX | 149 #endif // OS_MACOSX |
OLD | NEW |