New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 700067 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug

Blocked on:
issue 627304
issue 707008
issue 707009
issue 714157
issue 739073



Sign in to add a comment

EarlGrey matchers should not wait

Project Member Reported by baxley@chromium.org, Mar 9 2017

Issue description

All GREYMatchers, should assert immediatly, rather than wait.

There are side-effects of matchers that wait, because they can be chined with other methods.

For example, if you assert grey_nil() on a matcher that waits, the matcher will wait until a timeout (which are several seconds, or more), and then fail to match it. This will then succeed with grey_nil, but the delay is not optimal.
 
Components: Test>iOS

Comment 2 by baxley@chromium.org, Mar 30 2017

Blockedon: 707009

Comment 3 by baxley@chromium.org, Mar 30 2017

Blockedon: 707008
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f5396b89be45513d1a2f9a97c4416be04b57a2e

commit 7f5396b89be45513d1a2f9a97c4416be04b57a2e
Author: baxley <baxley@chromium.org>
Date: Mon Apr 03 20:52:27 2017

Remove matcher to wait for static HTML view.

EarlGrey matchers should not wait. This adds a method
waitForStaticHTMLViewContainingText, which should be used instead.

BUG= 700067 

Review-Url: https://codereview.chromium.org/2784943002
Cr-Commit-Position: refs/heads/master@{#461529}

[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/browser/ui/activity_services/activity_service_controller_egtest.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/browser/ui/error_page_egtest.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/browser/ui/reading_list/reading_list_egtest.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/browser/ui/webui/web_ui_egtest.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/browser/web/navigation_egtest.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/app/BUILD.gn
[add] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/app/static_html_view_test_util.h
[add] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/app/static_html_view_test_util.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/earl_grey/chrome_earl_grey.h
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/earl_grey/chrome_earl_grey.mm
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/earl_grey/chrome_matchers.h
[modify] https://crrev.com/7f5396b89be45513d1a2f9a97c4416be04b57a2e/ios/chrome/test/earl_grey/chrome_matchers.mm

Comment 5 by baxley@chromium.org, Apr 21 2017

Blockedon: 714157
Blockedon: 739073
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59e7220112ad11b5d553528391157728ccf11b9b

commit 59e7220112ad11b5d553528391157728ccf11b9b
Author: Mike Baxley <baxley@chromium.org>
Date: Wed Aug 30 22:37:41 2017

Remove matcher that waits for CSS selector.

It is a bug for matchers to wait. Create two methods in ShellEarlGrey
that wait for a web view containing a CSS selector, and another one
that waits for the absense of the selector.

Bug:  700067 
Change-Id: I9c2a4672eb178a272276dfcd2c68b40109e1dac6
Reviewed-on: https://chromium-review.googlesource.com/644223
Commit-Queue: Mike Baxley <baxley@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498647}
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/public/test/earl_grey/web_view_matchers.h
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/public/test/earl_grey/web_view_matchers.mm
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/public/test/web_view_content_test_util.h
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/public/test/web_view_content_test_util.mm
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/shell/test/earl_grey/shell_earl_grey.h
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/shell/test/earl_grey/shell_earl_grey.mm
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/shell/test/earl_grey/shell_matchers.h
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/shell/test/earl_grey/shell_matchers.mm
[modify] https://crrev.com/59e7220112ad11b5d553528391157728ccf11b9b/ios/web/shell/test/plugin_placeholder_egtest.mm

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/038abf0dada230ec5f61c2197cdaee640d53ce76

commit 038abf0dada230ec5f61c2197cdaee640d53ce76
Author: Mike Baxley <baxley@chromium.org>
Date: Thu Aug 31 17:46:23 2017

Remove the matcher InterstitialContainingText.

This matcher that waits has been replaced by a ChromeEarlGrey
method that waits for the condition to become true. No more callsites
use this.

Bug:  700067 
Change-Id: I8ba9c2a922704ec4eb2701c07b9ada1fa17050d8
Reviewed-on: https://chromium-review.googlesource.com/644501
Commit-Queue: Mike Baxley <baxley@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498914}
[modify] https://crrev.com/038abf0dada230ec5f61c2197cdaee640d53ce76/ios/web/public/test/earl_grey/web_view_matchers.h
[modify] https://crrev.com/038abf0dada230ec5f61c2197cdaee640d53ce76/ios/web/public/test/earl_grey/web_view_matchers.mm

Blockedon: 627304
Status: Fixed (was: Assigned)

Sign in to add a comment