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

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

Issue 2489673005: [headless] Make browser service manifest overlay configurable. (Closed)
Patch Set: fix includes. Created 4 years, 1 month 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 | « headless/public/headless_browser.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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Synchronously evaluates a script and returns the result. 74 // Synchronously evaluates a script and returns the result.
75 std::unique_ptr<runtime::EvaluateResult> EvaluateScript( 75 std::unique_ptr<runtime::EvaluateResult> EvaluateScript(
76 HeadlessWebContents* web_contents, 76 HeadlessWebContents* web_contents,
77 const std::string& script); 77 const std::string& script);
78 78
79 protected: 79 protected:
80 // Returns the browser for the test. 80 // Returns the browser for the test.
81 HeadlessBrowser* browser() const; 81 HeadlessBrowser* browser() const;
82 82
83 // Returns the options used by the browser. Modify with caution, since some
84 // options only take effect if they were set before browser creation.
85 HeadlessBrowser::Options* options() const;
86
83 private: 87 private:
84 std::unique_ptr<base::RunLoop> run_loop_; 88 std::unique_ptr<base::RunLoop> run_loop_;
85 89
86 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserTest); 90 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserTest);
87 }; 91 };
88 92
89 #define HEADLESS_ASYNC_DEVTOOLED_TEST_F(TEST_FIXTURE_NAME) \ 93 #define HEADLESS_ASYNC_DEVTOOLED_TEST_F(TEST_FIXTURE_NAME) \
90 IN_PROC_BROWSER_TEST_F(TEST_FIXTURE_NAME, RunAsyncTest) { RunTest(); } \ 94 IN_PROC_BROWSER_TEST_F(TEST_FIXTURE_NAME, RunAsyncTest) { RunTest(); } \
91 class AsyncHeadlessBrowserTestNeedsSemicolon##TEST_FIXTURE_NAME {} 95 class AsyncHeadlessBrowserTestNeedsSemicolon##TEST_FIXTURE_NAME {}
92 96
(...skipping 18 matching lines...) Expand all
111 void RunTest(); 115 void RunTest();
112 116
113 HeadlessBrowserContext* browser_context_; // Not owned. 117 HeadlessBrowserContext* browser_context_; // Not owned.
114 HeadlessWebContents* web_contents_; 118 HeadlessWebContents* web_contents_;
115 std::unique_ptr<HeadlessDevToolsClient> devtools_client_; 119 std::unique_ptr<HeadlessDevToolsClient> devtools_client_;
116 }; 120 };
117 121
118 } // namespace headless 122 } // namespace headless
119 123
120 #endif // HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_ 124 #endif // HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « headless/public/headless_browser.cc ('k') | headless/test/headless_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698