| 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/public/test/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "content/common/dom_storage/dom_storage_types.h" | 8 #include "content/common/dom_storage/dom_storage_types.h" |
| 9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
| 10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 437 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
| 438 | 438 |
| 439 int history_list_length = impl->historyBackListCount() + | 439 int history_list_length = impl->historyBackListCount() + |
| 440 impl->historyForwardListCount() + 1; | 440 impl->historyForwardListCount() + 1; |
| 441 int pending_offset = offset + impl->history_list_offset_; | 441 int pending_offset = offset + impl->history_list_offset_; |
| 442 | 442 |
| 443 FrameMsg_Navigate_Params navigate_params; | 443 FrameMsg_Navigate_Params navigate_params; |
| 444 navigate_params.common_params.navigation_type = | 444 navigate_params.common_params.navigation_type = |
| 445 FrameMsg_Navigate_Type::NORMAL; | 445 FrameMsg_Navigate_Type::NORMAL; |
| 446 navigate_params.common_params.transition = ui::PAGE_TRANSITION_FORWARD_BACK; | 446 navigate_params.common_params.transition = ui::PAGE_TRANSITION_FORWARD_BACK; |
| 447 navigate_params.current_history_list_length = history_list_length; | 447 navigate_params.history_params.current_history_list_length = |
| 448 navigate_params.current_history_list_offset = impl->history_list_offset_; | 448 history_list_length; |
| 449 navigate_params.pending_history_list_offset = pending_offset; | 449 navigate_params.history_params.current_history_list_offset = |
| 450 navigate_params.page_id = impl->page_id_ + offset; | 450 impl->history_list_offset_; |
| 451 navigate_params.commit_params.page_state = state; | 451 navigate_params.history_params.pending_history_list_offset = pending_offset; |
| 452 navigate_params.history_params.page_id = impl->page_id_ + offset; |
| 453 navigate_params.history_params.page_state = state; |
| 452 navigate_params.request_time = base::Time::Now(); | 454 navigate_params.request_time = base::Time::Now(); |
| 453 | 455 |
| 454 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), | 456 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), |
| 455 navigate_params); | 457 navigate_params); |
| 456 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); | 458 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); |
| 457 | 459 |
| 458 // The load actually happens asynchronously, so we pump messages to process | 460 // The load actually happens asynchronously, so we pump messages to process |
| 459 // the pending continuation. | 461 // the pending continuation. |
| 460 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 462 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
| 461 } | 463 } |
| 462 | 464 |
| 463 } // namespace content | 465 } // namespace content |
| OLD | NEW |