[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 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. | ||||
4 | |||||
jochen | 73e711c | 2015-06-03 10:01:46 | [diff] [blame] | 5 | #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
6 | #define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ | ||||
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 7 | |
8 | #include <vector> | ||||
9 | |||||
10 | namespace blink { | ||||
mlamouri | 007f9d7 | 2015-02-27 16:27:25 | [diff] [blame] | 11 | class WebContentSettingsClient; |
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 12 | } |
13 | |||||
jochen | f5f3175 | 2015-06-03 12:06:34 | [diff] [blame] | 14 | namespace test_runner { |
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 15 | |
16 | class WebTestRunner { | ||||
17 | public: | ||||
mlamouri | 007f9d7 | 2015-02-27 16:27:25 | [diff] [blame] | 18 | // Returns a mock WebContentSettings that is used for layout tests. An |
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 19 | // embedder should use this for all WebViews it creates. |
mlamouri | 007f9d7 | 2015-02-27 16:27:25 | [diff] [blame] | 20 | virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0; |
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 21 | |
abhishek.a21 | ca9b560 | 2014-09-19 07:33:33 | [diff] [blame] | 22 | // After WebTestDelegate::TestFinished was invoked, the following methods |
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 23 | // can be used to determine what kind of dump the main WebTestProxy can |
24 | // provide. | ||||
25 | |||||
26 | // If true, WebTestDelegate::audioData returns an audio dump and no text | ||||
27 | // or pixel results are available. | ||||
28 | virtual bool ShouldDumpAsAudio() const = 0; | ||||
29 | virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0; | ||||
30 | |||||
31 | // Returns true if the call to WebTestProxy::captureTree will invoke | ||||
32 | // WebTestDelegate::captureHistoryForWindow. | ||||
33 | virtual bool ShouldDumpBackForwardList() const = 0; | ||||
34 | |||||
35 | // Returns true if WebTestProxy::capturePixels should be invoked after | ||||
36 | // capturing text results. | ||||
37 | virtual bool ShouldGeneratePixelResults() = 0; | ||||
jochen | 746754c5 | 2015-06-05 16:40:41 | [diff] [blame] | 38 | |
39 | virtual bool ShouldStayOnPageAfterHandlingBeforeUnload() const = 0; | ||||
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 40 | }; |
41 | |||||
jochen | f5f3175 | 2015-06-03 12:06:34 | [diff] [blame] | 42 | } // namespace test_runner |
[email protected] | 8deba6ca | 2014-05-26 16:37:03 | [diff] [blame] | 43 | |
jochen | 73e711c | 2015-06-03 10:01:46 | [diff] [blame] | 44 | #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ |