OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 namespace blink { | 10 namespace blink { |
9 class WebArrayBufferView; | |
10 class WebPermissionClient; | 11 class WebPermissionClient; |
11 } | 12 } |
12 | 13 |
13 namespace WebTestRunner { | 14 namespace WebTestRunner { |
14 | 15 |
15 class WebTestRunner { | 16 class WebTestRunner { |
16 public: | 17 public: |
17 // Returns a mock WebPermissionClient that is used for layout tests. An | 18 // Returns a mock WebPermissionClient that is used for layout tests. An |
18 // embedder should use this for all WebViews it creates. | 19 // embedder should use this for all WebViews it creates. |
19 virtual blink::WebPermissionClient* webPermissions() const = 0; | 20 virtual blink::WebPermissionClient* webPermissions() const = 0; |
20 | 21 |
21 // After WebTestDelegate::testFinished was invoked, the following methods | 22 // After WebTestDelegate::testFinished was invoked, the following methods |
22 // can be used to determine what kind of dump the main WebTestProxy can | 23 // can be used to determine what kind of dump the main WebTestProxy can |
23 // provide. | 24 // provide. |
24 | 25 |
25 // If true, WebTestDelegate::audioData returns an audio dump and no text | 26 // If true, WebTestDelegate::audioData returns an audio dump and no text |
26 // or pixel results are available. | 27 // or pixel results are available. |
27 virtual bool shouldDumpAsAudio() const = 0; | 28 virtual bool shouldDumpAsAudio() const = 0; |
28 virtual const blink::WebArrayBufferView* audioData() const = 0; | 29 virtual void getAudioData(std::vector<unsigned char>* bufferView) const = 0; |
29 | 30 |
30 // Returns true if the call to WebTestProxy::captureTree will invoke | 31 // Returns true if the call to WebTestProxy::captureTree will invoke |
31 // WebTestDelegate::captureHistoryForWindow. | 32 // WebTestDelegate::captureHistoryForWindow. |
32 virtual bool shouldDumpBackForwardList() const = 0; | 33 virtual bool shouldDumpBackForwardList() const = 0; |
33 | 34 |
34 // Returns true if WebTestProxy::capturePixels should be invoked after | 35 // Returns true if WebTestProxy::capturePixels should be invoked after |
35 // capturing text results. | 36 // capturing text results. |
36 virtual bool shouldGeneratePixelResults() = 0; | 37 virtual bool shouldGeneratePixelResults() = 0; |
37 }; | 38 }; |
38 | 39 |
39 } | 40 } |
40 | 41 |
41 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_ | 42 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_ |
OLD | NEW |