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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 | 597 |
598 // Reenable synchronization now that the keyboard has been closed. | 598 // Reenable synchronization now that the keyboard has been closed. |
599 [[GREYConfiguration sharedInstance] | 599 [[GREYConfiguration sharedInstance] |
600 setValue:@YES | 600 setValue:@YES |
601 forConfigKey:kGREYConfigKeySynchronizationEnabled]; | 601 forConfigKey:kGREYConfigKeySynchronizationEnabled]; |
602 } | 602 } |
603 | 603 |
604 // Tests that submitting a POST-based form by tapping the 'Go' button on the | 604 // Tests that submitting a POST-based form by tapping the 'Go' button on the |
605 // keyboard navigates to the correct URL and the back button works as expected | 605 // keyboard navigates to the correct URL and the back button works as expected |
606 // afterwards. | 606 // afterwards. |
607 // TODO(crbug.com/704618): Re-enable this test when the flake is fixed. | 607 // TODO(crbug.com/711108): Move test to forms_egtest.mm. |
608 - (void)FLAKY_testBrowsingPostEntryWithKeyboard { | 608 - (void)testBrowsingPostEntryWithKeyboard { |
609 // Create map of canned responses and set up the test HTML server. | 609 // Create map of canned responses and set up the test HTML server. |
610 std::map<GURL, std::string> responses; | 610 std::map<GURL, std::string> responses; |
611 const GURL URL = | 611 const GURL URL = |
612 web::test::HttpServer::MakeUrl("http://postEntryWithKeyboard"); | 612 web::test::HttpServer::MakeUrl("http://postEntryWithKeyboard"); |
613 const GURL destinationURL = web::test::HttpServer::MakeUrl("http://foo"); | 613 const GURL destinationURL = web::test::HttpServer::MakeUrl("http://foo"); |
614 // This is a page this an input text field and a button that posts to the | 614 // This is a page this an input text field and a button that posts to the |
615 // destination. | 615 // destination. |
616 responses[URL] = base::StringPrintf( | 616 responses[URL] = base::StringPrintf( |
617 "hello!" | 617 "hello!" |
618 "<form action='%s' method='post'>" | 618 "<form action='%s' method='post'>" |
(...skipping 19 matching lines...) Expand all Loading... |
638 | 638 |
639 // Go back and verify that the browser navigates to the original URL. | 639 // Go back and verify that the browser navigates to the original URL. |
640 [self goBack]; | 640 [self goBack]; |
641 [[EarlGrey selectElementWithMatcher:WebViewContainingText("hello!")] | 641 [[EarlGrey selectElementWithMatcher:WebViewContainingText("hello!")] |
642 assertWithMatcher:grey_notNil()]; | 642 assertWithMatcher:grey_notNil()]; |
643 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] | 643 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] |
644 assertWithMatcher:grey_notNil()]; | 644 assertWithMatcher:grey_notNil()]; |
645 } | 645 } |
646 | 646 |
647 @end | 647 @end |
OLD | NEW |