Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 2478803003: Remove DOMAutomationController::automation_id_ (Closed)
Patch Set: More of: Fixing issues caught by extra |expected_response| checks in ExecuteScript function. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698