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

Side by Side Diff: ios/chrome/browser/web/browsing_egtest.mm

Issue 2835563004: Disable flaky testBrowsingPostToSamePage on devices. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 assertWithMatcher:grey_notNil()]; 434 assertWithMatcher:grey_notNil()];
435 435
436 // Verify that no new tabs were open which could load chrome://version. 436 // Verify that no new tabs were open which could load chrome://version.
437 chrome_test_util::AssertMainTabCount(1U); 437 chrome_test_util::AssertMainTabCount(1U);
438 } 438 }
439 439
440 // Tests that pressing the button on a POST-based form with same-page action 440 // Tests that pressing the button on a POST-based form with same-page action
441 // does not change the page and that the back button works as expected 441 // does not change the page and that the back button works as expected
442 // afterwards. 442 // afterwards.
443 - (void)testBrowsingPostToSamePage { 443 - (void)testBrowsingPostToSamePage {
444 // TODO(crbug.com/714303): Re-enable this test on devices.
445 #if !TARGET_IPHONE_SIMULATOR
Eugene But (OOO till 7-30) 2017/04/21 22:49:25 We normally use MAYBE_ macro for disabling tests o
446 EARL_GREY_TEST_DISABLED(@"Test disabled on device.");
447 #endif
448
444 // Create map of canned responses and set up the test HTML server. 449 // Create map of canned responses and set up the test HTML server.
445 std::map<GURL, std::string> responses; 450 std::map<GURL, std::string> responses;
446 const GURL firstURL = web::test::HttpServer::MakeUrl("http://first"); 451 const GURL firstURL = web::test::HttpServer::MakeUrl("http://first");
447 const GURL formURL = web::test::HttpServer::MakeUrl("http://form"); 452 const GURL formURL = web::test::HttpServer::MakeUrl("http://form");
448 // This is just a page with some text. 453 // This is just a page with some text.
449 responses[firstURL] = "foo"; 454 responses[firstURL] = "foo";
450 // This is a page with at button that posts to the current URL. 455 // This is a page with at button that posts to the current URL.
451 responses[formURL] = 456 responses[formURL] =
452 "<form method='post'>" 457 "<form method='post'>"
453 "<input value='button' type='submit' id='button'></form>"; 458 "<input value='button' type='submit' id='button'></form>";
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698