| 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 #include "content/test/test_web_contents.h" | 5 #include "content/test/test_web_contents.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/browser/browser_url_handler_impl.h" | 9 #include "content/browser/browser_url_handler_impl.h" |
| 10 #include "content/browser/frame_host/cross_process_frame_connector.h" | 10 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 static_cast<const SiteInstanceImpl*>(site_instance); | 198 static_cast<const SiteInstanceImpl*>(site_instance); |
| 199 expect_set_history_length_and_prune_history_length_ = history_length; | 199 expect_set_history_length_and_prune_history_length_ = history_length; |
| 200 expect_set_history_length_and_prune_min_page_id_ = min_page_id; | 200 expect_set_history_length_and_prune_min_page_id_ = min_page_id; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void TestWebContents::SetHistoryLengthAndPrune( | 203 void TestWebContents::SetHistoryLengthAndPrune( |
| 204 const SiteInstance* site_instance, int history_length, | 204 const SiteInstance* site_instance, int history_length, |
| 205 int32 min_page_id) { | 205 int32 min_page_id) { |
| 206 EXPECT_TRUE(expect_set_history_length_and_prune_); | 206 EXPECT_TRUE(expect_set_history_length_and_prune_); |
| 207 expect_set_history_length_and_prune_ = false; | 207 expect_set_history_length_and_prune_ = false; |
| 208 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance); | 208 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_.get(), |
| 209 site_instance); |
| 209 EXPECT_EQ(expect_set_history_length_and_prune_history_length_, | 210 EXPECT_EQ(expect_set_history_length_and_prune_history_length_, |
| 210 history_length); | 211 history_length); |
| 211 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id); | 212 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id); |
| 212 } | 213 } |
| 213 | 214 |
| 214 void TestWebContents::TestDidFinishLoad(const GURL& url) { | 215 void TestWebContents::TestDidFinishLoad(const GURL& url) { |
| 215 FrameHostMsg_DidFinishLoad msg(0, url); | 216 FrameHostMsg_DidFinishLoad msg(0, url); |
| 216 frame_tree_.root()->current_frame_host()->OnMessageReceived(msg); | 217 frame_tree_.root()->current_frame_host()->OnMessageReceived(msg); |
| 217 } | 218 } |
| 218 | 219 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 249 } | 250 } |
| 250 | 251 |
| 251 void TestWebContents::ShowCreatedWidget(int route_id, | 252 void TestWebContents::ShowCreatedWidget(int route_id, |
| 252 const gfx::Rect& initial_pos) { | 253 const gfx::Rect& initial_pos) { |
| 253 } | 254 } |
| 254 | 255 |
| 255 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 256 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 256 } | 257 } |
| 257 | 258 |
| 258 } // namespace content | 259 } // namespace content |
| OLD | NEW |