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

Unified Diff: content/browser/frame_host/render_frame_host_manager_browsertest.cc

Issue 1785153005: Remove SiteIsolationPolicy::IsSwappedOutStateForbidden(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT. Created 4 years, 9 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
Index: content/browser/frame_host/render_frame_host_manager_browsertest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 644ba9047b98126edf8e5f414bcf66c5bff2e704..973f0b5f6fa16044c00660840fd25fb1e58e541f 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -1400,75 +1400,6 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, MAYBE_BackForwardNotStale) {
}
}
-// Test for http://crbug.com/130016.
-// Swapping out a render view should update its visiblity state.
-IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
- SwappedOutViewHasCorrectVisibilityState) {
- // This test is invalid in when swapped out is disabled.
- if (SiteIsolationPolicy::IsSwappedOutStateForbidden())
- return;
- StartEmbeddedServer();
-
- // Load a page with links that open in a new window.
- NavigateToPageWithLinks(shell());
-
- // Open a same-site link in a new widnow.
- ShellAddedObserver new_shell_observer;
- bool success = false;
- EXPECT_TRUE(ExecuteScriptAndExtractBool(
- shell()->web_contents(),
- "window.domAutomationController.send(clickSameSiteTargetedLink());",
- &success));
- EXPECT_TRUE(success);
- Shell* new_shell = new_shell_observer.GetShell();
-
- // Wait for the navigation in the new tab to finish, if it hasn't.
- WaitForLoadStop(new_shell->web_contents());
- EXPECT_EQ("/navigate_opener.html",
- new_shell->web_contents()->GetLastCommittedURL().path());
-
- RenderViewHost* rvh = new_shell->web_contents()->GetRenderViewHost();
-
- EXPECT_TRUE(ExecuteScriptAndExtractBool(
- rvh,
- "window.domAutomationController.send("
- " document.visibilityState == 'visible');",
- &success));
- EXPECT_TRUE(success);
-
- // Now navigate the new window to a different site. This should swap out the
- // tab's existing RenderView, causing it become hidden.
- NavigateToURL(new_shell,
- embedded_test_server()->GetURL("foo.com", "/title1.html"));
-
- EXPECT_TRUE(ExecuteScriptAndExtractBool(
- rvh,
- "window.domAutomationController.send("
- " document.visibilityState == 'hidden');",
- &success));
- EXPECT_TRUE(success);
-
- // Going back should make the previously swapped-out view to become visible
- // again.
- {
- TestNavigationObserver back_nav_load_observer(new_shell->web_contents());
- new_shell->web_contents()->GetController().GoBack();
- back_nav_load_observer.Wait();
- }
-
- EXPECT_EQ("/navigate_opener.html",
- new_shell->web_contents()->GetLastCommittedURL().path());
-
- EXPECT_EQ(rvh, new_shell->web_contents()->GetRenderViewHost());
-
- EXPECT_TRUE(ExecuteScriptAndExtractBool(
- rvh,
- "window.domAutomationController.send("
- " document.visibilityState == 'visible');",
- &success));
- EXPECT_TRUE(success);
-}
-
// This class ensures that all the given RenderViewHosts have properly been
// shutdown.
class RenderViewHostDestructionObserver : public WebContentsObserver {

Powered by Google App Engine
This is Rietveld 408576698