Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cctype> | 9 #include <cctype> |
| 10 | 10 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 void RenderViewTest::SetFocused(const blink::WebNode& node) { | 504 void RenderViewTest::SetFocused(const blink::WebNode& node) { |
| 505 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 505 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
| 506 impl->focusedNodeChanged(blink::WebNode(), node); | 506 impl->focusedNodeChanged(blink::WebNode(), node); |
| 507 } | 507 } |
| 508 | 508 |
| 509 void RenderViewTest::Reload(const GURL& url) { | 509 void RenderViewTest::Reload(const GURL& url) { |
| 510 CommonNavigationParams common_params( | 510 CommonNavigationParams common_params( |
| 511 url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::RELOAD, | 511 url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::RELOAD, |
| 512 true, false, base::TimeTicks(), | 512 true, false, base::TimeTicks(), |
| 513 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), | 513 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), |
| 514 LOFI_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); | 514 PREVIEW_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); |
|
RyanSturm
2016/11/01 23:49:14
PREVIEW_UNSPECIFIED here seems like it is from a d
megjablon
2016/11/02 18:47:19
Ya this was from rebasing and re-parenting branche
| |
| 515 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 515 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
| 516 TestRenderFrame* frame = | 516 TestRenderFrame* frame = |
| 517 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 517 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 518 frame->Navigate(common_params, StartNavigationParams(), | 518 frame->Navigate(common_params, StartNavigationParams(), |
| 519 RequestNavigationParams()); | 519 RequestNavigationParams()); |
| 520 FrameLoadWaiter(frame).Wait(); | 520 FrameLoadWaiter(frame).Wait(); |
| 521 view_->GetWebView()->updateAllLifecyclePhases(); | 521 view_->GetWebView()->updateAllLifecyclePhases(); |
| 522 } | 522 } |
| 523 | 523 |
| 524 uint32_t RenderViewTest::GetNavigationIPCType() { | 524 uint32_t RenderViewTest::GetNavigationIPCType() { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 639 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 639 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
| 640 | 640 |
| 641 int history_list_length = impl->historyBackListCount() + | 641 int history_list_length = impl->historyBackListCount() + |
| 642 impl->historyForwardListCount() + 1; | 642 impl->historyForwardListCount() + 1; |
| 643 int pending_offset = offset + impl->history_list_offset_; | 643 int pending_offset = offset + impl->history_list_offset_; |
| 644 | 644 |
| 645 CommonNavigationParams common_params( | 645 CommonNavigationParams common_params( |
| 646 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, | 646 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, |
| 647 FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(), | 647 FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(), |
| 648 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), | 648 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), |
| 649 LOFI_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); | 649 PREVIEW_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); |
| 650 RequestNavigationParams request_params; | 650 RequestNavigationParams request_params; |
| 651 request_params.page_state = state; | 651 request_params.page_state = state; |
| 652 request_params.nav_entry_id = pending_offset + 1; | 652 request_params.nav_entry_id = pending_offset + 1; |
| 653 request_params.pending_history_list_offset = pending_offset; | 653 request_params.pending_history_list_offset = pending_offset; |
| 654 request_params.current_history_list_offset = impl->history_list_offset_; | 654 request_params.current_history_list_offset = impl->history_list_offset_; |
| 655 request_params.current_history_list_length = history_list_length; | 655 request_params.current_history_list_length = history_list_length; |
| 656 | 656 |
| 657 TestRenderFrame* frame = | 657 TestRenderFrame* frame = |
| 658 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 658 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 659 frame->Navigate(common_params, StartNavigationParams(), request_params); | 659 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 660 | 660 |
| 661 // The load actually happens asynchronously, so we pump messages to process | 661 // The load actually happens asynchronously, so we pump messages to process |
| 662 // the pending continuation. | 662 // the pending continuation. |
| 663 FrameLoadWaiter(frame).Wait(); | 663 FrameLoadWaiter(frame).Wait(); |
| 664 view_->GetWebView()->updateAllLifecyclePhases(); | 664 view_->GetWebView()->updateAllLifecyclePhases(); |
| 665 } | 665 } |
| 666 | 666 |
| 667 } // namespace content | 667 } // namespace content |
| OLD | NEW |