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

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

Issue 2777463002: Make custom GREYAction methods Chromium C-Style. (Closed)
Patch Set: cleanup Created 3 years, 9 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
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 #ifndef IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_ 5 #ifndef IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_
6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_ 6 #define IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #import <EarlGrey/EarlGrey.h> 10 #import <EarlGrey/EarlGrey.h>
11 11
12 #import "ios/web/public/web_state/web_state.h" 12 #import "ios/web/public/web_state/web_state.h"
13 13
14 namespace web { 14 namespace web {
15 15
16 // Action wrapper that performs |action| on the webview of |state|. 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| 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| 18 // can't be located, or if it doesn't trigger a mousedown event on |element_id|
19 // inside the webview. 19 // inside the webview.
20 id<GREYAction> webViewVerifiedActionOnElement(WebState* state, 20 id<GREYAction> WebViewVerifiedActionOnElement(WebState* state,
Eugene But (OOO till 7-30) 2017/03/24 16:24:31 Do we need to prefix all actions with WebView? We
baxley 2017/03/24 16:48:07 Probably not. I have a bug I'm looking at to get r
21 id<GREYAction> action, 21 id<GREYAction> action,
22 const std::string& element_id); 22 const std::string& element_id);
23 23
24 // Executes a longpress on element |element_id| in the webview of 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 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 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. 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 28 // This action doesn't fail if the context menu isn't displayed; calling code
29 // should check for that separately with a matcher. 29 // should check for that separately with a matcher.
30 id<GREYAction> webViewLongPressElementForContextMenu( 30 id<GREYAction> WebViewLongPressElementForContextMenu(
31 WebState* state, 31 WebState* state,
32 const std::string& element_id, 32 const std::string& element_id,
33 bool triggers_context_menu); 33 bool triggers_context_menu);
34 34
35 // Taps on element |element_id| in the webview of |state|. 35 // Taps on element |element_id| in the webview of |state|.
36 id<GREYAction> webViewTapElement(WebState* state, 36 id<GREYAction> WebViewTapElement(WebState* state,
37 const std::string& element_id); 37 const std::string& element_id);
38 38
39 } // namespace web 39 } // namespace web
40 40
41 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_ 41 #endif // IOS_WEB_PUBLIC_TEST_EARL_GREY_WEB_VIEW_ACTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698