| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Turn the browser process into layout test mode. | 46 // Turn the browser process into layout test mode. |
| 47 void EnableBrowserLayoutTestMode(); | 47 void EnableBrowserLayoutTestMode(); |
| 48 | 48 |
| 49 /////////////////////////////////////////////////////////////////////////////// | 49 /////////////////////////////////////////////////////////////////////////////// |
| 50 // The following methods are meant to be used from a renderer. | 50 // The following methods are meant to be used from a renderer. |
| 51 | 51 |
| 52 // Turn a renderer into layout test mode. | 52 // Turn a renderer into layout test mode. |
| 53 void EnableRendererLayoutTestMode(); | 53 void EnableRendererLayoutTestMode(); |
| 54 | 54 |
| 55 // "Casts" |render_view| to |WebTestProxyBase|. Caller has to ensure that prior |
| 56 // to construciton of |render_view|, EnableWebTestProxyCreation was called. |
| 57 test_runner::WebTestProxyBase* GetWebTestProxyBase(RenderView* render_view); |
| 58 |
| 55 // Enable injecting of a WebTestProxy between WebViews and RenderViews | 59 // Enable injecting of a WebTestProxy between WebViews and RenderViews |
| 56 // and WebFrameTestProxy between WebFrames and RenderFrames. | 60 // and WebFrameTestProxy between WebFrames and RenderFrames. |
| 57 // |view_proxy_creation_callback| is invoked after creating WebTestProxy. | 61 // |view_proxy_creation_callback| is invoked after creating WebTestProxy. |
| 58 // |frame_proxy_creation_callback| is called after creating WebFrameTestProxy. | 62 // |frame_proxy_creation_callback| is called after creating WebFrameTestProxy. |
| 59 using ViewProxyCreationCallback = | 63 using ViewProxyCreationCallback = |
| 60 base::Callback<void(RenderView*, test_runner::WebTestProxyBase*)>; | 64 base::Callback<void(RenderView*, test_runner::WebTestProxyBase*)>; |
| 61 using FrameProxyCreationCallback = | 65 using FrameProxyCreationCallback = |
| 62 base::Callback<void(RenderFrame*, test_runner::WebFrameTestProxyBase*)>; | 66 base::Callback<void(RenderFrame*, test_runner::WebFrameTestProxyBase*)>; |
| 63 void EnableWebTestProxyCreation( | 67 void EnableWebTestProxyCreation( |
| 64 const ViewProxyCreationCallback& view_proxy_creation_callback, | 68 const ViewProxyCreationCallback& view_proxy_creation_callback, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 void DisableAutoResizeMode(RenderView* render_view, | 138 void DisableAutoResizeMode(RenderView* render_view, |
| 135 const blink::WebSize& new_size); | 139 const blink::WebSize& new_size); |
| 136 | 140 |
| 137 // Provides a text dump of the contents of the given page state. | 141 // Provides a text dump of the contents of the given page state. |
| 138 std::string DumpBackForwardList(std::vector<PageState>& page_state, | 142 std::string DumpBackForwardList(std::vector<PageState>& page_state, |
| 139 size_t current_index); | 143 size_t current_index); |
| 140 | 144 |
| 141 } // namespace content | 145 } // namespace content |
| 142 | 146 |
| 143 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 147 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| OLD | NEW |