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

Unified Diff: chrome/browser/tab_contents/render_view_host_manager_unittest.cc

Issue 1519025: Set the site instance in all cases when we start a new load. If you navigate ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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/tab_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_host_manager_unittest.cc
===================================================================
--- chrome/browser/tab_contents/render_view_host_manager_unittest.cc (revision 43614)
+++ chrome/browser/tab_contents/render_view_host_manager_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -230,7 +230,7 @@
manager.Init(profile_.get(), instance, MSG_ROUTING_NONE);
- GURL url("chrome://newtab");
+ GURL url(chrome::kChromeUINewTabURL);
NavigationEntry entry(NULL /* instance */, -1 /* page_id */, url,
GURL() /* referrer */, string16() /* title */,
PageTransition::TYPED);
@@ -242,6 +242,13 @@
EXPECT_TRUE(manager.pending_dom_ui());
EXPECT_FALSE(manager.dom_ui());
+ // It's important that the site instance get set on the DOM UI page as soon
+ // as the navigation starts, rather than lazily after it commits, so we don't
+ // try to re-use the SiteInstance/process for non DOM-UI things that may
+ // get loaded in between.
+ EXPECT_TRUE(host->site_instance()->has_site());
+ EXPECT_EQ(url, host->site_instance()->site());
+
// Commit.
manager.DidNavigateMainFrame(host);
« no previous file with comments | « chrome/browser/tab_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698