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

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

Issue 298133002: Don't ensure, in single-process mode, that WebUI render views are the only ones in the process, as … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests + review suggestion Created 6 years, 7 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/browser/frame_host/render_frame_host_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager_unittest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index a5100dfbe4b2dc071a52f2e80d9c8271e3b260c9..ffd72a69b7d65793419100bfe8ee2b46a6a019ed 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -1092,6 +1092,33 @@ TEST_F(RenderFrameHostManagerTest, WebUI) {
host->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI);
}
+TEST_F(RenderFrameHostManagerTest,
+ CanNavigateBetweenNormalPagesAndWebUIInSingleProcess) {
nasko 2014/05/28 17:02:04 This test doesn't seem to work as expected. The re
+ const GURL kNormalUrl1("http://chromium.org");
+ const GURL kNormalUrl2("http://example.com");
+ const GURL kWebUIUrl("chrome://foo");
+
+ RenderProcessHost::SetRunRendererInProcess(true);
+ set_should_create_webui(true);
+
+ RenderFrameHostManager* manager =
+ static_cast<TestWebContents*>(
+ web_contents())->GetRenderManagerForTesting();
nasko 2014/05/28 17:02:04 nit: wrong indent
+
+ NavigateAndCommit(kNormalUrl1);
+ EXPECT_EQ(kNormalUrl1,
+ manager->current_frame_host()->GetSiteInstance()->GetSiteURL());
+ EXPECT_FALSE(manager->web_ui());
+ NavigateAndCommit(kWebUIUrl);
+ EXPECT_EQ(kWebUIUrl,
+ manager->current_frame_host()->GetSiteInstance()->GetSiteURL());
+ EXPECT_TRUE(manager->web_ui());
+ NavigateAndCommit(kNormalUrl2);
+ EXPECT_EQ(kNormalUrl2,
+ manager->current_frame_host()->GetSiteInstance()->GetSiteURL());
+ EXPECT_FALSE(manager->web_ui());
+}
+
// Tests that we can open a WebUI link in a new tab from a WebUI page and still
// grant the correct bindings. http://crbug.com/189101.
TEST_F(RenderFrameHostManagerTest, WebUIInNewTab) {
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698