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 COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 class WebContentSettingsClient; | 12 class WebContentSettingsClient; |
13 } | 13 } |
14 | 14 |
15 namespace test_runner { | 15 namespace test_runner { |
16 | 16 |
17 struct LayoutDumpFlags; | 17 struct LayoutDumpFlags; |
18 | 18 |
19 class WebTestRunner { | 19 class WebTestRunner { |
20 public: | 20 public: |
| 21 // Resets everything (i.e. LayoutDumpFlags) in preparation for the next test. |
| 22 virtual void Reset() = 0; |
| 23 |
| 24 // Used to provide the test runner with the pointer to memory shared across |
| 25 // all renderers (and containing LayoutDumpFlags). |
| 26 virtual void SetSharedLayoutDumpFlags( |
| 27 LayoutDumpFlags* shared_layout_dump_flags) = 0; |
| 28 |
21 // Returns a mock WebContentSettings that is used for layout tests. An | 29 // Returns a mock WebContentSettings that is used for layout tests. An |
22 // embedder should use this for all WebViews it creates. | 30 // embedder should use this for all WebViews it creates. |
23 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0; | 31 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0; |
24 | 32 |
25 // After WebTestDelegate::TestFinished was invoked, the following methods | 33 // After WebTestDelegate::TestFinished was invoked, the following methods |
26 // can be used to determine what kind of dump the main WebTestProxy can | 34 // can be used to determine what kind of dump the main WebTestProxy can |
27 // provide. | 35 // provide. |
28 | 36 |
29 // If true, WebTestDelegate::audioData returns an audio dump and no text | 37 // If true, WebTestDelegate::audioData returns an audio dump and no text |
30 // or pixel results are available. | 38 // or pixel results are available. |
(...skipping 16 matching lines...) Expand all Loading... |
47 // Returns true if WebTestProxy::capturePixels should be invoked after | 55 // Returns true if WebTestProxy::capturePixels should be invoked after |
48 // capturing text results. | 56 // capturing text results. |
49 virtual bool ShouldGeneratePixelResults() = 0; | 57 virtual bool ShouldGeneratePixelResults() = 0; |
50 | 58 |
51 virtual bool ShouldStayOnPageAfterHandlingBeforeUnload() const = 0; | 59 virtual bool ShouldStayOnPageAfterHandlingBeforeUnload() const = 0; |
52 }; | 60 }; |
53 | 61 |
54 } // namespace test_runner | 62 } // namespace test_runner |
55 | 63 |
56 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 64 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
OLD | NEW |