| 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 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // If true, WebTestDelegate::audioData returns an audio dump and no text | 37 // If true, WebTestDelegate::audioData returns an audio dump and no text |
| 38 // or pixel results are available. | 38 // or pixel results are available. |
| 39 virtual bool ShouldDumpAsAudio() const = 0; | 39 virtual bool ShouldDumpAsAudio() const = 0; |
| 40 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0; | 40 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0; |
| 41 | 41 |
| 42 // Reports if tests requested a recursive layout dump of all frames | 42 // Reports if tests requested a recursive layout dump of all frames |
| 43 // (i.e. by calling testRunner.dumpChildFramesAsText() from javascript). | 43 // (i.e. by calling testRunner.dumpChildFramesAsText() from javascript). |
| 44 virtual bool IsRecursiveLayoutDumpRequested() = 0; | 44 virtual bool IsRecursiveLayoutDumpRequested() = 0; |
| 45 | 45 |
| 46 // Runs any pending animations on existing widgets. |
| 47 virtual void RunPendingAnimations(); |
| 48 |
| 46 // Dumps layout of |frame| using the mode requested by the current test | 49 // Dumps layout of |frame| using the mode requested by the current test |
| 47 // (i.e. text mode if testRunner.dumpAsText() was called from javascript). | 50 // (i.e. text mode if testRunner.dumpAsText() was called from javascript). |
| 48 virtual std::string DumpLayout(blink::WebLocalFrame* frame) = 0; | 51 virtual std::string DumpLayout(blink::WebLocalFrame* frame) = 0; |
| 49 | 52 |
| 50 // Snapshots image of |web_view| using the mode requested by the current test | 53 // Snapshots image of |web_view| using the mode requested by the current test |
| 51 // and calls |callback| with the result. Caller needs to ensure that | 54 // and calls |callback| with the result. Caller needs to ensure that |
| 52 // |web_view| stays alive until |callback| is called. | 55 // |web_view| stays alive until |callback| is called. |
| 53 virtual void DumpPixelsAsync( | 56 virtual void DumpPixelsAsync( |
| 54 blink::WebView* web_view, | 57 blink::WebView* web_view, |
| 55 const base::Callback<void(const SkBitmap&)>& callback) = 0; | 58 const base::Callback<void(const SkBitmap&)>& callback) = 0; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 81 virtual void InitializeWebViewWithMocks(blink::WebView* web_view) = 0; | 84 virtual void InitializeWebViewWithMocks(blink::WebView* web_view) = 0; |
| 82 | 85 |
| 83 // Sets focus on the given view. Internally tracks currently focused view, | 86 // Sets focus on the given view. Internally tracks currently focused view, |
| 84 // to aid in defocusing previously focused views at the right time. | 87 // to aid in defocusing previously focused views at the right time. |
| 85 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; | 88 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; |
| 86 }; | 89 }; |
| 87 | 90 |
| 88 } // namespace test_runner | 91 } // namespace test_runner |
| 89 | 92 |
| 90 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 93 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
| OLD | NEW |