cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chromecast / browser / test / chromecast_browser_test.h
blobe570e6c42e2067b2fe4ccdb06268eaecee449bca
1 // Copyright 2014 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 CHROMECAST_BROWSER_TEST_CHROMECAST_BROWSER_TEST_H_
6 #define CHROMECAST_BROWSER_TEST_CHROMECAST_BROWSER_TEST_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/test/browser_test.h"
11 #include "content/public/test/browser_test_base.h"
13 namespace content {
14 class WebContents;
17 namespace chromecast {
18 namespace shell {
19 class CastContentWindow;
21 // This test allows for running an entire browser-process lifecycle per unit
22 // test, using Chromecast's cast_shell. This starts up the shell, runs a test
23 // case, then shuts down the entire shell.
24 // Note that this process takes 7-10 seconds per test case on Chromecast, so
25 // fewer test cases with more assertions are preferable.
26 class ChromecastBrowserTest : public content::BrowserTestBase {
27 protected:
28 ChromecastBrowserTest();
29 ~ChromecastBrowserTest() override;
31 // testing::Test implementation:
32 void SetUp() override;
34 // BrowserTestBase implementation:
35 void RunTestOnMainThreadLoop() override;
37 protected:
38 void NavigateToURL(content::WebContents* window, const GURL& gurl);
40 // Creates a new window and loads about:blank.
41 content::WebContents* CreateBrowser();
43 // Returns the window for the test.
44 content::WebContents* web_contents() const { return web_contents_.get(); }
46 private:
47 scoped_ptr<content::WebContents> web_contents_;
48 scoped_ptr<CastContentWindow> window_;
50 bool setup_called_;
52 DISALLOW_COPY_AND_ASSIGN(ChromecastBrowserTest);
55 } // namespace shell
56 } // namespace chromecast
58 #endif // CHROMECAST_BROWSER_TEST_CHROMECAST_BROWSER_TEST_H_