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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_manager_unittest.cc

Issue 6461024: Revert 74292 - Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/sync_ui_util_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_thread.h" 5 #include "chrome/browser/browser_thread.h"
6 #include "chrome/browser/browser_url_handler.h" 6 #include "chrome/browser/browser_url_handler.h"
7 #include "chrome/browser/renderer_host/site_instance.h" 7 #include "chrome/browser/renderer_host/site_instance.h"
8 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 8 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
9 #include "chrome/browser/tab_contents/navigation_controller.h" 9 #include "chrome/browser/tab_contents/navigation_controller.h"
10 #include "chrome/browser/tab_contents/navigation_entry.h" 10 #include "chrome/browser/tab_contents/navigation_entry.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 // Commit. 269 // Commit.
270 manager.DidNavigateMainFrame(host); 270 manager.DidNavigateMainFrame(host);
271 } 271 }
272 272
273 // Tests that chrome: URLs that are not Web UI pages do not get grouped into 273 // Tests that chrome: URLs that are not Web UI pages do not get grouped into
274 // Web UI renderers, even if --process-per-tab is enabled. In that mode, we 274 // Web UI renderers, even if --process-per-tab is enabled. In that mode, we
275 // still swap processes if ShouldSwapProcessesForNavigation is true. 275 // still swap processes if ShouldSwapProcessesForNavigation is true.
276 // Regression test for bug 46290. 276 // Regression test for bug 46290.
277 TEST_F(RenderViewHostManagerTest, NonDOMUIChromeURLs) { 277 TEST_F(RenderViewHostManagerTest, NonDOMUIChromeURLs) {
278 BrowserThread thread(BrowserThread::UI, &message_loop_);
279 SiteInstance* instance = SiteInstance::CreateSiteInstance(profile_.get()); 278 SiteInstance* instance = SiteInstance::CreateSiteInstance(profile_.get());
280 TestTabContents tab_contents(profile_.get(), instance); 279 TestTabContents tab_contents(profile_.get(), instance);
281 RenderViewHostManager manager(&tab_contents, &tab_contents); 280 RenderViewHostManager manager(&tab_contents, &tab_contents);
282 manager.Init(profile_.get(), instance, MSG_ROUTING_NONE); 281 manager.Init(profile_.get(), instance, MSG_ROUTING_NONE);
283 282
284 // NTP is a Web UI page. 283 // NTP is a Web UI page.
285 GURL ntp_url(chrome::kChromeUINewTabURL); 284 GURL ntp_url(chrome::kChromeUINewTabURL);
286 NavigationEntry ntp_entry(NULL /* instance */, -1 /* page_id */, ntp_url, 285 NavigationEntry ntp_entry(NULL /* instance */, -1 /* page_id */, ntp_url,
287 GURL() /* referrer */, string16() /* title */, 286 GURL() /* referrer */, string16() /* title */,
288 PageTransition::TYPED); 287 PageTransition::TYPED);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // That should have cancelled the pending RVH, and the evil RVH should be the 334 // That should have cancelled the pending RVH, and the evil RVH should be the
336 // current one. 335 // current one.
337 EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL); 336 EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL);
338 EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host()); 337 EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host());
339 338
340 // Also we should not have a pending navigation entry. 339 // Also we should not have a pending navigation entry.
341 NavigationEntry* entry = contents()->controller().GetActiveEntry(); 340 NavigationEntry* entry = contents()->controller().GetActiveEntry();
342 ASSERT_TRUE(entry != NULL); 341 ASSERT_TRUE(entry != NULL);
343 EXPECT_EQ(url2, entry->url()); 342 EXPECT_EQ(url2, entry->url());
344 } 343 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698