| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import <XCTest/XCTest.h> | 5 #import <XCTest/XCTest.h> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 | 625 |
| 626 // Reenable synchronization now that the keyboard has been closed. | 626 // Reenable synchronization now that the keyboard has been closed. |
| 627 [[GREYConfiguration sharedInstance] | 627 [[GREYConfiguration sharedInstance] |
| 628 setValue:@YES | 628 setValue:@YES |
| 629 forConfigKey:kGREYConfigKeySynchronizationEnabled]; | 629 forConfigKey:kGREYConfigKeySynchronizationEnabled]; |
| 630 } | 630 } |
| 631 | 631 |
| 632 // Tests that submitting a POST-based form by tapping the 'Go' button on the | 632 // Tests that submitting a POST-based form by tapping the 'Go' button on the |
| 633 // keyboard navigates to the correct URL and the back button works as expected | 633 // keyboard navigates to the correct URL and the back button works as expected |
| 634 // afterwards. | 634 // afterwards. |
| 635 - (void)testBrowsingPostEntryWithKeyboard { | 635 // TODO(crbug.com/704618): Re-enable this test when the flake is fixed. |
| 636 - (void)FLAKY_testBrowsingPostEntryWithKeyboard { |
| 636 // Create map of canned responses and set up the test HTML server. | 637 // Create map of canned responses and set up the test HTML server. |
| 637 std::map<GURL, std::string> responses; | 638 std::map<GURL, std::string> responses; |
| 638 const GURL URL = | 639 const GURL URL = |
| 639 web::test::HttpServer::MakeUrl("http://postEntryWithKeyboard"); | 640 web::test::HttpServer::MakeUrl("http://postEntryWithKeyboard"); |
| 640 const GURL destinationURL = web::test::HttpServer::MakeUrl("http://foo"); | 641 const GURL destinationURL = web::test::HttpServer::MakeUrl("http://foo"); |
| 641 // This is a page this an input text field and a button that posts to the | 642 // This is a page this an input text field and a button that posts to the |
| 642 // destination. | 643 // destination. |
| 643 responses[URL] = base::StringPrintf( | 644 responses[URL] = base::StringPrintf( |
| 644 "hello!" | 645 "hello!" |
| 645 "<form action='%s' method='post'>" | 646 "<form action='%s' method='post'>" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 661 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] | 662 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] |
| 662 assertWithMatcher:grey_notNil()]; | 663 assertWithMatcher:grey_notNil()]; |
| 663 | 664 |
| 664 // Go back and verify that the browser navigates to the original URL. | 665 // Go back and verify that the browser navigates to the original URL. |
| 665 [self goBack]; | 666 [self goBack]; |
| 666 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] | 667 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] |
| 667 assertWithMatcher:grey_notNil()]; | 668 assertWithMatcher:grey_notNil()]; |
| 668 } | 669 } |
| 669 | 670 |
| 670 @end | 671 @end |
| OLD | NEW |