| 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "content/browser/browser_thread_impl.h" | 6 #include "content/browser/browser_thread_impl.h" |
| 7 #include "content/browser/mock_content_browser_client.h" | 7 #include "content/browser/mock_content_browser_client.h" |
| 8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
| 9 #include "content/browser/site_instance_impl.h" | 9 #include "content/browser/site_instance_impl.h" |
| 10 #include "content/browser/web_contents/navigation_controller_impl.h" | 10 #include "content/browser/web_contents/navigation_controller_impl.h" |
| 11 #include "content/browser/web_contents/navigation_entry_impl.h" | 11 #include "content/browser/web_contents/navigation_entry_impl.h" |
| 12 #include "content/browser/web_contents/render_view_host_manager.h" | 12 #include "content/browser/web_contents/render_view_host_manager.h" |
| 13 #include "content/browser/web_contents/test_web_contents.h" | 13 #include "content/browser/web_contents/test_web_contents.h" |
| 14 #include "content/common/test_url_constants.h" | 14 #include "content/common/test_url_constants.h" |
| 15 #include "content/common/view_messages.h" | 15 #include "content/common/view_messages.h" |
| 16 #include "content/public/browser/notification_details.h" | 16 #include "content/public/browser/notification_details.h" |
| 17 #include "content/public/browser/notification_source.h" | 17 #include "content/public/browser/notification_source.h" |
| 18 #include "content/public/browser/notification_types.h" | 18 #include "content/public/browser/notification_types.h" |
| 19 #include "content/public/browser/web_ui_controller.h" | 19 #include "content/public/browser/web_ui_controller.h" |
| 20 #include "content/public/browser/web_ui_controller_factory.h" | 20 #include "content/public/browser/web_ui_controller_factory.h" |
| 21 #include "content/public/common/javascript_message_type.h" | 21 #include "content/public/common/javascript_message_type.h" |
| 22 #include "content/public/common/page_transition_types.h" | 22 #include "content/public/common/page_transition_types.h" |
| 23 #include "content/public/common/url_constants.h" | 23 #include "content/public/common/url_constants.h" |
| 24 #include "content/public/test/mock_render_process_host.h" | 24 #include "content/public/test/mock_render_process_host.h" |
| 25 #include "content/test/test_browser_context.h" | 25 #include "content/public/test/test_browser_context.h" |
| 26 #include "content/test/test_content_client.h" | 26 #include "content/test/test_content_client.h" |
| 27 #include "content/test/test_notification_tracker.h" | 27 #include "content/test/test_notification_tracker.h" |
| 28 #include "googleurl/src/url_util.h" | 28 #include "googleurl/src/url_util.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 #include "webkit/glue/webkit_glue.h" | 30 #include "webkit/glue/webkit_glue.h" |
| 31 | 31 |
| 32 using content::BrowserContext; | 32 using content::BrowserContext; |
| 33 using content::BrowserThread; | 33 using content::BrowserThread; |
| 34 using content::BrowserThreadImpl; | 34 using content::BrowserThreadImpl; |
| 35 using content::MockRenderProcessHost; | 35 using content::MockRenderProcessHost; |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 EXPECT_FALSE(rvh1->GetSiteInstance()->IsRelatedSiteInstance( | 829 EXPECT_FALSE(rvh1->GetSiteInstance()->IsRelatedSiteInstance( |
| 830 rvh3->GetSiteInstance())); | 830 rvh3->GetSiteInstance())); |
| 831 | 831 |
| 832 // No scripting is allowed across BrowsingInstances, so we should not create | 832 // No scripting is allowed across BrowsingInstances, so we should not create |
| 833 // swapped out RVHs for the opener chain in this case. | 833 // swapped out RVHs for the opener chain in this case. |
| 834 EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost( | 834 EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost( |
| 835 rvh3->GetSiteInstance())); | 835 rvh3->GetSiteInstance())); |
| 836 EXPECT_FALSE(opener2_manager->GetSwappedOutRenderViewHost( | 836 EXPECT_FALSE(opener2_manager->GetSwappedOutRenderViewHost( |
| 837 rvh3->GetSiteInstance())); | 837 rvh3->GetSiteInstance())); |
| 838 } | 838 } |
| OLD | NEW |