OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/render_frame_host_manager.h" |
| 6 |
5 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> |
6 | 9 |
7 #include "base/command_line.h" | 10 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 12 #include "base/macros.h" |
10 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
11 #include "base/test/histogram_tester.h" | 14 #include "base/test/histogram_tester.h" |
12 #include "base/time/time.h" | 15 #include "base/time/time.h" |
13 #include "build/build_config.h" | 16 #include "build/build_config.h" |
14 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" | 17 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" |
15 #include "content/browser/frame_host/cross_site_transferring_request.h" | 18 #include "content/browser/frame_host/cross_site_transferring_request.h" |
16 #include "content/browser/frame_host/navigation_controller_impl.h" | 19 #include "content/browser/frame_host/navigation_controller_impl.h" |
17 #include "content/browser/frame_host/navigation_entry_impl.h" | 20 #include "content/browser/frame_host/navigation_entry_impl.h" |
18 #include "content/browser/frame_host/navigation_request.h" | 21 #include "content/browser/frame_host/navigation_request.h" |
19 #include "content/browser/frame_host/navigator.h" | 22 #include "content/browser/frame_host/navigator.h" |
20 #include "content/browser/frame_host/render_frame_host_manager.h" | |
21 #include "content/browser/frame_host/render_frame_proxy_host.h" | 23 #include "content/browser/frame_host/render_frame_proxy_host.h" |
22 #include "content/browser/site_instance_impl.h" | 24 #include "content/browser/site_instance_impl.h" |
23 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 25 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
24 #include "content/common/frame_messages.h" | 26 #include "content/common/frame_messages.h" |
25 #include "content/common/input_messages.h" | 27 #include "content/common/input_messages.h" |
26 #include "content/common/site_isolation_policy.h" | 28 #include "content/common/site_isolation_policy.h" |
27 #include "content/common/view_messages.h" | 29 #include "content/common/view_messages.h" |
28 #include "content/public/browser/notification_details.h" | 30 #include "content/public/browser/notification_details.h" |
29 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
30 #include "content/public/browser/notification_source.h" | 32 #include "content/public/browser/notification_source.h" |
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2743 RenderFrameHostManager* manager = web_contents->GetRenderManagerForTesting(); | 2745 RenderFrameHostManager* manager = web_contents->GetRenderManagerForTesting(); |
2744 NavigationControllerImpl& controller = web_contents->GetController(); | 2746 NavigationControllerImpl& controller = web_contents->GetController(); |
2745 | 2747 |
2746 // Setup a restored entry. | 2748 // Setup a restored entry. |
2747 std::vector<scoped_ptr<NavigationEntry>> entries; | 2749 std::vector<scoped_ptr<NavigationEntry>> entries; |
2748 scoped_ptr<NavigationEntry> new_entry = | 2750 scoped_ptr<NavigationEntry> new_entry = |
2749 NavigationControllerImpl::CreateNavigationEntry( | 2751 NavigationControllerImpl::CreateNavigationEntry( |
2750 kInitUrl, Referrer(), ui::PAGE_TRANSITION_TYPED, false, std::string(), | 2752 kInitUrl, Referrer(), ui::PAGE_TRANSITION_TYPED, false, std::string(), |
2751 browser_context()); | 2753 browser_context()); |
2752 new_entry->SetPageID(0); | 2754 new_entry->SetPageID(0); |
2753 entries.push_back(new_entry.Pass()); | 2755 entries.push_back(std::move(new_entry)); |
2754 controller.Restore( | 2756 controller.Restore( |
2755 0, NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, &entries); | 2757 0, NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, &entries); |
2756 ASSERT_EQ(0u, entries.size()); | 2758 ASSERT_EQ(0u, entries.size()); |
2757 ASSERT_EQ(1, controller.GetEntryCount()); | 2759 ASSERT_EQ(1, controller.GetEntryCount()); |
2758 | 2760 |
2759 RenderFrameHostImpl* initial_host = manager->current_frame_host(); | 2761 RenderFrameHostImpl* initial_host = manager->current_frame_host(); |
2760 ASSERT_TRUE(initial_host); | 2762 ASSERT_TRUE(initial_host); |
2761 EXPECT_FALSE(initial_host->IsRenderFrameLive()); | 2763 EXPECT_FALSE(initial_host->IsRenderFrameLive()); |
2762 EXPECT_FALSE(initial_host->web_ui()); | 2764 EXPECT_FALSE(initial_host->web_ui()); |
2763 | 2765 |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3240 commit_params.should_enforce_strict_mixed_content_checking = false; | 3242 commit_params.should_enforce_strict_mixed_content_checking = false; |
3241 child_host->SendNavigateWithParams(&commit_params); | 3243 child_host->SendNavigateWithParams(&commit_params); |
3242 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC( | 3244 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC( |
3243 main_test_rfh(), false, proxy_to_parent->GetRoutingID())); | 3245 main_test_rfh(), false, proxy_to_parent->GetRoutingID())); |
3244 EXPECT_FALSE(root->child_at(0) | 3246 EXPECT_FALSE(root->child_at(0) |
3245 ->current_replication_state() | 3247 ->current_replication_state() |
3246 .should_enforce_strict_mixed_content_checking); | 3248 .should_enforce_strict_mixed_content_checking); |
3247 } | 3249 } |
3248 | 3250 |
3249 } // namespace content | 3251 } // namespace content |
OLD | NEW |