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

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

Issue 2631263003: [headless] Fix screenshots with gpu enabled. (Closed)
Patch Set: add skia dep to build file. Created 3 years, 11 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 | « headless/lib/headless_web_contents_browsertest.cc ('k') | no next file » | 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 private: 87 private:
88 std::unique_ptr<base::RunLoop> run_loop_; 88 std::unique_ptr<base::RunLoop> run_loop_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserTest); 90 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserTest);
91 }; 91 };
92 92
93 #define HEADLESS_ASYNC_DEVTOOLED_TEST_F(TEST_FIXTURE_NAME) \ 93 #define HEADLESS_ASYNC_DEVTOOLED_TEST_F(TEST_FIXTURE_NAME) \
94 IN_PROC_BROWSER_TEST_F(TEST_FIXTURE_NAME, RunAsyncTest) { RunTest(); } \ 94 IN_PROC_BROWSER_TEST_F(TEST_FIXTURE_NAME, RunAsyncTest) { RunTest(); } \
95 class AsyncHeadlessBrowserTestNeedsSemicolon##TEST_FIXTURE_NAME {} 95 class AsyncHeadlessBrowserTestNeedsSemicolon##TEST_FIXTURE_NAME {}
96 96
97 #define HEADLESS_ASYNC_DEVTOOLED_TEST_P(TEST_FIXTURE_NAME) \
98 IN_PROC_BROWSER_TEST_P(TEST_FIXTURE_NAME, RunAsyncTest) { RunTest(); } \
99 class AsyncHeadlessBrowserTestNeedsSemicolon##TEST_FIXTURE_NAME {}
100
97 // Base class for tests that require access to a DevToolsClient. Subclasses 101 // Base class for tests that require access to a DevToolsClient. Subclasses
98 // should override the RunDevTooledTest() method, which is called asynchronously 102 // should override the RunDevTooledTest() method, which is called asynchronously
99 // when the DevToolsClient is ready. 103 // when the DevToolsClient is ready.
100 class HeadlessAsyncDevTooledBrowserTest : public HeadlessBrowserTest, 104 class HeadlessAsyncDevTooledBrowserTest : public HeadlessBrowserTest,
101 public HeadlessWebContents::Observer { 105 public HeadlessWebContents::Observer {
102 public: 106 public:
103 HeadlessAsyncDevTooledBrowserTest(); 107 HeadlessAsyncDevTooledBrowserTest();
104 ~HeadlessAsyncDevTooledBrowserTest() override; 108 ~HeadlessAsyncDevTooledBrowserTest() override;
105 109
106 // HeadlessWebContentsObserver implementation: 110 // HeadlessWebContentsObserver implementation:
(...skipping 11 matching lines...) Expand all
118 122
119 HeadlessBrowserContext* browser_context_; // Not owned. 123 HeadlessBrowserContext* browser_context_; // Not owned.
120 HeadlessWebContents* web_contents_; 124 HeadlessWebContents* web_contents_;
121 std::unique_ptr<HeadlessDevToolsClient> devtools_client_; 125 std::unique_ptr<HeadlessDevToolsClient> devtools_client_;
122 bool render_process_exited_; 126 bool render_process_exited_;
123 }; 127 };
124 128
125 } // namespace headless 129 } // namespace headless
126 130
127 #endif // HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_ 131 #endif // HEADLESS_TEST_HEADLESS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « headless/lib/headless_web_contents_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698