|
|
Chromium Code Reviews|
Created:
4 years, 6 months ago by huangml1 Modified:
4 years, 6 months ago Reviewers:
Eugene But (OOO till 7-30) CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd an earlgrey test for
webScenarioBrowsingLinkPreventDefaultOverridesHref.
BUG=612901
Committed: https://crrev.com/31f1735e3e3b1f1d776bf9f3d0e2fb9cd164d81e
Cr-Commit-Position: refs/heads/master@{#401964}
Patch Set 1 #Patch Set 2 : Add a blank line. #
Total comments: 7
Patch Set 3 : Add a text marker. #
Total comments: 1
Patch Set 4 : Text marker #Messages
Total messages: 25 (14 generated)
Patchset #1 (id:1) has been deleted
Description was changed from ========== Add earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref BUG=612901 ========== to ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref BUG=612901 ==========
Description was changed from ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref BUG=612901 ========== to ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref BUG=612901 ==========
Description was changed from ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref BUG=612901 ========== to ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref. BUG=612901 ==========
huangml@chromium.org changed reviewers: + eugenebut@chromium.org
Hey Eugene, for tests about preventDefault(), do you think it's enough to check the url change only, or we should still check abut the tabs? PTAL, thanks! https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... File ios/web/shell/test/web_shell_navigation_egtest.mm (right): https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:160: [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())] I only checked no url change here for this test. Is it necessary to check the tab counts as well?
lgtm with suggestion https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... File ios/web/shell/test/web_shell_navigation_egtest.mm (right): https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:149: "<a href='#hash' id='overridesHref' " NIT: s/overridesHref/overrides-href Per JS Style Guide https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:150: "onclick='event.preventDefault()'>linkPreventDefaultOverridesHref</a>"; Maybe you should add something to the page (like text marker) and check if marker is present? This way you will make sure that navigation did not happen because of |preventDefault| and not because there was a bug in the test or so. https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:160: [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())] On 2016/06/23 22:21:39, huangml1 wrote: > I only checked no url change here for this test. Is it necessary to check the > tab counts as well? Well you can not check tab counts here. So maybe this test should be downstream? Alternatively we can have 2 tests one upstream (this one) and one downstream (with Tab count check). In any case I do see a value in landing this test as it is.
Patchset #3 (id:60001) has been deleted
Add a text marker to make sure the page is not redirected. https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... File ios/web/shell/test/web_shell_navigation_egtest.mm (right): https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:149: "<a href='#hash' id='overridesHref' " On 2016/06/23 22:31:50, Eugene But wrote: > NIT: s/overridesHref/overrides-href Per JS Style Guide Done. https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:150: "onclick='event.preventDefault()'>linkPreventDefaultOverridesHref</a>"; On 2016/06/23 22:31:50, Eugene But wrote: > Maybe you should add something to the page (like text marker) and check if > marker is present? This way you will make sure that navigation did not happen > because of |preventDefault| and not because there was a bug in the test or so. Done.
https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... File ios/web/shell/test/web_shell_navigation_egtest.mm (right): https://codereview.chromium.org/2094753004/diff/40001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:160: [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())] On 2016/06/23 22:31:50, Eugene But wrote: > On 2016/06/23 22:21:39, huangml1 wrote: > > I only checked no url change here for this test. Is it necessary to check the > > tab counts as well? > Well you can not check tab counts here. So maybe this test should be downstream? > Alternatively we can have 2 tests one upstream (this one) and one downstream > (with Tab count check). In any case I do see a value in landing this test as it > is. So this does not really protect from the broken test. Imagine that there is a typo in preventDefault() and it throws an exception. This test will pass and will keep passing even if there will be a bug in software. My proposal was to add something to the page and make sure that added thing is there. https://codereview.chromium.org/2094753004/diff/80001/ios/web/shell/test/web_... File ios/web/shell/test/web_shell_navigation_egtest.mm (right): https://codereview.chromium.org/2094753004/diff/80001/ios/web/shell/test/web_... ios/web/shell/test/web_shell_navigation_egtest.mm:16: #include "ios/web/shell/test/app/web_view_interaction_test_util.h" Sorry, missed this: s/include/import
The CQ bit was checked by huangml@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from eugenebut@chromium.org Link to the patchset: https://codereview.chromium.org/2094753004/#ps100001 (title: "Text marker")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2094753004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by huangml@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2094753004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by huangml@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref. BUG=612901 ========== to ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref. BUG=612901 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref. BUG=612901 ========== to ========== Add an earlgrey test for webScenarioBrowsingLinkPreventDefaultOverridesHref. BUG=612901 Committed: https://crrev.com/31f1735e3e3b1f1d776bf9f3d0e2fb9cd164d81e Cr-Commit-Position: refs/heads/master@{#401964} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/31f1735e3e3b1f1d776bf9f3d0e2fb9cd164d81e Cr-Commit-Position: refs/heads/master@{#401964} |
