OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 10 #include "content/public/common/page_transition_types.h" |
| 11 |
| 12 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
10 | 13 |
11 namespace content { | 14 namespace content { |
12 | 15 |
13 class TestRenderFrameHost : public RenderFrameHostImpl { | 16 class TestRenderFrameHost : public RenderFrameHostImpl { |
14 public: | 17 public: |
15 TestRenderFrameHost(RenderViewHostImpl* render_view_host, | 18 TestRenderFrameHost(RenderViewHostImpl* render_view_host, |
16 RenderFrameHostDelegate* delegate, | 19 RenderFrameHostDelegate* delegate, |
17 FrameTree* frame_tree, | 20 FrameTree* frame_tree, |
18 FrameTreeNode* frame_tree_node, | 21 FrameTreeNode* frame_tree_node, |
19 int routing_id, | 22 int routing_id, |
20 bool is_swapped_out); | 23 bool is_swapped_out); |
21 virtual ~TestRenderFrameHost(); | 24 virtual ~TestRenderFrameHost(); |
22 | 25 |
| 26 void SendNavigate(int page_id, const GURL& url); |
| 27 void SendNavigateWithTransition( |
| 28 int page_id, |
| 29 const GURL& url, |
| 30 PageTransition transition); |
| 31 void SendNavigateWithTransitionAndResponseCode( |
| 32 int page_id, |
| 33 const GURL& url, PageTransition transition, |
| 34 int response_code); |
| 35 void SendNavigateWithOriginalRequestURL( |
| 36 int page_id, |
| 37 const GURL& url, |
| 38 const GURL& original_request_url); |
| 39 void SendNavigateWithParams( |
| 40 FrameHostMsg_DidCommitProvisionalLoad_Params* params); |
| 41 void SendNavigateWithParameters( |
| 42 int page_id, |
| 43 const GURL& url, |
| 44 PageTransition transition, |
| 45 const GURL& original_request_url, |
| 46 int response_code, |
| 47 const base::FilePath* file_path_for_history_item); |
| 48 |
23 // TODO(nick): As necessary for testing, override behavior of RenderFrameHost | 49 // TODO(nick): As necessary for testing, override behavior of RenderFrameHost |
24 // here. | 50 // here. |
25 | 51 |
26 private: | 52 private: |
| 53 std::string contents_mime_type_; |
| 54 |
27 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 55 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
28 }; | 56 }; |
29 | 57 |
30 } // namespace content | 58 } // namespace content |
31 | 59 |
32 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 60 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |