OLD | NEW |
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_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
6 #define CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 6 #define CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // PageTransition::TYPED); | 37 // PageTransition::TYPED); |
38 // CommitPendingLoad(controller); | 38 // CommitPendingLoad(controller); |
39 // | 39 // |
40 // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible | 40 // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible |
41 // for creating the various objects of this class. | 41 // for creating the various objects of this class. |
42 class BrowserWithTestWindowTest : public testing::Test { | 42 class BrowserWithTestWindowTest : public testing::Test { |
43 public: | 43 public: |
44 BrowserWithTestWindowTest(); | 44 BrowserWithTestWindowTest(); |
45 virtual ~BrowserWithTestWindowTest(); | 45 virtual ~BrowserWithTestWindowTest(); |
46 | 46 |
47 virtual void SetUp(); | 47 virtual void SetUp() OVERRIDE; |
48 | 48 |
49 // Returns the current RenderViewHost for the current tab as a | 49 // Returns the current RenderViewHost for the current tab as a |
50 // TestRenderViewHost. | 50 // TestRenderViewHost. |
51 TestRenderViewHost* TestRenderViewHostForTab(TabContents* tab_contents); | 51 TestRenderViewHost* TestRenderViewHostForTab(TabContents* tab_contents); |
52 | 52 |
53 protected: | 53 protected: |
54 TestBrowserWindow* window() const { return window_.get(); } | 54 TestBrowserWindow* window() const { return window_.get(); } |
55 void set_window(TestBrowserWindow* window) { | 55 void set_window(TestBrowserWindow* window) { |
56 window_.reset(window); | 56 window_.reset(window); |
57 } | 57 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 scoped_ptr<TestBrowserWindow> window_; | 104 scoped_ptr<TestBrowserWindow> window_; |
105 scoped_ptr<Browser> browser_; | 105 scoped_ptr<Browser> browser_; |
106 | 106 |
107 MockRenderProcessHostFactory rph_factory_; | 107 MockRenderProcessHostFactory rph_factory_; |
108 TestRenderViewHostFactory rvh_factory_; | 108 TestRenderViewHostFactory rvh_factory_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); | 110 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); |
111 }; | 111 }; |
112 | 112 |
113 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 113 #endif // CHROME_TEST_BASE_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
OLD | NEW |