| 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/i18n/time_formatting.h" | 5 #include "base/i18n/time_formatting.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 10 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 EXPECT_EQ(0, styles & WS_MINIMIZEBOX); | 386 EXPECT_EQ(0, styles & WS_MINIMIZEBOX); |
| 387 | 387 |
| 388 LONG ext_styles = ::GetWindowLong(native_window, GWL_EXSTYLE); | 388 LONG ext_styles = ::GetWindowLong(native_window, GWL_EXSTYLE); |
| 389 EXPECT_EQ(WS_EX_TOPMOST, ext_styles & WS_EX_TOPMOST); | 389 EXPECT_EQ(WS_EX_TOPMOST, ext_styles & WS_EX_TOPMOST); |
| 390 #endif | 390 #endif |
| 391 | 391 |
| 392 panel->Close(); | 392 panel->Close(); |
| 393 } | 393 } |
| 394 | 394 |
| 395 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, PanelLayout) { | 395 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, PanelLayout) { |
| 396 Panel* panel = CreatePanel("PanelTest"); | 396 // Create a fixed-size panel to avoid possible collapsing of the title |
| 397 // if the enforced min sizes are too small. |
| 398 Panel* panel = CreatePanelWithBounds("PanelTest", gfx::Rect(0, 0, 100, 50)); |
| 397 | 399 |
| 398 views::View* title_icon = GetTitleIcon(panel); | 400 views::View* title_icon = GetTitleIcon(panel); |
| 399 views::View* title_text = GetTitleText(panel); | 401 views::View* title_text = GetTitleText(panel); |
| 400 views::View* close_button = GetCloseButton(panel); | 402 views::View* close_button = GetCloseButton(panel); |
| 401 views::View* minimize_button = GetMinimizeButton(panel); | 403 views::View* minimize_button = GetMinimizeButton(panel); |
| 402 views::View* restore_button = GetRestoreButton(panel); | 404 views::View* restore_button = GetRestoreButton(panel); |
| 403 | 405 |
| 404 // We should have icon, text, minimize, restore and close buttons. Only one of | 406 // We should have icon, text, minimize, restore and close buttons. Only one of |
| 405 // minimize and restore buttons are visible. | 407 // minimize and restore buttons are visible. |
| 406 EXPECT_EQ(5, GetControlCount(panel)); | 408 EXPECT_EQ(5, GetControlCount(panel)); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, | 478 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, |
| 477 MinimizeAndRestoreOnAutoHideTaskBar) { | 479 MinimizeAndRestoreOnAutoHideTaskBar) { |
| 478 TestMinimizeAndRestore(true); | 480 TestMinimizeAndRestore(true); |
| 479 } | 481 } |
| 480 | 482 |
| 481 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, | 483 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, |
| 482 ChangeAutoHideTaskBarThickness) { | 484 ChangeAutoHideTaskBarThickness) { |
| 483 TestChangeAutoHideTaskBarThickness(); | 485 TestChangeAutoHideTaskBarThickness(); |
| 484 } | 486 } |
| 485 #endif | 487 #endif |
| OLD | NEW |