| 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 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 virtual bool IsRecursiveLayoutDumpRequested() = 0; | 49 virtual bool IsRecursiveLayoutDumpRequested() = 0; |
| 50 | 50 |
| 51 // Dumps layout of |frame| using the mode requested by the current test | 51 // Dumps layout of |frame| using the mode requested by the current test |
| 52 // (i.e. text mode if testRunner.dumpAsText() was called from javascript). | 52 // (i.e. text mode if testRunner.dumpAsText() was called from javascript). |
| 53 virtual std::string DumpLayout(blink::WebLocalFrame* frame) = 0; | 53 virtual std::string DumpLayout(blink::WebLocalFrame* frame) = 0; |
| 54 | 54 |
| 55 // Snapshots image of |web_view| using the mode requested by the current test | 55 // Snapshots image of |web_view| using the mode requested by the current test |
| 56 // and calls |callback| with the result. Caller needs to ensure that | 56 // and calls |callback| with the result. Caller needs to ensure that |
| 57 // |web_view| stays alive until |callback| is called. | 57 // |web_view| stays alive until |callback| is called. |
| 58 virtual void DumpPixelsAsync( | 58 virtual void DumpPixelsAsync( |
| 59 blink::WebView* web_view, | 59 blink::WebLocalFrame* frame, |
| 60 const base::Callback<void(const SkBitmap&)>& callback) = 0; | 60 base::OnceCallback<void(const SkBitmap&)> callback) = 0; |
| 61 | 61 |
| 62 // Replicates changes to layout test runtime flags | 62 // Replicates changes to layout test runtime flags |
| 63 // (i.e. changes that happened in another renderer). | 63 // (i.e. changes that happened in another renderer). |
| 64 // See also WebTestDelegate::OnLayoutTestRuntimeFlagsChanged. | 64 // See also WebTestDelegate::OnLayoutTestRuntimeFlagsChanged. |
| 65 virtual void ReplicateLayoutTestRuntimeFlagsChanges( | 65 virtual void ReplicateLayoutTestRuntimeFlagsChanges( |
| 66 const base::DictionaryValue& changed_values) = 0; | 66 const base::DictionaryValue& changed_values) = 0; |
| 67 | 67 |
| 68 // If custom text dump is present (i.e. if testRunner.setCustomTextOutput has | 68 // If custom text dump is present (i.e. if testRunner.setCustomTextOutput has |
| 69 // been called from javascript), then returns |true| and populates the | 69 // been called from javascript), then returns |true| and populates the |
| 70 // |custom_text_dump| argument. Otherwise returns |false|. | 70 // |custom_text_dump| argument. Otherwise returns |false|. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 86 virtual void InitializeWebViewWithMocks(blink::WebView* web_view) = 0; | 86 virtual void InitializeWebViewWithMocks(blink::WebView* web_view) = 0; |
| 87 | 87 |
| 88 // Sets focus on the given view. Internally tracks currently focused view, | 88 // Sets focus on the given view. Internally tracks currently focused view, |
| 89 // to aid in defocusing previously focused views at the right time. | 89 // to aid in defocusing previously focused views at the right time. |
| 90 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; | 90 virtual void SetFocus(blink::WebView* web_view, bool focus) = 0; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace test_runner | 93 } // namespace test_runner |
| 94 | 94 |
| 95 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ | 95 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_RUNNER_H_ |
| OLD | NEW |