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/test/browser_test_base.h" | 10 #include "content/test/browser_test_base.h" |
10 | 11 |
11 class ShellMainDelegate; | 12 class ShellMainDelegate; |
12 | 13 |
| 14 namespace content { |
| 15 class Shell; |
| 16 } |
| 17 |
13 class ContentBrowserTest : public BrowserTestBase { | 18 class ContentBrowserTest : public BrowserTestBase { |
14 protected: | 19 protected: |
15 ContentBrowserTest(); | 20 ContentBrowserTest(); |
16 virtual ~ContentBrowserTest(); | 21 virtual ~ContentBrowserTest(); |
17 | 22 |
18 // testing::Test: | 23 // testing::Test: |
19 virtual void SetUp() OVERRIDE; | 24 virtual void SetUp() OVERRIDE; |
20 virtual void TearDown() OVERRIDE; | 25 virtual void TearDown() OVERRIDE; |
21 | 26 |
22 // BrowserTestBase: | 27 // BrowserTestBase: |
23 virtual void RunTestOnMainThreadLoop() OVERRIDE; | 28 virtual void RunTestOnMainThreadLoop() OVERRIDE; |
24 | 29 |
| 30 // Returns the window for the test. |
| 31 content::Shell* shell() const { return shell_; } |
| 32 |
25 private: | 33 private: |
26 scoped_ptr<ShellMainDelegate> shell_main_delegate_; | 34 scoped_ptr<ShellMainDelegate> shell_main_delegate_; |
| 35 |
| 36 content::Shell* shell_; |
27 }; | 37 }; |
28 | 38 |
29 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_ | 39 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_ |
OLD | NEW |