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

Side by Side Diff: content/browser/renderer_host/render_view_host_manager_browsertest.cc

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
11 #include "content/browser/renderer_host/render_view_host.h" 11 #include "content/browser/renderer_host/render_view_host.h"
12 #include "content/browser/site_instance.h" 12 #include "content/browser/site_instance_impl.h"
13 #include "content/browser/tab_contents/tab_contents.h" 13 #include "content/browser/tab_contents/tab_contents.h"
14 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 #include "content/public/browser/notification_types.h" 17 #include "content/public/browser/notification_types.h"
18 #include "content/public/browser/render_view_host_observer.h" 18 #include "content/public/browser/render_view_host_observer.h"
19 #include "content/public/common/url_constants.h" 19 #include "content/public/common/url_constants.h"
20 #include "net/base/net_util.h" 20 #include "net/base/net_util.h"
21 #include "net/test/test_server.h" 21 #include "net/test/test_server.h"
22 22
23 using content::SiteInstance;
24
23 class RenderViewHostManagerTest : public InProcessBrowserTest { 25 class RenderViewHostManagerTest : public InProcessBrowserTest {
24 public: 26 public:
25 RenderViewHostManagerTest() { 27 RenderViewHostManagerTest() {
26 EnableDOMAutomation(); 28 EnableDOMAutomation();
27 } 29 }
28 30
29 static bool GetFilePathWithHostAndPortReplacement( 31 static bool GetFilePathWithHostAndPortReplacement(
30 const std::string& original_file_path, 32 const std::string& original_file_path,
31 const net::HostPortPair& host_port_pair, 33 const net::HostPortPair& host_port_pair,
32 std::string* replacement_path) { 34 std::string* replacement_path) {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // Now navigate to a different instance so that we swap out again. 332 // Now navigate to a different instance so that we swap out again.
331 ui_test_utils::NavigateToURL(browser(), 333 ui_test_utils::NavigateToURL(browser(),
332 https_server.GetURL("files/title2.html")); 334 https_server.GetURL("files/title2.html"));
333 rvh_observers.AddObserverToRVH(browser()->GetSelectedWebContents()-> 335 rvh_observers.AddObserverToRVH(browser()->GetSelectedWebContents()->
334 GetRenderViewHost()); 336 GetRenderViewHost());
335 337
336 // This used to leak a render view host. 338 // This used to leak a render view host.
337 browser()->CloseTabContents(browser()->GetSelectedWebContents()); 339 browser()->CloseTabContents(browser()->GetSelectedWebContents());
338 EXPECT_EQ(0U, rvh_observers.GetNumObservers()); 340 EXPECT_EQ(0U, rvh_observers.GetNumObservers());
339 } 341 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_factory.cc ('k') | content/browser/renderer_host/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698