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

Side by Side Diff: ios/chrome/browser/context_menu/context_menu_egtest.mm

Issue 2632783002: Marked testContextMenuOpenInNewTabFromTallPage flaky on device. (Closed)
Patch Set: Created 3 years, 11 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 <EarlGrey/EarlGrey.h> 5 #import <EarlGrey/EarlGrey.h>
6 #import <UIKit/UIKit.h> 6 #import <UIKit/UIKit.h>
7 #import <XCTest/XCTest.h> 7 #import <XCTest/XCTest.h>
8 8
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "ios/chrome/browser/ui/ui_util.h" 10 #include "ios/chrome/browser/ui/ui_util.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Verify url and tab count. 167 // Verify url and tab count.
168 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( 168 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText(
169 destinationURL.GetContent())] 169 destinationURL.GetContent())]
170 assertWithMatcher:grey_notNil()]; 170 assertWithMatcher:grey_notNil()];
171 chrome_test_util::AssertMainTabCount(2U); 171 chrome_test_util::AssertMainTabCount(2U);
172 } 172 }
173 173
174 // Tests "Open in New Tab" on context menu on a link that requires scrolling 174 // Tests "Open in New Tab" on context menu on a link that requires scrolling
175 // on the page to verify that context menu can be properly triggered in the 175 // on the page to verify that context menu can be properly triggered in the
176 // current screen view. 176 // current screen view.
177 - (void)testContextMenuOpenInNewTabFromTallPage { 177 // TODO(crbug.com/681130): Re-enable this test on device.
178 #if TARGET_IPHONE_SIMULATOR
179 #define MAYBE_testContextMenuOpenInNewTabFromTallPage \
180 testContextMenuOpenInNewTabFromTallPage
181 #else
182 #define MAYBE_testContextMenuOpenInNewTabFromTallPage \
183 FLAKY_testContextMenuOpenInNewTabFromTallPage
184 #endif
185 - (void)MAYBE_testContextMenuOpenInNewTabFromTallPage {
178 // Set up test simple http server. 186 // Set up test simple http server.
179 std::map<GURL, std::string> responses; 187 std::map<GURL, std::string> responses;
180 GURL initialURL = 188 GURL initialURL =
181 web::test::HttpServer::MakeUrl("http://scenarioContextMenuOpenInNewTab"); 189 web::test::HttpServer::MakeUrl("http://scenarioContextMenuOpenInNewTab");
182 GURL destinationURL = web::test::HttpServer::MakeUrl("http://destination"); 190 GURL destinationURL = web::test::HttpServer::MakeUrl("http://destination");
183 191
184 // The initial page contains a link to the destination page that is below a 192 // The initial page contains a link to the destination page that is below a
185 // really tall div so that scrolling is required. 193 // really tall div so that scrolling is required.
186 responses[initialURL] = 194 responses[initialURL] =
187 "<div style='height:4000px'></div>" 195 "<div style='height:4000px'></div>"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 SelectTabAtIndexInCurrentMode(1U); 239 SelectTabAtIndexInCurrentMode(1U);
232 240
233 // Verify url and tab count. 241 // Verify url and tab count.
234 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( 242 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText(
235 destinationURL.GetContent())] 243 destinationURL.GetContent())]
236 assertWithMatcher:grey_notNil()]; 244 assertWithMatcher:grey_notNil()];
237 chrome_test_util::AssertMainTabCount(2U); 245 chrome_test_util::AssertMainTabCount(2U);
238 } 246 }
239 247
240 @end 248 @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