OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
11 #include "chrome/browser/ui/panels/panel.h" | 11 #include "chrome/browser/ui/panels/panel.h" |
12 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 12 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
13 #include "chrome/browser/ui/panels/panel_browser_view.h" | 13 #include "chrome/browser/ui/panels/panel_browser_view.h" |
14 #include "chrome/browser/ui/panels/panel_manager.h" | 14 #include "chrome/browser/ui/panels/panel_manager.h" |
| 15 #include "chrome/browser/ui/panels/panel_slide_animation.h" |
15 #include "chrome/browser/web_applications/web_app.h" | 16 #include "chrome/browser/web_applications/web_app.h" |
16 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
18 #include "chrome/test/base/ui_test_utils.h" | 19 #include "chrome/test/base/ui_test_utils.h" |
19 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "ui/base/animation/slide_animation.h" | |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/views/controls/button/image_button.h" | 23 #include "ui/views/controls/button/image_button.h" |
24 #include "ui/views/controls/button/menu_button.h" | 24 #include "ui/views/controls/button/menu_button.h" |
25 #include "ui/views/controls/image_view.h" | 25 #include "ui/views/controls/image_view.h" |
26 #include "ui/views/controls/label.h" | 26 #include "ui/views/controls/label.h" |
27 #include "ui/views/controls/link.h" | 27 #include "ui/views/controls/link.h" |
28 #include "ui/views/controls/textfield/textfield.h" | 28 #include "ui/views/controls/textfield/textfield.h" |
29 | 29 |
30 class PanelBrowserViewTest : public BasePanelBrowserTest { | 30 class PanelBrowserViewTest : public BasePanelBrowserTest { |
31 public: | 31 public: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 72 } |
73 | 73 |
74 void SetViewBounds(Panel* panel, const gfx::Rect& rect) const { | 74 void SetViewBounds(Panel* panel, const gfx::Rect& rect) const { |
75 return GetBrowserView(panel)->SetPanelBounds(rect); | 75 return GetBrowserView(panel)->SetPanelBounds(rect); |
76 } | 76 } |
77 | 77 |
78 gfx::NativeWindow GetNativeWindow(Panel* panel) const { | 78 gfx::NativeWindow GetNativeWindow(Panel* panel) const { |
79 return GetBrowserView(panel)->GetNativeHandle(); | 79 return GetBrowserView(panel)->GetNativeHandle(); |
80 } | 80 } |
81 | 81 |
82 ui::SlideAnimation* GetBoundsAnimator(Panel* panel) const { | 82 PanelSlideAnimation* GetBoundsAnimator(Panel* panel) const { |
83 return GetBrowserView(panel)->bounds_animator_.get(); | 83 return GetBrowserView(panel)->bounds_animator_.get(); |
84 } | 84 } |
85 | 85 |
86 ui::SlideAnimation* GetSettingsButtonAnimator(Panel* panel) const { | 86 ui::SlideAnimation* GetSettingsButtonAnimator(Panel* panel) const { |
87 return GetBrowserView(panel)->GetFrameView()-> | 87 return GetBrowserView(panel)->GetFrameView()-> |
88 settings_button_animator_.get(); | 88 settings_button_animator_.get(); |
89 } | 89 } |
90 | 90 |
91 int GetTitlebarHeight(Panel* panel) const { | 91 int GetTitlebarHeight(Panel* panel) const { |
92 PanelBrowserFrameView* frame_view = GetBrowserView(panel)->GetFrameView(); | 92 PanelBrowserFrameView* frame_view = GetBrowserView(panel)->GetFrameView(); |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 // http://crbug.com/102734 | 613 // http://crbug.com/102734 |
614 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, DISABLED_DrawAttention) { | 614 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, DISABLED_DrawAttention) { |
615 TestDrawAttention(); | 615 TestDrawAttention(); |
616 } | 616 } |
617 | 617 |
618 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, | 618 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, |
619 ChangeAutoHideTaskBarThickness) { | 619 ChangeAutoHideTaskBarThickness) { |
620 TestChangeAutoHideTaskBarThickness(); | 620 TestChangeAutoHideTaskBarThickness(); |
621 } | 621 } |
622 #endif | 622 #endif |
OLD | NEW |