| OLD | NEW |
| 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/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/test/in_process_browser_test.h" | 10 #include "chrome/test/in_process_browser_test.h" |
| 11 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
| 12 #include "content/browser/site_instance.h" | 12 #include "content/browser/site_instance.h" |
| 13 #include "content/browser/tab_contents/tab_contents.h" | 13 #include "content/browser/tab_contents/tab_contents.h" |
| 14 #include "content/common/content_notification_types.h" |
| 14 #include "content/common/notification_details.h" | 15 #include "content/common/notification_details.h" |
| 15 #include "content/common/notification_observer.h" | 16 #include "content/common/notification_observer.h" |
| 16 #include "content/common/notification_registrar.h" | 17 #include "content/common/notification_registrar.h" |
| 17 #include "content/common/notification_type.h" | |
| 18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| 19 #include "net/test/test_server.h" | 19 #include "net/test/test_server.h" |
| 20 | 20 |
| 21 class RenderViewHostManagerTest : public InProcessBrowserTest { | 21 class RenderViewHostManagerTest : public InProcessBrowserTest { |
| 22 public: | 22 public: |
| 23 RenderViewHostManagerTest() { | 23 RenderViewHostManagerTest() { |
| 24 EnableDOMAutomation(); | 24 EnableDOMAutomation(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 static bool GetFilePathWithHostAndPortReplacement( | 27 static bool GetFilePathWithHostAndPortReplacement( |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 EXPECT_EQ(1, browser()->tab_count()); | 240 EXPECT_EQ(1, browser()->tab_count()); |
| 241 EXPECT_EQ(0, browser()->active_index()); | 241 EXPECT_EQ(0, browser()->active_index()); |
| 242 EXPECT_EQ("/files/title2.html", | 242 EXPECT_EQ("/files/title2.html", |
| 243 browser()->GetSelectedTabContents()->GetURL().path()); | 243 browser()->GetSelectedTabContents()->GetURL().path()); |
| 244 | 244 |
| 245 // Should have the same SiteInstance. | 245 // Should have the same SiteInstance. |
| 246 scoped_refptr<SiteInstance> noref_site_instance( | 246 scoped_refptr<SiteInstance> noref_site_instance( |
| 247 browser()->GetSelectedTabContents()->GetSiteInstance()); | 247 browser()->GetSelectedTabContents()->GetSiteInstance()); |
| 248 EXPECT_EQ(orig_site_instance, noref_site_instance); | 248 EXPECT_EQ(orig_site_instance, noref_site_instance); |
| 249 } | 249 } |
| OLD | NEW |