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

Issue 657886 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 658858



Sign in to add a comment

Refactor wait_util for iOS

Project Member Reported by baxley@chromium.org, Oct 20 2016

Issue description

There is a wait util in base/test/ios that DCHECKS on timeout.
There is a wait util in ios/testing/earl_grey that issues a GREYAssertion on timeout.

The second is useful for EarlGrey tests. However, some test code that is independent of EarlGrey (test helpers that are framework-agnostic). These helpers need to implement their own code to wait.

It would be cleaner if the logic in ios/testing/earl_grey to spin until success or timeout, moved to a generic helper that returned boolean. There could be an earl_grey helper that calls this and issues a GREYAssert (or the callsite could just do this).
 

Comment 1 by baxley@chromium.org, Oct 24 2016

Blocking: 658858
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 26 2016

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

commit e598fd1fd26e086580ca81c0a7e682045dd58ffb
Author: baxley <baxley@chromium.org>
Date: Wed Oct 26 17:12:13 2016

Refactor wait_util so it isn't coupled to EarlGrey.

Create utility to wait for condition, else return false. This allows
test code not dependent upon EarlGrey to use wait_util. Also,
update web shell tests to use this utility.

BUG= 657886 

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

[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/testing/BUILD.gn
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/testing/earl_grey/BUILD.gn
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/testing/earl_grey/wait_util.h
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/testing/earl_grey/wait_util.mm
[add] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/testing/wait_util.h
[add] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/testing/wait_util.mm
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/BUILD.gn
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/public/test/earl_grey/js_test_util.mm
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/public/test/earl_grey/web_view_actions.mm
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/public/test/earl_grey/web_view_matchers.mm
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/public/test/web_view_interaction_test_util.h
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/public/test/web_view_interaction_test_util.mm
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/shell/test/BUILD.gn
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/shell/test/earl_grey/shell_matchers.mm
[modify] https://crrev.com/e598fd1fd26e086580ca81c0a7e682045dd58ffb/ios/web/shell/test/pdf_egtest.mm

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/0e57f63bebff6cda38fb049b47b96eb21a4ba05f

commit 0e57f63bebff6cda38fb049b47b96eb21a4ba05f
Author: baxley <baxley@google.com>
Date: Wed Oct 26 19:21:43 2016

Status: Fixed (was: Started)
Main refactor is done. Filed crbug.com/661229 to track improving this further.

Sign in to add a comment