Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: chromecast/browser/test/cast_browser_test.h

Issue 2832153003: Move calling of shared browser test methods like SetUpOnMainThread/TearDownOnMainThread/RunTestOn... (Closed)
Patch Set: sync Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CHROMECAST_BROWSER_TEST_CAST_BROWSER_TEST_H_ 5 #ifndef CHROMECAST_BROWSER_TEST_CAST_BROWSER_TEST_H_
6 #define CHROMECAST_BROWSER_TEST_CAST_BROWSER_TEST_H_ 6 #define CHROMECAST_BROWSER_TEST_CAST_BROWSER_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 13 matching lines...) Expand all
24 // case, then shuts down the entire shell. 24 // case, then shuts down the entire shell.
25 // Note that this process takes 7-10 seconds per test case on Chromecast, so 25 // Note that this process takes 7-10 seconds per test case on Chromecast, so
26 // fewer test cases with more assertions are preferable. 26 // fewer test cases with more assertions are preferable.
27 class CastBrowserTest : public content::BrowserTestBase, CastWebView::Delegate { 27 class CastBrowserTest : public content::BrowserTestBase, CastWebView::Delegate {
28 protected: 28 protected:
29 CastBrowserTest(); 29 CastBrowserTest();
30 ~CastBrowserTest() override; 30 ~CastBrowserTest() override;
31 31
32 // content::BrowserTestBase implementation: 32 // content::BrowserTestBase implementation:
33 void SetUp() final; 33 void SetUp() final;
34 void TearDownOnMainThread() override;
35 void SetUpCommandLine(base::CommandLine* command_line) override; 34 void SetUpCommandLine(base::CommandLine* command_line) override;
36 void RunTestOnMainThreadLoop() final; 35 void PreRunTestOnMainThread() override;
36 void PostRunTestOnMainThread() override;
37 37
38 content::WebContents* NavigateToURL(const GURL& url); 38 content::WebContents* NavigateToURL(const GURL& url);
39 39
40 private: 40 private:
41 // CastWebView::Delegate implementation: 41 // CastWebView::Delegate implementation:
42 void OnPageStopped(int error_code) override; 42 void OnPageStopped(int error_code) override;
43 void OnLoadingStateChanged(bool loading) override; 43 void OnLoadingStateChanged(bool loading) override;
44 void OnWindowDestroyed() override; 44 void OnWindowDestroyed() override;
45 void OnKeyEvent(const ui::KeyEvent& key_event) override; 45 void OnKeyEvent(const ui::KeyEvent& key_event) override;
46 46
47 std::unique_ptr<CastWebView> cast_web_view_; 47 std::unique_ptr<CastWebView> cast_web_view_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(CastBrowserTest); 49 DISALLOW_COPY_AND_ASSIGN(CastBrowserTest);
50 }; 50 };
51 51
52 } // namespace shell 52 } // namespace shell
53 } // namespace chromecast 53 } // namespace chromecast
54 54
55 #endif // CHROMECAST_BROWSER_TEST_CAST_BROWSER_TEST_H_ 55 #endif // CHROMECAST_BROWSER_TEST_CAST_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chromecast/browser/renderer_prelauncher_test.cc ('k') | chromecast/browser/test/cast_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698