OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
6 #define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 | 12 |
13 class SkBitmap; | 13 class SkBitmap; |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class DictionaryValue; | 16 class DictionaryValue; |
17 } | 17 } |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 class WebContentSettingsClient; | 20 class WebContentSettingsClient; |
21 class WebLocalFrame; | 21 class WebLocalFrame; |
| 22 class WebTextCheckClient; |
22 class WebView; | 23 class WebView; |
23 } | 24 } |
24 | 25 |
25 namespace test_runner { | 26 namespace test_runner { |
26 | 27 |
27 class WebTestRunner { | 28 class WebTestRunner { |
28 public: | 29 public: |
29 // Returns a mock WebContentSettings that is used for layout tests. An | 30 // Returns a mock WebContentSettings that is used for layout tests. An |
30 // embedder should use this for all WebViews it creates. | 31 // embedder should use this for all WebViews it creates. |
31 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0; | 32 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0; |
32 | 33 |
| 34 // Returns a mock WebTextCheckClient that is used for layout tests. An |
| 35 // embedder should use this for all WebLocalFrames it creates. |
| 36 virtual blink::WebTextCheckClient* GetWebTextCheckClient() const = 0; |
| 37 |
33 // After WebTestDelegate::TestFinished was invoked, the following methods | 38 // After WebTestDelegate::TestFinished was invoked, the following methods |
34 // can be used to determine what kind of dump the main WebViewTestProxy can | 39 // can be used to determine what kind of dump the main WebViewTestProxy can |
35 // provide. | 40 // provide. |
36 | 41 |
37 // If true, WebTestDelegate::audioData returns an audio dump and no text | 42 // If true, WebTestDelegate::audioData returns an audio dump and no text |
38 // or pixel results are available. | 43 // or pixel results are available. |
39 virtual bool ShouldDumpAsAudio() const = 0; | 44 virtual bool ShouldDumpAsAudio() const = 0; |
40 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0; | 45 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0; |
41 | 46 |
42 // Reports if tests requested a recursive layout dump of all frames | 47 // Reports if tests requested a recursive layout dump of all frames |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual void InitializeWebViewWithMocks(blink::WebView* web_view) = 0; | 86 virtual void InitializeWebViewWithMocks(blink::WebView* web_view) = 0; |
82 | 87 |
83 // Sets focus on the given view. Internally tracks currently focused view, | 88 // Sets focus on the given view. Internally tracks currently focused view, |
84 // to aid in defocusing previously focused views at the right time. | 89 // to aid in defocusing previously focused views at the right time. |
85 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; | 90 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; |
86 }; | 91 }; |
87 | 92 |
88 } // namespace test_runner | 93 } // namespace test_runner |
89 | 94 |
90 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 95 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
OLD | NEW |