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

Side by Side Diff: ios/web/public/test/web_view_interaction_test_util.h

Issue 2268863004: Add a return value to TapWebViewElementWithId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unecessary headers 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
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 "ios/web/public/web_state/web_state.h" 5 #import "ios/web/public/web_state/web_state.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 namespace web { 9 namespace web {
10 namespace test { 10 namespace test {
11 11
12 enum ElementAction { CLICK, FOCUS }; 12 enum ElementAction { CLICK, FOCUS };
Eugene But (OOO till 7-30) 2016/08/26 13:19:56 According to Chromium Style Guide these should be
jif-google 2016/08/26 13:30:34 Acknowledged.
gambard 2016/08/26 14:35:52 Done.
13 13
14 // Attempts to tap the element with |element_id| in the passed in |web_state| 14 // Returns whether the element with |element_id| in the passed |web_state| has
15 // using a JavaScript click() event. 15 // been tapped using a JavaScript click() event.
16 void TapWebViewElementWithId(web::WebState* web_state, 16 bool TapWebViewElementWithId(web::WebState* web_state,
17 const std::string& element_id); 17 const std::string& element_id);
18 18
19 // Attempts to run the Javascript action specified by |action| on |element_id| 19 // Returns whether the Javascript action specified by |action| run on
jif-google 2016/08/26 12:20:48 s/run/ran/
gambard 2016/08/26 14:35:52 Done.
20 // in the passed |web_state|. 20 // |element_id| in the passed |web_state|.
21 void RunActionOnWebViewElementWithId(web::WebState* web_state, 21 bool RunActionOnWebViewElementWithId(web::WebState* web_state,
Eugene But (OOO till 7-30) 2016/08/26 13:19:56 Do you see a potential of adding new actions? If y
jif-google 2016/08/26 13:30:34 And how about removing TapWebViewElementWithId?
baxley 2016/08/26 13:40:05 We're in progress of adding an API that will tap a
gambard 2016/08/26 14:35:52 Done.
Eugene But (OOO till 7-30) 2016/08/26 15:13:28 +1 for using RunActionOnWebViewElementWithId. We
Eugene But (OOO till 7-30) 2016/08/26 15:13:28 TapWebViewElementWithId seems more clear that RunA
baxley 2016/08/26 15:43:26 As discussed offline... chrome-urls don't have IDs
22 const std::string& element_id, 22 const std::string& element_id,
23 ElementAction action); 23 ElementAction action);
24 24
25 } // namespace test 25 } // namespace test
26 } // namespace web 26 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698