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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc

Issue 10575014: Move process-per-site logic from BrowsingInstance to RenderProcessHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comment. Created 8 years, 6 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 | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | content/browser/browsing_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
index 24d1d66473e64d975edb6949e003f79fcd7ee4c2..7da61ba5bf752b464d68eb571f0442308055829b 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
@@ -82,18 +82,18 @@ IN_PROC_BROWSER_TEST_F(NewTabUIBrowserTest, LoadNTPInExistingProcess) {
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
EXPECT_EQ(1, browser()->GetWebContentsAt(2)->GetMaxPageID());
- // At this point, opening another NTP will use the old SiteInstance in the
- // existing Web UI process, but the page IDs shouldn't affect each other.
+ // At this point, opening another NTP will use the existing WebUI process
+ // but its own SiteInstance, so the page IDs shouldn't affect each other.
ui_test_utils::NavigateToURLWithDisposition(
browser(), GURL(chrome::kChromeUINewTabURL), NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
EXPECT_EQ(1, browser()->GetWebContentsAt(3)->GetMaxPageID());
- // Only navigating to the NTP in the original tab should have a higher
- // page ID.
+ // Navigating to the NTP in the original tab causes a BrowsingInstance
+ // swap, so it gets a new SiteInstance starting with page ID 1 again.
browser()->ActivateTabAt(1, true);
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL));
- EXPECT_EQ(2, browser()->GetWebContentsAt(1)->GetMaxPageID());
+ EXPECT_EQ(1, browser()->GetWebContentsAt(1)->GetMaxPageID());
}
// Loads chrome://hang/ into two NTP tabs, ensuring we don't crash.
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | content/browser/browsing_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698