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

Unified Diff: ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm

Issue 2799513002: Update how longpress is done in testOpenLinkInNewTab. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
diff --git a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
index 87a3b6aa37706545665157ef1323f698457c04f6..2b9c166321316a4824071fec6530b2e9b2376b90 100644
--- a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
+++ b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
@@ -26,6 +26,7 @@
#include "ios/chrome/test/app/navigation_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h"
+#import "ios/chrome/test/earl_grey/chrome_actions.h"
#import "ios/chrome/test/earl_grey/chrome_assertions.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
@@ -841,9 +842,11 @@ void SelectTabUsingUI(NSString* title) {
NewMainTabWithURL(initialURL, "link");
int numberOfTabs = chrome_test_util::GetMainTabCount();
- [[EarlGrey
- selectElementWithMatcher:chrome_test_util::WebViewContainingText("link")]
- performAction:grey_longPress()];
+ id<GREYMatcher> webViewMatcher =
+ web::WebViewInWebState(chrome_test_util::GetCurrentWebState());
+ [[EarlGrey selectElementWithMatcher:webViewMatcher]
+ performAction:chrome_test_util::LongPressElementForContextMenu(
+ "link", true /* menu should appear */)];
[[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()]
performAction:grey_tap()];
« 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