| Index: content/browser/site_per_process_browsertest.cc
|
| diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
|
| index 9e9f43e459b17e1cf09417c6e3e8216d843a4f3a..98d1eff519c0b12c43d89949b76f09ce7833c6cb 100644
|
| --- a/content/browser/site_per_process_browsertest.cc
|
| +++ b/content/browser/site_per_process_browsertest.cc
|
| @@ -2408,7 +2408,7 @@
|
| // of the API), but the frame's last_successful_url shouldn't change and the
|
| // origin should be empty.
|
| // PlzNavigate: We have switched RenderFrameHosts for the subframe, so the
|
| - // last successful url should be empty (since the frame only loaded an error
|
| + // last succesful url should be empty (since the frame only loaded an error
|
| // page).
|
| if (IsBrowserSideNavigationEnabled())
|
| EXPECT_EQ(GURL(), child->current_frame_host()->last_successful_url());
|
| @@ -7424,33 +7424,15 @@
|
| load_observer.Wait();
|
| }
|
|
|
| - // The last successful url shouldn't be the blocked url.
|
| - EXPECT_EQ(old_subframe_url,
|
| - root->child_at(0)->current_frame_host()->last_successful_url());
|
| -
|
| - if (IsBrowserSideNavigationEnabled()) {
|
| - // The blocked frame should go to an error page. Errors currently commit
|
| - // with the URL of the blocked page.
|
| - EXPECT_EQ(blocked_url, root->child_at(0)->current_url());
|
| -
|
| - // The page should get the title of an error page (i.e "") and not the
|
| - // title of the blocked page.
|
| - std::string frame_title;
|
| - EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| - root->child_at(0), "domAutomationController.send(document.title)",
|
| - &frame_title));
|
| - EXPECT_EQ("", frame_title);
|
| - } else {
|
| - // The blocked frame should stay at the old location.
|
| - EXPECT_EQ(old_subframe_url, root->child_at(0)->current_url());
|
| -
|
| - // The blocked frame should keep the old title.
|
| - std::string frame_title;
|
| - EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| - root->child_at(0), "domAutomationController.send(document.title)",
|
| - &frame_title));
|
| - EXPECT_EQ("Title Of Awesomeness", frame_title);
|
| - }
|
| + // The blocked frame should stay at the old location.
|
| + EXPECT_EQ(old_subframe_url, root->child_at(0)->current_url());
|
| +
|
| + // The blocked frame should keep the old title.
|
| + std::string frame_title;
|
| + EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| + root->child_at(0), "domAutomationController.send(document.title)",
|
| + &frame_title));
|
| + EXPECT_EQ("Title Of Awesomeness", frame_title);
|
|
|
| // Navigate to a URL without CSP.
|
| EXPECT_TRUE(NavigateToURL(
|
| @@ -7517,33 +7499,15 @@
|
| load_observer2.Wait();
|
| }
|
|
|
| - // The last successful url shouldn't be the blocked url.
|
| - EXPECT_EQ(old_subframe_url,
|
| - root->child_at(0)->current_frame_host()->last_successful_url());
|
| -
|
| - if (IsBrowserSideNavigationEnabled()) {
|
| - // The blocked frame should go to an error page. Errors currently commit
|
| - // with the URL of the blocked page.
|
| - EXPECT_EQ(blocked_url, root->child_at(0)->current_url());
|
| -
|
| - // The page should get the title of an error page (i.e "") and not the
|
| - // title of the blocked page.
|
| - std::string frame_title;
|
| - EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| - root->child_at(0), "domAutomationController.send(document.title)",
|
| - &frame_title));
|
| - EXPECT_EQ("", frame_title);
|
| - } else {
|
| - // The blocked frame should stay at the old location.
|
| - EXPECT_EQ(old_subframe_url, root->child_at(0)->current_url());
|
| -
|
| - // The blocked frame should keep the old title.
|
| - std::string frame_title;
|
| - EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| - root->child_at(0), "domAutomationController.send(document.title)",
|
| - &frame_title));
|
| - EXPECT_EQ("Title Of Awesomeness", frame_title);
|
| - }
|
| + // The blocked frame should stay at the old location.
|
| + EXPECT_EQ(old_subframe_url, root->child_at(0)->current_url());
|
| +
|
| + // The blocked frame should keep the old title.
|
| + std::string frame_title;
|
| + EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| + root->child_at(0), "domAutomationController.send(document.title)",
|
| + &frame_title));
|
| + EXPECT_EQ("Title Of Awesomeness", frame_title);
|
| }
|
|
|
| // Test that a cross-origin frame's navigation can be blocked by CSP frame-src.
|
| @@ -7604,33 +7568,15 @@
|
| load_observer2.Wait();
|
| }
|
|
|
| - // The last successful url shouldn't be the blocked url.
|
| - EXPECT_EQ(old_subframe_url,
|
| - navigating_frame->current_frame_host()->last_successful_url());
|
| -
|
| - if (IsBrowserSideNavigationEnabled()) {
|
| - // The blocked frame should go to an error page. Errors currently commit
|
| - // with the URL of the blocked page.
|
| - EXPECT_EQ(blocked_url, navigating_frame->current_url());
|
| -
|
| - // The page should get the title of an error page (i.e "") and not the
|
| - // title of the blocked page.
|
| - std::string frame_title;
|
| - EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| - navigating_frame, "domAutomationController.send(document.title)",
|
| - &frame_title));
|
| - EXPECT_EQ("", frame_title);
|
| - } else {
|
| - // The blocked frame should stay at the old location.
|
| - EXPECT_EQ(old_subframe_url, navigating_frame->current_url());
|
| -
|
| - // The blocked frame should keep the old title.
|
| - std::string frame_title;
|
| - EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| - navigating_frame, "domAutomationController.send(document.title)",
|
| - &frame_title));
|
| - EXPECT_EQ("Title Of Awesomeness", frame_title);
|
| - }
|
| + // The blocked frame should stay at the old location.
|
| + EXPECT_EQ(old_subframe_url, navigating_frame->current_url());
|
| +
|
| + // The blocked frame should keep the old title.
|
| + std::string frame_title;
|
| + EXPECT_TRUE(ExecuteScriptAndExtractString(
|
| + navigating_frame, "domAutomationController.send(document.title)",
|
| + &frame_title));
|
| + EXPECT_EQ("Title Of Awesomeness", frame_title);
|
|
|
| // Navigate the subframe to a URL without CSP.
|
| NavigateFrameToURL(srcdoc_frame,
|
|
|