Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(963)

Unified Diff: content/public/test/render_view_test.cc

Issue 1206753003: Add a TestRenderFrame to use in RenderViewTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/render_view_test.cc
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index c56cf3e6442ec6c81a81aca3e899010838ccb3c4..f5cde6ce41fcc2dc8f96d73a1e302ac83bca8907 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -29,6 +29,7 @@
#include "content/test/fake_compositor_dependencies.h"
#include "content/test/mock_render_process.h"
#include "content/test/test_content_client.h"
+#include "content/test/test_render_frame.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -129,6 +130,7 @@ scheduler::RendererScheduler*
RenderViewTest::RenderViewTest()
: view_(NULL) {
+ RenderFrameImpl::InstallCreateHook(&TestRenderFrame::CreateTestRenderFrame);
}
RenderViewTest::~RenderViewTest() {
@@ -435,9 +437,11 @@ void RenderViewTest::Reload(const GURL& url) {
true, base::TimeTicks(), FrameMsg_UILoadMetricsReportType::NO_REPORT,
GURL(), GURL());
RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
- impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(),
- RequestNavigationParams());
- FrameLoadWaiter(impl->GetMainRenderFrame()).Wait();
+ TestRenderFrame* frame =
+ static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
+ frame->Navigate(common_params, StartNavigationParams(),
+ RequestNavigationParams());
+ FrameLoadWaiter(frame).Wait();
}
uint32 RenderViewTest::GetNavigationIPCType() {
@@ -572,12 +576,13 @@ void RenderViewTest::GoToOffset(int offset, const PageState& state) {
request_params.current_history_list_offset = impl->history_list_offset_;
request_params.current_history_list_length = history_list_length;
- impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(),
- request_params);
+ TestRenderFrame* frame =
+ static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
+ frame->Navigate(common_params, StartNavigationParams(), request_params);
// The load actually happens asynchronously, so we pump messages to process
// the pending continuation.
- FrameLoadWaiter(view_->GetMainRenderFrame()).Wait();
+ FrameLoadWaiter(frame).Wait();
}
} // namespace content
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698