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

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

Issue 2648053002: Remove old session history logic. (Closed)
Patch Set: Remove comment. Created 3 years, 11 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/common/view_messages.h ('k') | content/renderer/BUILD.gn » ('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 d36497a87af56f7481351d61bcde5477d034a6a6..bc99abf73d864e624f2f30b6a81d2eb3f79cb86b 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -20,7 +20,6 @@
#include "content/common/input_messages.h"
#include "content/common/renderer.mojom.h"
#include "content/common/resize_params.h"
-#include "content/common/site_isolation_policy.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -30,7 +29,6 @@
#include "content/public/common/renderer_preferences.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/test/frame_load_waiter.h"
-#include "content/renderer/history_controller.h"
#include "content/renderer/history_serialization.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
@@ -212,17 +210,12 @@ void RenderViewTest::LoadHTMLWithUrlOverride(const char* html,
PageState RenderViewTest::GetCurrentPageState() {
RenderViewImpl* view_impl = static_cast<RenderViewImpl*>(view_);
- if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
- // This returns a PageState object for the main frame, excluding subframes.
- // This could be extended to all local frames if needed by tests, but it
- // cannot include out-of-process frames.
- TestRenderFrame* frame =
- static_cast<TestRenderFrame*>(view_impl->GetMainRenderFrame());
- return SingleHistoryItemToPageState(frame->current_history_item());
- } else {
- return HistoryEntryToPageState(
- view_impl->history_controller()->GetCurrentEntry());
- }
+ // This returns a PageState object for the main frame, excluding subframes.
+ // This could be extended to all local frames if needed by tests, but it
+ // cannot include out-of-process frames.
+ TestRenderFrame* frame =
+ static_cast<TestRenderFrame*>(view_impl->GetMainRenderFrame());
+ return SingleHistoryItemToPageState(frame->current_history_item());
}
void RenderViewTest::GoBack(const GURL& url, const PageState& state) {
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698