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

Side by Side Diff: headless/test/headless_browser_test.h

Issue 2832153003: Move calling of shared browser test methods like SetUpOnMainThread/TearDownOnMainThread/RunTestOn... (Closed)
Patch Set: sync Created 3 years, 8 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
« no previous file with comments | « extensions/shell/test/shell_test.cc ('k') | headless/test/headless_browser_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_ 5 #ifndef HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_
6 #define HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_ 6 #define HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public: 53 public:
54 // Notify that an asynchronous test is now complete and the test runner should 54 // Notify that an asynchronous test is now complete and the test runner should
55 // exit. 55 // exit.
56 void FinishAsynchronousTest(); 56 void FinishAsynchronousTest();
57 57
58 protected: 58 protected:
59 HeadlessBrowserTest(); 59 HeadlessBrowserTest();
60 ~HeadlessBrowserTest() override; 60 ~HeadlessBrowserTest() override;
61 61
62 // BrowserTestBase: 62 // BrowserTestBase:
63 void RunTestOnMainThreadLoop() override; 63 void PreRunTestOnMainThread() override;
64 void SetUpOnMainThread() override; 64 void PostRunTestOnMainThread() override;
65 void TearDownOnMainThread() override;
66 65
67 // Run an asynchronous test in a nested run loop. The caller should call 66 // Run an asynchronous test in a nested run loop. The caller should call
68 // FinishAsynchronousTest() to notify that the test should finish. 67 // FinishAsynchronousTest() to notify that the test should finish.
69 void RunAsynchronousTest(); 68 void RunAsynchronousTest();
70 69
71 // Synchronously waits for a tab to finish loading. 70 // Synchronously waits for a tab to finish loading.
72 bool WaitForLoad(HeadlessWebContents* web_contents); 71 bool WaitForLoad(HeadlessWebContents* web_contents);
73 72
74 // Synchronously evaluates a script and returns the result. 73 // Synchronously evaluates a script and returns the result.
75 std::unique_ptr<runtime::EvaluateResult> EvaluateScript( 74 std::unique_ptr<runtime::EvaluateResult> EvaluateScript(
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 128
130 HeadlessBrowserContext* browser_context_; // Not owned. 129 HeadlessBrowserContext* browser_context_; // Not owned.
131 HeadlessWebContents* web_contents_; 130 HeadlessWebContents* web_contents_;
132 std::unique_ptr<HeadlessDevToolsClient> devtools_client_; 131 std::unique_ptr<HeadlessDevToolsClient> devtools_client_;
133 bool render_process_exited_; 132 bool render_process_exited_;
134 }; 133 };
135 134
136 } // namespace headless 135 } // namespace headless
137 136
138 #endif // HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_ 137 #endif // HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « extensions/shell/test/shell_test.cc ('k') | headless/test/headless_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698