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/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/ui/panels/display_settings_provider.h" | 10 #include "chrome/browser/ui/panels/display_settings_provider.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual void SetDesktopBarVisibility(DesktopBarAlignment alignment, | 35 virtual void SetDesktopBarVisibility(DesktopBarAlignment alignment, |
36 DesktopBarVisibility visibility) = 0; | 36 DesktopBarVisibility visibility) = 0; |
37 virtual void SetDesktopBarThickness(DesktopBarAlignment alignment, | 37 virtual void SetDesktopBarThickness(DesktopBarAlignment alignment, |
38 int thickness) = 0; | 38 int thickness) = 0; |
39 virtual void EnableFullScreenMode(bool enabled) = 0; | 39 virtual void EnableFullScreenMode(bool enabled) = 0; |
40 }; | 40 }; |
41 | 41 |
42 BasePanelBrowserTest(); | 42 BasePanelBrowserTest(); |
43 virtual ~BasePanelBrowserTest(); | 43 virtual ~BasePanelBrowserTest(); |
44 | 44 |
45 // Linux bots use icewm which activate windows in ways that break | |
46 // certain panel tests. Skip those tests when running on the bots. | |
47 // We do not disable the tests to make it easy for developers to run | |
48 // them locally. [Icewm always activates a window when shown.] | |
49 bool SkipTestIfIceWM(); | |
50 | |
51 // Gnome running compiz refuses to activate a window that was initially | |
52 // created as inactive, causing certain panel tests to fail. These tests | |
53 // pass fine on the bots, but fail for developers as Gnome running compiz | |
54 // is the typical linux dev machine configuration. We do not disable the | |
55 // tests to ensure we still have coverage on the bots. | |
56 bool SkipTestIfCompizWM(); | |
57 | |
58 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 45 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
59 virtual void SetUpOnMainThread() OVERRIDE; | 46 virtual void SetUpOnMainThread() OVERRIDE; |
60 | 47 |
61 protected: | 48 protected: |
62 enum ActiveState { SHOW_AS_ACTIVE, SHOW_AS_INACTIVE }; | 49 enum ActiveState { SHOW_AS_ACTIVE, SHOW_AS_INACTIVE }; |
63 | 50 |
64 struct CreatePanelParams { | 51 struct CreatePanelParams { |
65 std::string name; | 52 std::string name; |
66 gfx::Rect bounds; | 53 gfx::Rect bounds; |
67 ActiveState show_flag; | 54 ActiveState show_flag; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 static const base::FilePath::CharType* kTestDir; | 116 static const base::FilePath::CharType* kTestDir; |
130 | 117 |
131 private: | 118 private: |
132 // Passed to and owned by PanelManager. | 119 // Passed to and owned by PanelManager. |
133 MockDisplaySettingsProvider* mock_display_settings_provider_; | 120 MockDisplaySettingsProvider* mock_display_settings_provider_; |
134 | 121 |
135 bool mock_display_settings_enabled_; | 122 bool mock_display_settings_enabled_; |
136 }; | 123 }; |
137 | 124 |
138 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 125 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
OLD | NEW |