OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 5 #ifndef CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
6 #define CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 6 #define CHROME_TEST_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/test/testing_browser_process_test.h" |
10 #include "chrome/test/test_browser_window.h" | 11 #include "chrome/test/test_browser_window.h" |
11 #include "content/browser/browser_thread.h" | 12 #include "content/browser/browser_thread.h" |
12 #include "content/browser/renderer_host/test_render_view_host.h" | 13 #include "content/browser/renderer_host/test_render_view_host.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 class Browser; | 16 class Browser; |
16 class GURL; | 17 class GURL; |
17 class NavigationController; | 18 class NavigationController; |
18 class TestBrowserWindow; | 19 class TestBrowserWindow; |
19 class TestingProfile; | 20 class TestingProfile; |
(...skipping 12 matching lines...) Expand all Loading... |
32 // GURL url2("http://foo/2"); | 33 // GURL url2("http://foo/2"); |
33 // NavigateAndCommit(controller, url2); | 34 // NavigateAndCommit(controller, url2); |
34 // | 35 // |
35 // // This is equivalent to the above, and lets you test pending navigations. | 36 // // This is equivalent to the above, and lets you test pending navigations. |
36 // browser()->OpenURL(GURL("http://foo/2"), GURL(), CURRENT_TAB, | 37 // browser()->OpenURL(GURL("http://foo/2"), GURL(), CURRENT_TAB, |
37 // PageTransition::TYPED); | 38 // PageTransition::TYPED); |
38 // CommitPendingLoadAsNewNavigation(controller, url2); | 39 // CommitPendingLoadAsNewNavigation(controller, url2); |
39 // | 40 // |
40 // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible | 41 // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible |
41 // for creating the various objects of this class. | 42 // for creating the various objects of this class. |
42 class BrowserWithTestWindowTest : public testing::Test { | 43 class BrowserWithTestWindowTest : public TestingBrowserProcessTest { |
43 public: | 44 public: |
44 BrowserWithTestWindowTest(); | 45 BrowserWithTestWindowTest(); |
45 virtual ~BrowserWithTestWindowTest(); | 46 virtual ~BrowserWithTestWindowTest(); |
46 | 47 |
47 virtual void SetUp(); | 48 virtual void SetUp(); |
48 | 49 |
49 // Returns the current RenderViewHost for the current tab as a | 50 // Returns the current RenderViewHost for the current tab as a |
50 // TestRenderViewHost. | 51 // TestRenderViewHost. |
51 TestRenderViewHost* TestRenderViewHostForTab(TabContents* tab_contents); | 52 TestRenderViewHost* TestRenderViewHostForTab(TabContents* tab_contents); |
52 | 53 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 scoped_ptr<TestBrowserWindow> window_; | 97 scoped_ptr<TestBrowserWindow> window_; |
97 scoped_ptr<Browser> browser_; | 98 scoped_ptr<Browser> browser_; |
98 | 99 |
99 MockRenderProcessHostFactory rph_factory_; | 100 MockRenderProcessHostFactory rph_factory_; |
100 TestRenderViewHostFactory rvh_factory_; | 101 TestRenderViewHostFactory rvh_factory_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); | 103 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); |
103 }; | 104 }; |
104 | 105 |
105 #endif // CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ | 106 #endif // CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ |
OLD | NEW |