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

Unified Diff: ios/chrome/browser/web/browsing_egtest.mm

Issue 2806743004: Fixing testBrowsingPostEntryWithButton flakiness. (Closed)
Patch Set: Re-factoring to use helper methods Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/web/forms_egtest.mm » ('j') | ios/chrome/browser/web/forms_egtest.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/browsing_egtest.mm
diff --git a/ios/chrome/browser/web/browsing_egtest.mm b/ios/chrome/browser/web/browsing_egtest.mm
index b66f036e6a4770b9103704ad970a07a2c9ad2c4a..a3613507e3b4f48b20f1138dd443c18850150cf4 100644
--- a/ios/chrome/browser/web/browsing_egtest.mm
+++ b/ios/chrome/browser/web/browsing_egtest.mm
@@ -354,34 +354,6 @@ - (void)testBrowsingWindowDataLinkScriptRedirect {
assertWithMatcher:grey_notNil()];
}
-// Tests that pressing the button on a POST-based form changes the page and that
-// the back button works as expected afterwards.
-- (void)testBrowsingPostEntryWithButton {
- // Create map of canned responses and set up the test HTML server.
- std::map<GURL, std::string> responses;
- const GURL URL = web::test::HttpServer::MakeUrl("http://postEntryWithButton");
- const GURL destinationURL = web::test::HttpServer::MakeUrl("http://foo");
- // This is a page with a button that posts to the destination.
- responses[URL] = base::StringPrintf(
- "<form action='%s' method='post'>"
- "<input value='button' type='submit' id='button'></form>",
- destinationURL.spec().c_str());
- // This is the page that should be showing at the end of the test.
- responses[destinationURL] = "bar!";
- web::test::SetUpSimpleHttpServer(responses);
-
- [ChromeEarlGrey loadURL:URL];
- chrome_test_util::TapWebViewElementWithId("button");
-
- [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())]
- assertWithMatcher:grey_notNil()];
-
- // Go back and verify the browser navigates to the original URL.
- [self goBack];
- [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())]
- assertWithMatcher:grey_notNil()];
-}
-
// Tests that a link with a JavaScript-based navigation changes the page and
// that the back button works as expected afterwards.
- (void)testBrowsingJavaScriptBasedNavigation {
« no previous file with comments | « no previous file | ios/chrome/browser/web/forms_egtest.mm » ('j') | ios/chrome/browser/web/forms_egtest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698