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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/test/base/browser_with_test_window_test.h"
12 class TestingIOThreadState
;
15 namespace predictors
{
16 class PredictorDatabase
;
20 class ScopedTestingLocalState
;
22 // Base class for BrowserView based unit tests. TestWithBrowserView creates
23 // a Browser with a valid BrowserView and BrowserFrame with as little else as
25 class TestWithBrowserView
: public BrowserWithTestWindowTest
{
27 TestWithBrowserView();
28 TestWithBrowserView(Browser::Type browser_type
,
29 chrome::HostDesktopType host_desktop_type
,
31 ~TestWithBrowserView() override
;
33 // BrowserWithTestWindowTest overrides:
34 void SetUp() override
;
35 void TearDown() override
;
36 TestingProfile
* CreateProfile() override
;
37 BrowserWindow
* CreateBrowserWindow() override
;
39 BrowserView
* browser_view() { return browser_view_
; }
42 BrowserView
* browser_view_
; // Not owned.
43 scoped_ptr
<ScopedTestingLocalState
> local_state_
;
44 scoped_ptr
<predictors::PredictorDatabase
> predictor_db_
;
45 scoped_ptr
<chrome::TestingIOThreadState
> testing_io_thread_state_
;
47 DISALLOW_COPY_AND_ASSIGN(TestWithBrowserView
);
50 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_