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

Side by Side Diff: chrome/browser/ui/panels/base_panel_browser_test.h

Issue 8802021: Fix a couple panel overflow related bugs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 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 #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 #pragma once 7 #pragma once
8 8
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h" 12 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h"
13 #include "chrome/browser/ui/panels/panel.h"
13 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
14 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
15 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
16 17
17 class Panel;
18
19 class BasePanelBrowserTest : public InProcessBrowserTest { 18 class BasePanelBrowserTest : public InProcessBrowserTest {
20 public: 19 public:
21 class MockAutoHidingDesktopBar : public AutoHidingDesktopBar { 20 class MockAutoHidingDesktopBar : public AutoHidingDesktopBar {
22 public: 21 public:
23 virtual ~MockAutoHidingDesktopBar() { } 22 virtual ~MockAutoHidingDesktopBar() { }
24 23
25 virtual void EnableAutoHiding(Alignment alignment, 24 virtual void EnableAutoHiding(Alignment alignment,
26 bool enabled, 25 bool enabled,
27 int thickness) = 0; 26 int thickness) = 0;
28 virtual void SetVisibility(Alignment alignment, Visibility visibility) = 0; 27 virtual void SetVisibility(Alignment alignment, Visibility visibility) = 0;
(...skipping 27 matching lines...) Expand all
56 Panel* CreatePanelWithParams(const CreatePanelParams& params); 55 Panel* CreatePanelWithParams(const CreatePanelParams& params);
57 Panel* CreatePanelWithBounds(const std::string& panel_name, 56 Panel* CreatePanelWithBounds(const std::string& panel_name,
58 const gfx::Rect& bounds); 57 const gfx::Rect& bounds);
59 Panel* CreatePanel(const std::string& panel_name); 58 Panel* CreatePanel(const std::string& panel_name);
60 59
61 void WaitForPanelAdded(Panel* panel); 60 void WaitForPanelAdded(Panel* panel);
62 void WaitForPanelRemoved(Panel* panel); 61 void WaitForPanelRemoved(Panel* panel);
63 void WaitForPanelActiveState(Panel* panel, ActiveState state); 62 void WaitForPanelActiveState(Panel* panel, ActiveState state);
64 void WaitForWindowSizeAvailable(Panel* panel); 63 void WaitForWindowSizeAvailable(Panel* panel);
65 void WaitForBoundsAnimationFinished(Panel* panel); 64 void WaitForBoundsAnimationFinished(Panel* panel);
65 void WaitForExpansionStateChanged(Panel* panel,
66 Panel::ExpansionState expansion_state);
66 67
67 void CreateTestTabContents(Browser* browser); 68 void CreateTestTabContents(Browser* browser);
68 69
69 scoped_refptr<Extension> CreateExtension(const FilePath::StringType& path, 70 scoped_refptr<Extension> CreateExtension(const FilePath::StringType& path,
70 Extension::Location location, 71 Extension::Location location,
71 const DictionaryValue& extra_value); 72 const DictionaryValue& extra_value);
72 73
73 gfx::Rect testing_work_area() const { return testing_work_area_; } 74 gfx::Rect testing_work_area() const { return testing_work_area_; }
74 void set_testing_work_area(const gfx::Rect& work_area) { 75 void set_testing_work_area(const gfx::Rect& work_area) {
75 testing_work_area_ = work_area; 76 testing_work_area_ = work_area;
76 } 77 }
77 78
78 MockAutoHidingDesktopBar* mock_auto_hiding_desktop_bar() const { 79 MockAutoHidingDesktopBar* mock_auto_hiding_desktop_bar() const {
79 return mock_auto_hiding_desktop_bar_.get(); 80 return mock_auto_hiding_desktop_bar_.get();
80 } 81 }
81 82
82 static const FilePath::CharType* kTestDir; 83 static const FilePath::CharType* kTestDir;
83 private: 84 private:
84 gfx::Rect testing_work_area_; 85 gfx::Rect testing_work_area_;
85 scoped_refptr<MockAutoHidingDesktopBar> mock_auto_hiding_desktop_bar_; 86 scoped_refptr<MockAutoHidingDesktopBar> mock_auto_hiding_desktop_bar_;
86 }; 87 };
87 88
88 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ 89 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/base_panel_browser_test.cc » ('j') | chrome/browser/ui/panels/panel_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698