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
3 // found in the LICENSE file.
5 #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_H_
6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/test/browser_test.h"
10 #include "content/public/test/browser_test_base.h"
15 class ContentRendererClient;
17 class ShellMainDelegate;
19 class ContentBrowserTest : public BrowserTestBase {
22 virtual ~ContentBrowserTest();
25 virtual void SetUp() OVERRIDE;
26 virtual void TearDown() OVERRIDE;
29 virtual void RunTestOnMainThreadLoop() OVERRIDE;
31 // Must be called before or during setup.
32 void SetContentRendererClient(
33 scoped_ptr<ContentRendererClient> renderer_client);
36 // Creates a new window and loads about:blank.
37 Shell* CreateBrowser();
39 // Creates an off-the-record window and loads about:blank.
40 Shell* CreateOffTheRecordBrowser();
42 // Returns the window for the test.
43 Shell* shell() const { return shell_; }
46 scoped_ptr<ShellMainDelegate> shell_main_delegate_;
52 // ContentRendererClient when running in single-process mode.
53 scoped_ptr<ContentRendererClient> single_process_renderer_client_;
56 } // namespace content
58 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_