OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/test/base/browser_with_test_window_test.h" | 9 #include "chrome/test/base/browser_with_test_window_test.h" |
10 | 10 |
11 namespace chrome { | 11 namespace chrome { |
12 class TestingIOThreadState; | 12 class TestingIOThreadState; |
13 } | 13 } |
14 | 14 |
15 namespace predictors { | 15 namespace predictors { |
16 class PredictorDatabase; | 16 class PredictorDatabase; |
17 } | 17 } |
18 | 18 |
19 class BrowserView; | 19 class BrowserView; |
20 class ScopedTestingLocalState; | 20 class ScopedTestingLocalState; |
21 | 21 |
22 // Base class for BrowserView based unit tests. TestWithBrowserView creates | 22 // Base class for BrowserView based unit tests. TestWithBrowserView creates |
23 // a Browser with a valid BrowserView and BrowserFrame with as little else as | 23 // a Browser with a valid BrowserView and BrowserFrame with as little else as |
24 // possible. | 24 // possible. |
25 class TestWithBrowserView : public BrowserWithTestWindowTest { | 25 class TestWithBrowserView : public BrowserWithTestWindowTest { |
26 public: | 26 public: |
27 TestWithBrowserView(); | 27 TestWithBrowserView(); |
28 TestWithBrowserView(Browser::Type browser_type, | 28 TestWithBrowserView(Browser::Type browser_type, |
29 chrome::HostDesktopType host_desktop_type, | 29 ui::HostDesktopType host_desktop_type, |
30 bool hosted_app); | 30 bool hosted_app); |
31 ~TestWithBrowserView() override; | 31 ~TestWithBrowserView() override; |
32 | 32 |
33 // BrowserWithTestWindowTest overrides: | 33 // BrowserWithTestWindowTest overrides: |
34 void SetUp() override; | 34 void SetUp() override; |
35 void TearDown() override; | 35 void TearDown() override; |
36 TestingProfile* CreateProfile() override; | 36 TestingProfile* CreateProfile() override; |
37 BrowserWindow* CreateBrowserWindow() override; | 37 BrowserWindow* CreateBrowserWindow() override; |
38 | 38 |
39 BrowserView* browser_view() { return browser_view_; } | 39 BrowserView* browser_view() { return browser_view_; } |
40 | 40 |
41 private: | 41 private: |
42 BrowserView* browser_view_; // Not owned. | 42 BrowserView* browser_view_; // Not owned. |
43 scoped_ptr<ScopedTestingLocalState> local_state_; | 43 scoped_ptr<ScopedTestingLocalState> local_state_; |
44 scoped_ptr<predictors::PredictorDatabase> predictor_db_; | 44 scoped_ptr<predictors::PredictorDatabase> predictor_db_; |
45 scoped_ptr<chrome::TestingIOThreadState> testing_io_thread_state_; | 45 scoped_ptr<chrome::TestingIOThreadState> testing_io_thread_state_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(TestWithBrowserView); | 47 DISALLOW_COPY_AND_ASSIGN(TestWithBrowserView); |
48 }; | 48 }; |
49 | 49 |
50 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_ | 50 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_ |
OLD | NEW |