| 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_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
| 6 #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 6 #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Returns a clone of this TestWebContents. The returned object is also a | 72 // Returns a clone of this TestWebContents. The returned object is also a |
| 73 // TestWebContents. The caller owns the returned object. | 73 // TestWebContents. The caller owns the returned object. |
| 74 WebContents* Clone() override; | 74 WebContents* Clone() override; |
| 75 | 75 |
| 76 // Allow mocking of the RenderViewHostDelegateView. | 76 // Allow mocking of the RenderViewHostDelegateView. |
| 77 RenderViewHostDelegateView* GetDelegateView() override; | 77 RenderViewHostDelegateView* GetDelegateView() override; |
| 78 void set_delegate_view(RenderViewHostDelegateView* view) { | 78 void set_delegate_view(RenderViewHostDelegateView* view) { |
| 79 delegate_view_override_ = view; | 79 delegate_view_override_ = view; |
| 80 } | 80 } |
| 81 | 81 |
| 82 // Allows us to simulate this tab having an opener. | 82 // Allows us to simulate this tab's main frame having an opener that points |
| 83 // to the main frame of the |opener|. |
| 83 void SetOpener(TestWebContents* opener); | 84 void SetOpener(TestWebContents* opener); |
| 84 | 85 |
| 85 // Allows us to simulate that a contents was created via CreateNewWindow. | 86 // Allows us to simulate that a contents was created via CreateNewWindow. |
| 86 void AddPendingContents(TestWebContents* contents); | 87 void AddPendingContents(TestWebContents* contents); |
| 87 | 88 |
| 88 // Establish expected arguments for |SetHistoryOffsetAndLength()|. When | 89 // Establish expected arguments for |SetHistoryOffsetAndLength()|. When |
| 89 // |SetHistoryOffsetAndLength()| is called, the arguments are compared | 90 // |SetHistoryOffsetAndLength()| is called, the arguments are compared |
| 90 // with the expected arguments specified here. | 91 // with the expected arguments specified here. |
| 91 void ExpectSetHistoryOffsetAndLength(int history_offset, | 92 void ExpectSetHistoryOffsetAndLength(int history_offset, |
| 92 int history_length); | 93 int history_length); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Expectations for arguments of |SetHistoryOffsetAndLength()|. | 133 // Expectations for arguments of |SetHistoryOffsetAndLength()|. |
| 133 bool expect_set_history_offset_and_length_; | 134 bool expect_set_history_offset_and_length_; |
| 134 int expect_set_history_offset_and_length_history_offset_; | 135 int expect_set_history_offset_and_length_history_offset_; |
| 135 int expect_set_history_offset_and_length_history_length_; | 136 int expect_set_history_offset_and_length_history_length_; |
| 136 std::string save_frame_headers_; | 137 std::string save_frame_headers_; |
| 137 }; | 138 }; |
| 138 | 139 |
| 139 } // namespace content | 140 } // namespace content |
| 140 | 141 |
| 141 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 142 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
| OLD | NEW |