| 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_TEST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ |
| 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class Rect; | 33 class Rect; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace content { | 36 namespace content { |
| 37 | 37 |
| 38 class SiteInstance; | 38 class SiteInstance; |
| 39 class TestRenderFrameHost; | 39 class TestRenderFrameHost; |
| 40 class TestWebContents; | 40 class TestWebContents; |
| 41 | 41 |
| 42 // Utility function to initialize ViewHostMsg_NavigateParams_Params | 42 // Utility function to initialize ViewHostMsg_NavigateParams_Params |
| 43 // with given |page_id|, |url| and |transition_type|. | 43 // with given |url| and |transition_type|. |
| 44 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params, | 44 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params, |
| 45 int page_id, | |
| 46 const GURL& url, | 45 const GURL& url, |
| 47 PageTransition transition_type); | 46 PageTransition transition_type); |
| 48 | 47 |
| 49 // TestRenderViewHostView ------------------------------------------------------ | 48 // TestRenderViewHostView ------------------------------------------------------ |
| 50 | 49 |
| 51 // Subclass the RenderViewHost's view so that we can call Show(), etc., | 50 // Subclass the RenderViewHost's view so that we can call Show(), etc., |
| 52 // without having side-effects. | 51 // without having side-effects. |
| 53 class TestRenderWidgetHostView : public RenderWidgetHostViewBase { | 52 class TestRenderWidgetHostView : public RenderWidgetHostViewBase { |
| 54 public: | 53 public: |
| 55 explicit TestRenderWidgetHostView(RenderWidgetHost* rwh); | 54 explicit TestRenderWidgetHostView(RenderWidgetHost* rwh); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // including a custom original request URL. Sets the rest of the | 239 // including a custom original request URL. Sets the rest of the |
| 241 // parameters in the message to the "typical" values. This is a helper | 240 // parameters in the message to the "typical" values. This is a helper |
| 242 // function for simulating the most common types of loads. | 241 // function for simulating the most common types of loads. |
| 243 void SendNavigateWithOriginalRequestURL( | 242 void SendNavigateWithOriginalRequestURL( |
| 244 int page_id, const GURL& url, const GURL& original_request_url); | 243 int page_id, const GURL& url, const GURL& original_request_url); |
| 245 | 244 |
| 246 void SendNavigateWithFile( | 245 void SendNavigateWithFile( |
| 247 int page_id, const GURL& url, const base::FilePath& file_path); | 246 int page_id, const GURL& url, const base::FilePath& file_path); |
| 248 | 247 |
| 249 void SendNavigateWithParams( | 248 void SendNavigateWithParams( |
| 250 FrameHostMsg_DidCommitProvisionalLoad_Params* params); | 249 int page_id, FrameHostMsg_DidCommitProvisionalLoad_Params* params); |
| 251 | 250 |
| 252 void TestOnUpdateStateWithFile( | 251 void TestOnUpdateStateWithFile( |
| 253 int page_id, const base::FilePath& file_path); | 252 int page_id, const base::FilePath& file_path); |
| 254 | 253 |
| 255 void TestOnStartDragging(const DropData& drop_data); | 254 void TestOnStartDragging(const DropData& drop_data); |
| 256 | 255 |
| 257 // If set, *delete_counter is incremented when this object destructs. | 256 // If set, *delete_counter is incremented when this object destructs. |
| 258 void set_delete_counter(int* delete_counter) { | 257 void set_delete_counter(int* delete_counter) { |
| 259 delete_counter_ = delete_counter; | 258 delete_counter_ = delete_counter; |
| 260 } | 259 } |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 private: | 398 private: |
| 400 typedef scoped_ptr<ui::test::ScopedSetSupportedScaleFactors> | 399 typedef scoped_ptr<ui::test::ScopedSetSupportedScaleFactors> |
| 401 ScopedSetSupportedScaleFactors; | 400 ScopedSetSupportedScaleFactors; |
| 402 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; | 401 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; |
| 403 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); | 402 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); |
| 404 }; | 403 }; |
| 405 | 404 |
| 406 } // namespace content | 405 } // namespace content |
| 407 | 406 |
| 408 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ | 407 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |