| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 // Ensure that view-source navigations force a new SiteInstance. | 1007 // Ensure that view-source navigations force a new SiteInstance. |
| 1008 EXPECT_NE(site_instance1, site_instance2); | 1008 EXPECT_NE(site_instance1, site_instance2); |
| 1009 | 1009 |
| 1010 // Now navigate to a different instance so that we swap out again. | 1010 // Now navigate to a different instance so that we swap out again. |
| 1011 NavigateToURL(shell(), https_server.GetURL("files/title2.html")); | 1011 NavigateToURL(shell(), https_server.GetURL("files/title2.html")); |
| 1012 rvh_observers.AddObserverToRVH(shell()->web_contents()->GetRenderViewHost()); | 1012 rvh_observers.AddObserverToRVH(shell()->web_contents()->GetRenderViewHost()); |
| 1013 | 1013 |
| 1014 // This used to leak a render view host. | 1014 // This used to leak a render view host. |
| 1015 shell()->Close(); | 1015 shell()->Close(); |
| 1016 | 1016 |
| 1017 MessageLoop::current()->PostTask(FROM_HERE, | 1017 RunAllPendingInMessageLoop(); // Needed on ChromeOS. |
| 1018 MessageLoop::QuitWhenIdleClosure()); | |
| 1019 content::RunMessageLoop(); | |
| 1020 | 1018 |
| 1021 EXPECT_EQ(0U, rvh_observers.GetNumObservers()); | 1019 EXPECT_EQ(0U, rvh_observers.GetNumObservers()); |
| 1022 } | 1020 } |
| 1023 | 1021 |
| 1024 } // namespace content | 1022 } // namespace content |
| OLD | NEW |