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

Side by Side Diff: chrome/browser/ui/panels/panel_overflow_browsertest.cc

Issue 9129013: Panel Overflow on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <vector> 5 #include <vector>
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/panels/base_panel_browser_test.h" 7 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
8 #include "chrome/browser/ui/panels/docked_panel_strip.h" 8 #include "chrome/browser/ui/panels/docked_panel_strip.h"
9 #include "chrome/browser/ui/panels/native_panel.h" 9 #include "chrome/browser/ui/panels/native_panel.h"
10 #include "chrome/browser/ui/panels/overflow_panel_strip.h" 10 #include "chrome/browser/ui/panels/overflow_panel_strip.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 WaitForExpansionStateChanged(panel, Panel::IN_OVERFLOW); 180 WaitForExpansionStateChanged(panel, Panel::IN_OVERFLOW);
181 panels.push_back(panel); 181 panels.push_back(panel);
182 } 182 }
183 183
184 return panels; 184 return panels;
185 } 185 }
186 }; 186 };
187 187
188 // TODO(jianli): remove the guard when overflow support is enabled on other 188 // TODO(jianli): remove the guard when overflow support is enabled on other
189 // platforms. http://crbug.com/105073 189 // platforms. http://crbug.com/105073
190 #if defined(OS_WIN) 190 #if defined(OS_WIN) || defined(OS_MACOSX)
jennb 2012/02/07 00:50:31 I wonder if this will make it hard on Prasad to en
prasadt 2012/02/07 00:54:22 That's fine. I'll just fix-up as necessary. Should
191 #define MAYBE_CheckPanelProperties CheckPanelProperties 191 #define MAYBE_CheckPanelProperties CheckPanelProperties
192 #define MAYBE_UpdateDraggableStatus UpdateDraggableStatus 192 #define MAYBE_UpdateDraggableStatus UpdateDraggableStatus
193 #define MAYBE_CreateOverflowPanels CreateOverflowPanels 193 #define MAYBE_CreateOverflowPanels CreateOverflowPanels
194 #define MAYBE_CreateMoreOverflowPanels CreateMoreOverflowPanels
195 // http://crbug.com/107230 194 // http://crbug.com/107230
196 #define MAYBE_CreatePanelOnDelayedOverflow CreatePanelOnDelayedOverflow 195 #define MAYBE_CreatePanelOnDelayedOverflow CreatePanelOnDelayedOverflow
197 #define MAYBE_CloseOverflowPanels CloseOverflowPanels 196 #define MAYBE_CloseOverflowPanels CloseOverflowPanels
198 #define MAYBE_CloseDockedPanels CloseDockedPanels 197 #define MAYBE_CloseDockedPanels CloseDockedPanels
199 #define MAYBE_CloseWithDelayedOverflow CloseWithDelayedOverflow 198 #define MAYBE_CloseWithDelayedOverflow CloseWithDelayedOverflow
200 #define MAYBE_ActivateOverflowPanels ActivateOverflowPanels 199 #define MAYBE_ActivateOverflowPanels ActivateOverflowPanels
201 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByActivate \ 200 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByActivate \
202 MoveMinimizedPanelToOverflowAndBringBackByActivate 201 MoveMinimizedPanelToOverflowAndBringBackByActivate
203 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize \ 202 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize \
204 MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize 203 MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize
205 #define MAYBE_HoverOverOverflowAreaWithoutOverflowOfOverflow \ 204 #define MAYBE_HoverOverOverflowAreaWithoutOverflowOfOverflow \
206 HoverOverOverflowAreaWithoutOverflowOfOverflow 205 HoverOverOverflowAreaWithoutOverflowOfOverflow
207 #define MAYBE_HoverOverOverflowAreaWithOverflowOfOverflow \ 206 #define MAYBE_HoverOverOverflowAreaWithOverflowOfOverflow \
208 HoverOverOverflowAreaWithOverflowOfOverflow 207 HoverOverOverflowAreaWithOverflowOfOverflow
209 #define MAYBE_ResizePanel ResizePanel 208 #define MAYBE_ResizePanel ResizePanel
210 #define MAYBE_OverflowIndicatorCount OverflowIndicatorCount
211 #define MAYBE_DrawOverflowAttention DrawOverflowAttention
212 #else 209 #else
213 #define MAYBE_CheckPanelProperties DISABLED_CheckPanelProperties 210 #define MAYBE_CheckPanelProperties DISABLED_CheckPanelProperties
214 #define MAYBE_UpdateDraggableStatus DISABLED_UpdateDraggableStatus 211 #define MAYBE_UpdateDraggableStatus DISABLED_UpdateDraggableStatus
215 #define MAYBE_CreateOverflowPanels DISABLED_CreateOverflowPanels 212 #define MAYBE_CreateOverflowPanels DISABLED_CreateOverflowPanels
216 #define MAYBE_CreateMoreOverflowPanels DISABLED_CreateMoreOverflowPanels
217 #define MAYBE_CreatePanelOnDelayedOverflow DISABLED_CreatePanelOnDelayedOverflow 213 #define MAYBE_CreatePanelOnDelayedOverflow DISABLED_CreatePanelOnDelayedOverflow
218 #define MAYBE_CloseOverflowPanels DISABLED_CloseOverflowPanels 214 #define MAYBE_CloseOverflowPanels DISABLED_CloseOverflowPanels
219 #define MAYBE_CloseDockedPanels DISABLED_CloseDockedPanels 215 #define MAYBE_CloseDockedPanels DISABLED_CloseDockedPanels
220 #define MAYBE_CloseWithDelayedOverflow DISABLED_CloseWithDelayedOverflow 216 #define MAYBE_CloseWithDelayedOverflow DISABLED_CloseWithDelayedOverflow
221 #define MAYBE_ActivateOverflowPanels DISABLED_ActivateOverflowPanels 217 #define MAYBE_ActivateOverflowPanels DISABLED_ActivateOverflowPanels
222 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByActivate \ 218 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByActivate \
223 DISABLED_MoveMinimizedPanelToOverflowAndBringBackByActivate 219 DISABLED_MoveMinimizedPanelToOverflowAndBringBackByActivate
224 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize \ 220 #define MAYBE_MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize \
225 DISABLED_MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize 221 DISABLED_MoveMinimizedPanelToOverflowAndBringBackByCloseOrResize
226 #define MAYBE_HoverOverOverflowAreaWithoutOverflowOfOverflow \ 222 #define MAYBE_HoverOverOverflowAreaWithoutOverflowOfOverflow \
227 DISABLED_HoverOverOverflowAreaWithoutOverflowOfOverflow 223 DISABLED_HoverOverOverflowAreaWithoutOverflowOfOverflow
228 #define MAYBE_HoverOverOverflowAreaWithOverflowOfOverflow \ 224 #define MAYBE_HoverOverOverflowAreaWithOverflowOfOverflow \
229 DISABLED_HoverOverOverflowAreaWithOverflowOfOverflow 225 DISABLED_HoverOverOverflowAreaWithOverflowOfOverflow
230 #define MAYBE_ResizePanel DISABLED_ResizePanel 226 #define MAYBE_ResizePanel DISABLED_ResizePanel
227 #endif
228
229 // TODO(dimich): remove the guard when overflow indicator is implemented on
230 // other platforms.
231 #if defined(OS_WIN)
232 #define MAYBE_CreateMoreOverflowPanels CreateMoreOverflowPanels
233 #define MAYBE_OverflowIndicatorCount OverflowIndicatorCount
234 #define MAYBE_DrawOverflowAttention DrawOverflowAttention
235 #else
236 #define MAYBE_CreateMoreOverflowPanels DISABLED_CreateMoreOverflowPanels
231 #define MAYBE_OverflowIndicatorCount DISABLED_OverflowIndicatorCount 237 #define MAYBE_OverflowIndicatorCount DISABLED_OverflowIndicatorCount
232 #define MAYBE_DrawOverflowAttention DISABLED_DrawOverflowAttention 238 #define MAYBE_DrawOverflowAttention DISABLED_DrawOverflowAttention
233 #endif 239 #endif
234 240
235 IN_PROC_BROWSER_TEST_F(PanelOverflowBrowserTest, MAYBE_CheckPanelProperties) { 241 IN_PROC_BROWSER_TEST_F(PanelOverflowBrowserTest, MAYBE_CheckPanelProperties) {
236 // Create 3 panels that fit. 242 // Create 3 panels that fit.
237 Panel* panel1 = CreatePanelWithBounds("1", gfx::Rect(0, 0, 250, 200)); 243 Panel* panel1 = CreatePanelWithBounds("1", gfx::Rect(0, 0, 250, 200));
238 Panel* panel2 = CreatePanelWithBounds("2", gfx::Rect(0, 0, 300, 200)); 244 Panel* panel2 = CreatePanelWithBounds("2", gfx::Rect(0, 0, 300, 200));
239 Panel* panel3 = CreatePanelWithBounds("3", gfx::Rect(0, 0, 200, 200)); 245 Panel* panel3 = CreatePanelWithBounds("3", gfx::Rect(0, 0, 200, 200));
240 246
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 // docked: P0, P1, P5 1586 // docked: P0, P1, P5
1581 // overflow: P2, P10, P3, (P4, P6, P7, P9, P11) 1587 // overflow: P2, P10, P3, (P4, P6, P7, P9, P11)
1582 CloseWindowAndWait(panels[8]->browser()); 1588 CloseWindowAndWait(panels[8]->browser());
1583 EXPECT_EQ(3, docked_strip->num_panels()); 1589 EXPECT_EQ(3, docked_strip->num_panels());
1584 EXPECT_EQ(8, overflow_strip->num_panels()); 1590 EXPECT_EQ(8, overflow_strip->num_panels());
1585 EXPECT_TRUE(panels[3]->IsDrawingAttention()); 1591 EXPECT_TRUE(panels[3]->IsDrawingAttention());
1586 EXPECT_FALSE(overflow_indicator->IsDrawingAttention()); 1592 EXPECT_FALSE(overflow_indicator->IsDrawingAttention());
1587 1593
1588 panel_manager->RemoveAll(); 1594 panel_manager->RemoveAll();
1589 } 1595 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | chrome/browser/ui/panels/panel_titlebar_view_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698