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 #ifndef CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
6 #define CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 6 #define CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
7 | 7 |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "chrome/browser/ui/panels/display_settings_provider.h" | 10 #include "chrome/browser/ui/panels/display_settings_provider.h" |
11 #include "chrome/browser/ui/panels/panel.h" | 11 #include "chrome/browser/ui/panels/panel.h" |
12 #include "chrome/browser/ui/panels/panel_manager.h" | 12 #include "chrome/browser/ui/panels/panel_manager.h" |
13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
14 #include "chrome/test/base/in_process_browser_test.h" | 14 #include "chrome/test/base/in_process_browser_test.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 | 16 |
17 class NativePanelTesting; | 17 class NativePanelTesting; |
| 18 class StackedPanelCollection; |
18 | 19 |
19 class BasePanelBrowserTest : public InProcessBrowserTest { | 20 class BasePanelBrowserTest : public InProcessBrowserTest { |
20 public: | 21 public: |
21 class MockDisplaySettingsProvider : public DisplaySettingsProvider { | 22 class MockDisplaySettingsProvider : public DisplaySettingsProvider { |
22 public: | 23 public: |
23 MockDisplaySettingsProvider() { } | 24 MockDisplaySettingsProvider() { } |
24 virtual ~MockDisplaySettingsProvider() { } | 25 virtual ~MockDisplaySettingsProvider() { } |
25 | 26 |
26 virtual void SetPrimaryScreenArea(const gfx::Rect& primary_screen_area) = 0; | 27 virtual void SetPrimaryScreenArea(const gfx::Rect& primary_screen_area) = 0; |
27 virtual void SetWorkArea(const gfx::Rect& work_area) = 0; | 28 virtual void SetWorkArea(const gfx::Rect& work_area) = 0; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 ActiveState show_flag); | 71 ActiveState show_flag); |
71 }; | 72 }; |
72 | 73 |
73 Panel* CreatePanelWithParams(const CreatePanelParams& params); | 74 Panel* CreatePanelWithParams(const CreatePanelParams& params); |
74 Panel* CreatePanelWithBounds(const std::string& panel_name, | 75 Panel* CreatePanelWithBounds(const std::string& panel_name, |
75 const gfx::Rect& bounds); | 76 const gfx::Rect& bounds); |
76 Panel* CreatePanel(const std::string& panel_name); | 77 Panel* CreatePanel(const std::string& panel_name); |
77 | 78 |
78 Panel* CreateDockedPanel(const std::string& name, const gfx::Rect& bounds); | 79 Panel* CreateDockedPanel(const std::string& name, const gfx::Rect& bounds); |
79 Panel* CreateDetachedPanel(const std::string& name, const gfx::Rect& bounds); | 80 Panel* CreateDetachedPanel(const std::string& name, const gfx::Rect& bounds); |
| 81 Panel* CreateStackedPanel(const std::string& name, |
| 82 const gfx::Rect& bounds, |
| 83 StackedPanelCollection* stack); |
80 | 84 |
81 static NativePanelTesting* CreateNativePanelTesting(Panel* panel); | 85 static NativePanelTesting* CreateNativePanelTesting(Panel* panel); |
82 | 86 |
83 void WaitForPanelActiveState(Panel* panel, ActiveState state); | 87 void WaitForPanelActiveState(Panel* panel, ActiveState state); |
84 void WaitForWindowSizeAvailable(Panel* panel); | 88 void WaitForWindowSizeAvailable(Panel* panel); |
85 void WaitForBoundsAnimationFinished(Panel* panel); | 89 void WaitForBoundsAnimationFinished(Panel* panel); |
86 | 90 |
87 scoped_refptr<extensions::Extension> CreateExtension( | 91 scoped_refptr<extensions::Extension> CreateExtension( |
88 const FilePath::StringType& path, | 92 const FilePath::StringType& path, |
89 extensions::Extension::Location location, | 93 extensions::Extension::Location location, |
(...skipping 22 matching lines...) Expand all Loading... |
112 static const FilePath::CharType* kTestDir; | 116 static const FilePath::CharType* kTestDir; |
113 | 117 |
114 private: | 118 private: |
115 // Passed to and owned by PanelManager. | 119 // Passed to and owned by PanelManager. |
116 MockDisplaySettingsProvider* mock_display_settings_provider_; | 120 MockDisplaySettingsProvider* mock_display_settings_provider_; |
117 | 121 |
118 bool mock_display_settings_enabled_; | 122 bool mock_display_settings_enabled_; |
119 }; | 123 }; |
120 | 124 |
121 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 125 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
OLD | NEW |