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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 int history_list_length = impl->historyBackListCount() + | 442 int history_list_length = impl->historyBackListCount() + |
443 impl->historyForwardListCount() + 1; | 443 impl->historyForwardListCount() + 1; |
444 int pending_offset = offset + impl->history_list_offset_; | 444 int pending_offset = offset + impl->history_list_offset_; |
445 | 445 |
446 CommonNavigationParams common_params( | 446 CommonNavigationParams common_params( |
447 GURL(), Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, | 447 GURL(), Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, |
448 FrameMsg_Navigate_Type::NORMAL, true, base::TimeTicks(), | 448 FrameMsg_Navigate_Type::NORMAL, true, base::TimeTicks(), |
449 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL()); | 449 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL()); |
450 HistoryNavigationParams history_params( | 450 HistoryNavigationParams history_params( |
451 state, impl->page_id_ + offset, pending_offset, | 451 state, impl->page_id_ + offset, pending_offset + 1, pending_offset, |
452 impl->history_list_offset_, history_list_length, false); | 452 impl->history_list_offset_, history_list_length, false); |
453 | 453 |
454 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), | 454 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), |
455 CommitNavigationParams(), | 455 CommitNavigationParams(), |
456 history_params); | 456 history_params); |
457 | 457 |
458 // The load actually happens asynchronously, so we pump messages to process | 458 // The load actually happens asynchronously, so we pump messages to process |
459 // the pending continuation. | 459 // the pending continuation. |
460 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 460 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
461 } | 461 } |
462 | 462 |
463 } // namespace content | 463 } // namespace content |
OLD | NEW |