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 ExecuteScriptAsync(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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6978 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | | 6977 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | |
6979 ui::PAGE_TRANSITION_FORWARD_BACK | | 6978 ui::PAGE_TRANSITION_FORWARD_BACK | |
6980 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR))); | 6979 ui::PAGE_TRANSITION_FROM_ADDRESS_BAR))); |
6981 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( | 6980 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( |
6982 controller.GetEntryAtIndex(2)->GetTransitionType(), | 6981 controller.GetEntryAtIndex(2)->GetTransitionType(), |
6983 ui::PAGE_TRANSITION_LINK)); | 6982 ui::PAGE_TRANSITION_LINK)); |
6984 } | 6983 } |
6985 } | 6984 } |
6986 | 6985 |
6987 } // namespace content | 6986 } // namespace content |
OLD | NEW |