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

Side by Side Diff: ios/web/public/test/earl_grey/web_view_actions.h

Issue 2275303004: Context menu egtests, plus related utilities. (Closed)
Patch Set: Fewer References. Created 4 years, 3 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 | « ios/web/BUILD.gn ('k') | ios/web/public/test/earl_grey/web_view_actions.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_
6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_
7
8 #include <string>
9
10 #import <EarlGrey/EarlGrey.h>
11
12 #import "ios/web/public/web_state/web_state.h"
13
14 namespace web {
15
16 // Action wrapper that performs |action| on the webview of |state|.
17 // The action will fail (in addition to its own failure modes) if |element_id|
18 // can't be located, or if it doesn't trigger a mousedown event on |element_id|
19 // inside the webview.
20 id<GREYAction> webViewVerifiedActionOnElement(WebState* state,
21 id<GREYAction> action,
22 const std::string& element_id);
23
24 // Executes a longpress on element |element_id| in the webview of
25 // |state|. If |triggers_context_menu| is true, this gesture is expected to
26 // cause the context menu to appear, and is not expected to trigger events
27 // in the webview. If |triggers_context_menu| is false, the converse is true.
28 // This action doesn't fail if the context menu isn't displayed; calling code
29 // should check for that separately with a matcher.
30 id<GREYAction> webViewLongPressElementForContextMenu(
31 WebState* state,
32 const std::string& element_id,
33 bool triggers_context_menu);
34
35 } // namespace web
36
37 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_
OLDNEW
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/public/test/earl_grey/web_view_actions.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698