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

Issue 2268863004: Add a return value to TapWebViewElementWithId (Closed)

Created:
4 years, 4 months ago by gambard
Modified:
4 years, 3 months ago
CC:
chromium-reviews, cmasso1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a return value to TapWebViewElementWithId This CL adds a a return value representing whether the element was found to the TapWebViewElementWithId method. BUG=none Committed: https://crrev.com/95efccaac7e29e98bd6699f6d1288c0df694ee58 Cr-Commit-Position: refs/heads/master@{#414720}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Revision #

Patch Set 3 : Rebase #

Patch Set 4 : Remove unecessary headers #

Total comments: 18

Patch Set 5 : Revision #

Patch Set 6 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -24 lines) Patch
M ios/web/public/test/web_view_interaction_test_util.h View 1 2 3 4 1 chunk +7 lines, -10 lines 0 comments Download
M ios/web/public/test/web_view_interaction_test_util.mm View 1 2 3 4 5 1 chunk +36 lines, -14 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (17 generated)
gambard
PTAL.
4 years, 4 months ago (2016-08-23 07:49:18 UTC) #2
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2268863004/diff/1/ios/web/public/test/web_view_interaction_test_util.mm File ios/web/public/test/web_view_interaction_test_util.mm (right): https://codereview.chromium.org/2268863004/diff/1/ios/web/public/test/web_view_interaction_test_util.mm#newcode10 ios/web/public/test/web_view_interaction_test_util.mm:10: #include "base/strings/string_util.h" Toy don't need this, because there ...
4 years, 4 months ago (2016-08-23 15:22:44 UTC) #7
gambard
Thanks! https://codereview.chromium.org/2268863004/diff/1/ios/web/public/test/web_view_interaction_test_util.mm File ios/web/public/test/web_view_interaction_test_util.mm (right): https://codereview.chromium.org/2268863004/diff/1/ios/web/public/test/web_view_interaction_test_util.mm#newcode10 ios/web/public/test/web_view_interaction_test_util.mm:10: #include "base/strings/string_util.h" On 2016/08/23 15:22:43, Eugene But wrote: ...
4 years, 4 months ago (2016-08-24 07:08:50 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2268863004/20001
4 years, 4 months ago (2016-08-24 07:09:19 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/256666) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-08-24 07:12:08 UTC) #13
gambard
+jif to see if this is compatible with your changes.
4 years, 3 months ago (2016-08-26 12:04:06 UTC) #17
jif-google
lgtm with nit https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h File ios/web/public/test/web_view_interaction_test_util.h (right): https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h#newcode19 ios/web/public/test/web_view_interaction_test_util.h:19: // Returns whether the Javascript action ...
4 years, 3 months ago (2016-08-26 12:20:48 UTC) #19
Eugene But (OOO till 7-30)
I guess most comments addressed to jif@ :) https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h File ios/web/public/test/web_view_interaction_test_util.h (left): https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h#oldcode12 ios/web/public/test/web_view_interaction_test_util.h:12: enum ...
4 years, 3 months ago (2016-08-26 13:19:57 UTC) #22
jif-google
https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h File ios/web/public/test/web_view_interaction_test_util.h (left): https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h#oldcode12 ios/web/public/test/web_view_interaction_test_util.h:12: enum ElementAction { CLICK, FOCUS }; On 2016/08/26 13:19:56, ...
4 years, 3 months ago (2016-08-26 13:30:35 UTC) #23
baxley
responding to one question. CC cmasso@, who may add the method to tap a link. ...
4 years, 3 months ago (2016-08-26 13:40:05 UTC) #24
gambard
Ok I have removed the general function as I was not used downstream. PTAL https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h ...
4 years, 3 months ago (2016-08-26 14:35:52 UTC) #25
baxley
LGTM, Thanks!
4 years, 3 months ago (2016-08-26 14:55:09 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2268863004/100001
4 years, 3 months ago (2016-08-26 14:55:55 UTC) #29
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h File ios/web/public/test/web_view_interaction_test_util.h (right): https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web_view_interaction_test_util.h#newcode21 ios/web/public/test/web_view_interaction_test_util.h:21: bool RunActionOnWebViewElementWithId(web::WebState* web_state, On 2016/08/26 13:30:34, jif-google wrote: > ...
4 years, 3 months ago (2016-08-26 15:13:28 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-08-26 15:39:59 UTC) #31
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/95efccaac7e29e98bd6699f6d1288c0df694ee58 Cr-Commit-Position: refs/heads/master@{#414720}
4 years, 3 months ago (2016-08-26 15:42:10 UTC) #33
baxley
4 years, 3 months ago (2016-08-26 15:43:27 UTC) #34
Message was sent while issue was closed.
https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web...
File ios/web/public/test/web_view_interaction_test_util.h (right):

https://codereview.chromium.org/2268863004/diff/60001/ios/web/public/test/web...
ios/web/public/test/web_view_interaction_test_util.h:21: bool
RunActionOnWebViewElementWithId(web::WebState* web_state,
On 2016/08/26 15:13:28, Eugene But wrote:
> On 2016/08/26 13:40:05, baxley wrote:
> > On 2016/08/26 13:30:34, jif-google wrote:
> > > On 2016/08/26 13:19:56, Eugene But wrote:
> > > > Do you see a potential of adding new actions? If you can't think about
> more
> > > than
> > > > 3 actions then I believe that it is better to have a separate API for
each
> > > > action. Having both TapWebViewElementWithId and
> > > RunActionOnWebViewElementWithId
> > > > (which also allows clicks) seems inconsistent.
> > > 
> > > And how about removing TapWebViewElementWithId?
> > 
> > We're in progress of adding an API that will tap a webview element with link
> > text. I think it's more clear to not have RunActionOnWebViewElementWithId
> > exposed to the user.
> > 
> > Even if we have many APIs that use it, as long as the number of APIs is
bound,
> I
> > think it's more clear to have explicit methods for each action, rather than
> have
> > an open ended one. If we ever have a case (let me know if this is the case)
> > where we can't predict what other action types can be passed in, then I
think
> > it's okay to expose it.
> > 
> > I think it's good to have RunActionOnWebViewElementWithId to share
> > implementation across the APIs internally.
> +1 for using RunActionOnWebViewElementWithId.
> 
> We we really need API to tap on link with text? What if many links have the
same
> text? Is there a reason why having TapWebViewElementWithId is not sufficient?

As discussed offline... chrome-urls don't have IDs, so the only way to tap them
now is via href value. However, we concluded we should pursue adding IDs for the
chrome-urls. If there is pushback, or it will take a while, we can add a method
to tap link text as a short term workaround.

Powered by Google App Engine
This is Rietveld 408576698