OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_TEST_CONTENT_BROWSER_TEST_H_ | 5 #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_H_ |
6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_H_ | 6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/public/test/browser_test.h" | 9 #include "content/public/test/browser_test.h" |
10 #include "content/test/browser_test_base.h" | 10 #include "content/test/browser_test_base.h" |
11 | 11 |
| 12 class GURL; |
| 13 |
12 namespace content { | 14 namespace content { |
13 class Shell; | 15 class Shell; |
14 class ShellMainDelegate; | 16 class ShellMainDelegate; |
15 | 17 |
16 class ContentBrowserTest : public BrowserTestBase { | 18 class ContentBrowserTest : public BrowserTestBase { |
17 protected: | 19 protected: |
18 ContentBrowserTest(); | 20 ContentBrowserTest(); |
19 virtual ~ContentBrowserTest(); | 21 virtual ~ContentBrowserTest(); |
20 | 22 |
21 // testing::Test: | 23 // testing::Test: |
22 virtual void SetUp() OVERRIDE; | 24 virtual void SetUp() OVERRIDE; |
23 virtual void TearDown() OVERRIDE; | 25 virtual void TearDown() OVERRIDE; |
24 | 26 |
25 // BrowserTestBase: | 27 // BrowserTestBase: |
26 virtual void RunTestOnMainThreadLoop() OVERRIDE; | 28 virtual void RunTestOnMainThreadLoop() OVERRIDE; |
27 | 29 |
28 protected: | 30 protected: |
| 31 // Creates a new window and loads about:blank. |
| 32 Shell* CreateBrowser(); |
| 33 |
| 34 // Creates an off-the-record window and loads about:blank. |
| 35 Shell* CreateOffTheRecordBrowser(); |
| 36 |
29 // Returns the window for the test. | 37 // Returns the window for the test. |
30 Shell* shell() const { return shell_; } | 38 Shell* shell() const { return shell_; } |
31 | 39 |
32 private: | 40 private: |
33 scoped_ptr<content::ShellMainDelegate> shell_main_delegate_; | 41 scoped_ptr<content::ShellMainDelegate> shell_main_delegate_; |
34 | 42 |
35 Shell* shell_; | 43 Shell* shell_; |
36 }; | 44 }; |
37 | 45 |
38 } // namespace content | 46 } // namespace content |
39 | 47 |
40 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_ | 48 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_ |
OLD | NEW |