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_PUBLIC_TEST_CONTENT_BROWSER_TEST_H_
6 #define CONTENT_PUBLIC_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"
14 class ShellMainDelegate
;
16 // Base class for browser tests which use content_shell.
17 class ContentBrowserTest
: public BrowserTestBase
{
20 virtual ~ContentBrowserTest();
23 virtual void SetUp() OVERRIDE
;
24 virtual void TearDown() OVERRIDE
;
27 virtual void RunTestOnMainThreadLoop() OVERRIDE
;
30 // Creates a new window and loads about:blank.
31 Shell
* CreateBrowser();
33 // Creates an off-the-record window and loads about:blank.
34 Shell
* CreateOffTheRecordBrowser();
36 // Returns the window for the test.
37 Shell
* shell() const { return shell_
; }
44 #if defined(OS_ANDROID)
45 // For all other platforms, this is done automatically when calling into
46 // ContentMain. For Android we set things up manually.
47 scoped_ptr
<ShellMainDelegate
> shell_main_delegate_
;
51 } // namespace content
53 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_H_