OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 5811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5822 EXPECT_EQ("GET", root_entry->method()); | 5822 EXPECT_EQ("GET", root_entry->method()); |
5823 EXPECT_EQ(-1, root_entry->post_id()); | 5823 EXPECT_EQ(-1, root_entry->post_id()); |
5824 EXPECT_EQ("GET", frame_entry->method()); | 5824 EXPECT_EQ("GET", frame_entry->method()); |
5825 EXPECT_EQ(-1, frame_entry->post_id()); | 5825 EXPECT_EQ(-1, frame_entry->post_id()); |
5826 EXPECT_FALSE(entry->GetHasPostData()); | 5826 EXPECT_FALSE(entry->GetHasPostData()); |
5827 EXPECT_EQ(-1, entry->GetPostID()); | 5827 EXPECT_EQ(-1, entry->GetPostID()); |
5828 } | 5828 } |
5829 | 5829 |
5830 // Submit the form. | 5830 // Submit the form. |
5831 TestNavigationObserver observer(shell()->web_contents(), 1); | 5831 TestNavigationObserver observer(shell()->web_contents(), 1); |
5832 EXPECT_TRUE(ExecuteScript( | 5832 ExecuteUnmodifiedScript(shell(), "submitForm('isubmit')"); |
5833 shell(), "window.domAutomationController.send(submitForm('isubmit'))")); | |
5834 observer.Wait(); | 5833 observer.Wait(); |
5835 | 5834 |
5836 EXPECT_EQ(2, controller.GetEntryCount()); | 5835 EXPECT_EQ(2, controller.GetEntryCount()); |
5837 { | 5836 { |
5838 NavigationEntryImpl* entry = controller.GetLastCommittedEntry(); | 5837 NavigationEntryImpl* entry = controller.GetLastCommittedEntry(); |
5839 FrameNavigationEntry* root_entry = entry->GetFrameEntry(root); | 5838 FrameNavigationEntry* root_entry = entry->GetFrameEntry(root); |
5840 FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame); | 5839 FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame); |
5841 EXPECT_NE(nullptr, root_entry); | 5840 EXPECT_NE(nullptr, root_entry); |
5842 EXPECT_NE(nullptr, frame_entry); | 5841 EXPECT_NE(nullptr, frame_entry); |
5843 EXPECT_EQ("GET", root_entry->method()); | 5842 EXPECT_EQ("GET", root_entry->method()); |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6864 EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); | 6863 EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); |
6865 EXPECT_FALSE( | 6864 EXPECT_FALSE( |
6866 controller.GetLastCommittedEntry()->GetURL().SchemeIs(url::kDataScheme)); | 6865 controller.GetLastCommittedEntry()->GetURL().SchemeIs(url::kDataScheme)); |
6867 EXPECT_EQ(redirect_to_unsafe_url, | 6866 EXPECT_EQ(redirect_to_unsafe_url, |
6868 controller.GetLastCommittedEntry()->GetVirtualURL()); | 6867 controller.GetLastCommittedEntry()->GetVirtualURL()); |
6869 EXPECT_EQ(url::kAboutBlankURL, | 6868 EXPECT_EQ(url::kAboutBlankURL, |
6870 controller.GetLastCommittedEntry()->GetURL().spec()); | 6869 controller.GetLastCommittedEntry()->GetURL().spec()); |
6871 } | 6870 } |
6872 | 6871 |
6873 } // namespace content | 6872 } // namespace content |
OLD | NEW |