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 virtual ~TestWithBrowserView();
30 // BrowserWithTestWindowTest overrides:
31 virtual void SetUp() OVERRIDE
;
32 virtual void TearDown() OVERRIDE
;
33 virtual TestingProfile
* CreateProfile() OVERRIDE
;
34 virtual BrowserWindow
* CreateBrowserWindow() OVERRIDE
;
36 BrowserView
* browser_view() { return browser_view_
; }
39 BrowserView
* browser_view_
; // Not owned.
40 scoped_ptr
<ScopedTestingLocalState
> local_state_
;
41 scoped_ptr
<predictors::PredictorDatabase
> predictor_db_
;
42 scoped_ptr
<chrome::TestingIOThreadState
> testing_io_thread_state_
;
44 DISALLOW_COPY_AND_ASSIGN(TestWithBrowserView
);
47 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_TEST_WITH_BROWSER_VIEW_H_