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" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 EXPECT_EQ(last_rfh, contents()->GetMainFrame()); | 887 EXPECT_EQ(last_rfh, contents()->GetMainFrame()); |
888 | 888 |
889 // The renderer sends a commit. | 889 // The renderer sends a commit. |
890 contents()->GetMainFrame()->SendNavigateWithTransition( | 890 contents()->GetMainFrame()->SendNavigateWithTransition( |
891 new_id, entry_id, false, kUrl, ui::PAGE_TRANSITION_TYPED); | 891 new_id, entry_id, false, kUrl, ui::PAGE_TRANSITION_TYPED); |
892 EXPECT_EQ(1, controller().GetLastCommittedEntryIndex()); | 892 EXPECT_EQ(1, controller().GetLastCommittedEntryIndex()); |
893 EXPECT_FALSE(controller().GetPendingEntry()); | 893 EXPECT_FALSE(controller().GetPendingEntry()); |
894 | 894 |
895 // New message should be sent out to make sure to enter view-source mode. | 895 // New message should be sent out to make sure to enter view-source mode. |
896 EXPECT_TRUE(process()->sink().GetUniqueMessageMatching( | 896 EXPECT_TRUE(process()->sink().GetUniqueMessageMatching( |
897 ViewMsg_EnableViewSourceMode::ID)); | 897 FrameMsg_EnableViewSourceMode::ID)); |
898 } | 898 } |
899 | 899 |
900 // Tests the Init function by checking the initial RenderViewHost. | 900 // Tests the Init function by checking the initial RenderViewHost. |
901 TEST_F(RenderFrameHostManagerTest, Init) { | 901 TEST_F(RenderFrameHostManagerTest, Init) { |
902 // Using TestBrowserContext. | 902 // Using TestBrowserContext. |
903 SiteInstanceImpl* instance = | 903 SiteInstanceImpl* instance = |
904 static_cast<SiteInstanceImpl*>(SiteInstance::Create(browser_context())); | 904 static_cast<SiteInstanceImpl*>(SiteInstance::Create(browser_context())); |
905 EXPECT_FALSE(instance->HasSite()); | 905 EXPECT_FALSE(instance->HasSite()); |
906 | 906 |
907 scoped_ptr<TestWebContents> web_contents( | 907 scoped_ptr<TestWebContents> web_contents( |
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3106 commit_params.should_enforce_strict_mixed_content_checking = false; | 3106 commit_params.should_enforce_strict_mixed_content_checking = false; |
3107 child_host->SendNavigateWithParams(&commit_params); | 3107 child_host->SendNavigateWithParams(&commit_params); |
3108 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC( | 3108 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC( |
3109 main_test_rfh(), false, proxy_to_parent->GetRoutingID())); | 3109 main_test_rfh(), false, proxy_to_parent->GetRoutingID())); |
3110 EXPECT_FALSE(root->child_at(0) | 3110 EXPECT_FALSE(root->child_at(0) |
3111 ->current_replication_state() | 3111 ->current_replication_state() |
3112 .should_enforce_strict_mixed_content_checking); | 3112 .should_enforce_strict_mixed_content_checking); |
3113 } | 3113 } |
3114 | 3114 |
3115 } // namespace content | 3115 } // namespace content |
OLD | NEW |