Commit 55aeaa3e authored by Nasko Oskov's avatar Nasko Oskov Committed by Commit Bot

Remove some obsolete TODOs, fix a test one.

Change-Id: I691139bf9141760cfb54f50cc5b3b48108f52852
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561859Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831224}
parent 9212c16c
...@@ -588,8 +588,6 @@ bool FrameTreeNode::StopLoading() { ...@@ -588,8 +588,6 @@ bool FrameTreeNode::StopLoading() {
navigation_request_->set_net_error(net::ERR_ABORTED); navigation_request_->set_net_error(net::ERR_ABORTED);
ResetNavigationRequest(false); ResetNavigationRequest(false);
// TODO(nasko): see if child frames should send IPCs in site-per-process
// mode.
if (!IsMainFrame()) if (!IsMainFrame())
return true; return true;
......
...@@ -22,8 +22,6 @@ class WebContents; ...@@ -22,8 +22,6 @@ class WebContents;
// Interface for objects embedding a NavigationController to provide the // Interface for objects embedding a NavigationController to provide the
// functionality NavigationController needs. // functionality NavigationController needs.
// TODO(nasko): This interface should exist for short amount of time, while
// we transition navigation code from WebContents to Navigator.
class NavigationControllerDelegate { class NavigationControllerDelegate {
public: public:
virtual ~NavigationControllerDelegate() {} virtual ~NavigationControllerDelegate() {}
......
...@@ -8011,13 +8011,12 @@ IN_PROC_BROWSER_TEST_P(NavigationControllerBrowserTest, ...@@ -8011,13 +8011,12 @@ IN_PROC_BROWSER_TEST_P(NavigationControllerBrowserTest,
EXPECT_TRUE(NavigateToURL(shell(), start_url)); EXPECT_TRUE(NavigateToURL(shell(), start_url));
EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
// Navigate to an URL, which redirects to a data: URL, since it is an // Navigate to a URL that is blocked, which results in an error page.
// unsafe redirect and will result in a blocked navigation and error page. GURL blocked_url(embedded_test_server()->GetURL("/blocked.html"));
// TODO(nasko): Find a different way to cause a blocked navigation, so std::unique_ptr<URLLoaderInterceptor> url_interceptor =
// we test a bit more generic case. URLLoaderInterceptor::SetupRequestFailForURL(blocked_url,
GURL redirect_to_unsafe_url( net::ERR_BLOCKED_BY_CLIENT);
embedded_test_server()->GetURL("/server-redirect?data:text/html,Hello!")); EXPECT_FALSE(NavigateToURL(shell(), blocked_url));
EXPECT_FALSE(NavigateToURL(shell(), redirect_to_unsafe_url));
EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); EXPECT_EQ(1, controller.GetLastCommittedEntryIndex());
EXPECT_EQ(PAGE_TYPE_ERROR, controller.GetLastCommittedEntry()->GetPageType()); EXPECT_EQ(PAGE_TYPE_ERROR, controller.GetLastCommittedEntry()->GetPageType());
...@@ -8034,12 +8033,8 @@ IN_PROC_BROWSER_TEST_P(NavigationControllerBrowserTest, ...@@ -8034,12 +8033,8 @@ IN_PROC_BROWSER_TEST_P(NavigationControllerBrowserTest,
// The expectation is that the blocked URL is present in the NavigationEntry, // The expectation is that the blocked URL is present in the NavigationEntry,
// and shows up in both GetURL and GetVirtualURL. // and shows up in both GetURL and GetVirtualURL.
EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); EXPECT_EQ(1, controller.GetLastCommittedEntryIndex());
EXPECT_FALSE( EXPECT_EQ(blocked_url, controller.GetLastCommittedEntry()->GetURL());
controller.GetLastCommittedEntry()->GetURL().SchemeIs(url::kDataScheme)); EXPECT_EQ(blocked_url, controller.GetLastCommittedEntry()->GetVirtualURL());
EXPECT_EQ(redirect_to_unsafe_url,
controller.GetLastCommittedEntry()->GetURL());
EXPECT_EQ(redirect_to_unsafe_url,
controller.GetLastCommittedEntry()->GetVirtualURL());
} }
// Verifies that unsafe redirects to javascript: URLs are canceled and don't // Verifies that unsafe redirects to javascript: URLs are canceled and don't
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment