| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void SendNavigateWithParameters( | 76 void SendNavigateWithParameters( |
| 77 int page_id, | 77 int page_id, |
| 78 const GURL& url, | 78 const GURL& url, |
| 79 PageTransition transition, | 79 PageTransition transition, |
| 80 const GURL& original_request_url, | 80 const GURL& original_request_url, |
| 81 int response_code, | 81 int response_code, |
| 82 const base::FilePath* file_path_for_history_item, | 82 const base::FilePath* file_path_for_history_item, |
| 83 const std::vector<GURL>& redirects); | 83 const std::vector<GURL>& redirects); |
| 84 void SendBeginNavigationWithURL(const GURL& url); | 84 void SendBeginNavigationWithURL(const GURL& url); |
| 85 | 85 |
| 86 void DidDisownOpener(); |
| 87 |
| 86 void set_contents_mime_type(const std::string& mime_type) { | 88 void set_contents_mime_type(const std::string& mime_type) { |
| 87 contents_mime_type_ = mime_type; | 89 contents_mime_type_ = mime_type; |
| 88 } | 90 } |
| 89 | 91 |
| 90 // If set, navigations will appear to have cleared the history list in the | 92 // If set, navigations will appear to have cleared the history list in the |
| 91 // RenderFrame | 93 // RenderFrame |
| 92 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). | 94 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). |
| 93 // False by default. | 95 // False by default. |
| 94 void set_simulate_history_list_was_cleared(bool cleared) { | 96 void set_simulate_history_list_was_cleared(bool cleared) { |
| 95 simulate_history_list_was_cleared_ = cleared; | 97 simulate_history_list_was_cleared_ = cleared; |
| 96 } | 98 } |
| 97 | 99 |
| 98 // TODO(nick): As necessary for testing, override behavior of RenderFrameHost | 100 // TODO(nick): As necessary for testing, override behavior of RenderFrameHost |
| 99 // here. | 101 // here. |
| 100 | 102 |
| 101 private: | 103 private: |
| 102 TestRenderFrameHostCreationObserver child_creation_observer_; | 104 TestRenderFrameHostCreationObserver child_creation_observer_; |
| 103 | 105 |
| 104 std::string contents_mime_type_; | 106 std::string contents_mime_type_; |
| 105 | 107 |
| 106 // See set_simulate_history_list_was_cleared() above. | 108 // See set_simulate_history_list_was_cleared() above. |
| 107 bool simulate_history_list_was_cleared_; | 109 bool simulate_history_list_was_cleared_; |
| 108 | 110 |
| 109 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 111 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 } // namespace content | 114 } // namespace content |
| 113 | 115 |
| 114 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 116 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |