Chromium Code Reviews| Index: chrome/browser/ui/panels/base_panel_browser_test.h |
| diff --git a/chrome/browser/ui/panels/base_panel_browser_test.h b/chrome/browser/ui/panels/base_panel_browser_test.h |
| index b45ff14751bb08c408f2fbd5d1b655531c9ee4e8..788c2e06ca6159bfd37d4f2e4c709694b6a944ee 100644 |
| --- a/chrome/browser/ui/panels/base_panel_browser_test.h |
| +++ b/chrome/browser/ui/panels/base_panel_browser_test.h |
| @@ -6,6 +6,7 @@ |
| #define CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
| #pragma once |
| +#include <vector> |
| #include "base/task.h" |
| #include "base/values.h" |
| #include "base/memory/scoped_ptr.h" |
| @@ -15,6 +16,30 @@ |
| #include "chrome/test/base/in_process_browser_test.h" |
| #include "ui/gfx/rect.h" |
| +// Encapsulates all the info we care about a panel when we do the testing. |
|
jennb
2011/12/08 23:52:00
If this is all for overflow, then create a PanelOv
jianli
2011/12/09 22:39:07
Done.
|
| +struct PanelData { |
| + Panel* panel; |
| + std::string name; |
| + Panel::ExpansionState expansion_state; |
| + bool visible; |
| + bool active; |
| + |
| + PanelData(); |
| + explicit PanelData(Panel* panel); |
| + bool operator==(const PanelData& another) const; |
| + bool operator!=(const PanelData& another) const; |
| +}; |
| + |
| +// For gtest printing. |
| +::std::ostream& operator<<(::std::ostream& os, const PanelData& data); |
| + |
| +class PanelDataList : public std::vector<PanelData> { |
| + public: |
| + PanelData* get(Panel* panel); |
| + void insertBefore(Panel* before_panel, const PanelData& panel_data); |
| + PanelData remove(Panel* panel); |
| +}; |
| + |
| class BasePanelBrowserTest : public InProcessBrowserTest { |
| public: |
| class MockAutoHidingDesktopBar : public AutoHidingDesktopBar { |
| @@ -71,6 +96,9 @@ class BasePanelBrowserTest : public InProcessBrowserTest { |
| Extension::Location location, |
| const DictionaryValue& extra_value); |
| + static std::string GetPanelName(int index); |
| + static PanelDataList GetAllPanelData(); |
| + |
| gfx::Rect testing_work_area() const { return testing_work_area_; } |
| void set_testing_work_area(const gfx::Rect& work_area) { |
| testing_work_area_ = work_area; |