Chromium Code Reviews| 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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/711108): Move test to forms_egtest.mm. | 607 // TODO(crbug.com/711108): Move test to forms_egtest.mm. |
| 608 - (void)testBrowsingPostEntryWithKeyboard { | 608 - (void)testBrowsingPostEntryWithKeyboard { |
| 609 // TODO(crbug.com/704618): Re-enable this test on devices. | |
| 610 #if !TARGET_IPHONE_SIMULATOR | |
|
Eugene But (OOO till 7-30)
2017/04/21 22:50:40
We use MAYBE_ macro for disabling tests on device
| |
| 611 EARL_GREY_TEST_DISABLED(@"Test disabled on device."); | |
| 612 #endif | |
| 613 | |
| 609 // Create map of canned responses and set up the test HTML server. | 614 // Create map of canned responses and set up the test HTML server. |
| 610 std::map<GURL, std::string> responses; | 615 std::map<GURL, std::string> responses; |
| 611 const GURL URL = | 616 const GURL URL = |
| 612 web::test::HttpServer::MakeUrl("http://postEntryWithKeyboard"); | 617 web::test::HttpServer::MakeUrl("http://postEntryWithKeyboard"); |
| 613 const GURL destinationURL = web::test::HttpServer::MakeUrl("http://foo"); | 618 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 | 619 // This is a page this an input text field and a button that posts to the |
| 615 // destination. | 620 // destination. |
| 616 responses[URL] = base::StringPrintf( | 621 responses[URL] = base::StringPrintf( |
| 617 "hello!" | 622 "hello!" |
| 618 "<form action='%s' method='post'>" | 623 "<form action='%s' method='post'>" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 638 | 643 |
| 639 // Go back and verify that the browser navigates to the original URL. | 644 // Go back and verify that the browser navigates to the original URL. |
| 640 [self goBack]; | 645 [self goBack]; |
| 641 [[EarlGrey selectElementWithMatcher:WebViewContainingText("hello!")] | 646 [[EarlGrey selectElementWithMatcher:WebViewContainingText("hello!")] |
| 642 assertWithMatcher:grey_notNil()]; | 647 assertWithMatcher:grey_notNil()]; |
| 643 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] | 648 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] |
| 644 assertWithMatcher:grey_notNil()]; | 649 assertWithMatcher:grey_notNil()]; |
| 645 } | 650 } |
| 646 | 651 |
| 647 @end | 652 @end |
| OLD | NEW |