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

Issue 735598 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

chrome_test_util::AssertMainTabCount should be [ChromeEarlGrey waitForMainTabCount]

Project Member Reported by liaoyuke@chromium.org, Jun 21 2017

Issue description

chrome_test_util::AssertMainTabCount is a method that actually waits for the tab count to become an expected number. I'm not exactly sure why the wait was added at the first place, but if it waits, then it should be called waitForMainTabCount.
 
baxley@, let me know how you think about this before I start.
baxley@: PING
Sorry, I missed the question.

Yes, I think your understanding makes sense. Perhaps make a [ChromeEarlGrey waitForMainTabCount], which could call an underlying method chrome_test_util::GetMainTabCount (that does no waiting).
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 6 2017

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

commit 11d26503ec66bda5c19f3452435e59fd7f1863a6
Author: Yuke Liao <liaoyuke@chromium.org>
Date: Thu Jul 06 23:37:15 2017

Refactoring Assert[Main|Incognito]TabCount.

chrome_test_util::Assert[Main|Incognito]TabCount is a method that
actually waits for the tab count to become an expected number, and if
it waits, it should be named so to explicitly reflect the behavior.

This CL re-factors chrome_test_util::Assert[Main|Incognito]TabCount to
[ChromeEarlGrey waitFor[Main|Incognito]TabCount], and updates
corresponding callers.

Bug:  735598 
Change-Id: Id514aedab21e5c1dd51384b92a9ece17a3bdfd54
Reviewed-on: https://chromium-review.googlesource.com/559909
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Mike Baxley <baxley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484770}
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/context_menu/context_menu_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/metrics/tab_usage_recorder_test_util.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/find_bar/find_in_page_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/fullscreen_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/history/history_ui_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/infobars/infobar_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/sad_tab/sad_tab_view_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/settings/block_popups_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/ui/toolbar/toolbar_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/web/browsing_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/web/browsing_prevent_default_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/web/cache_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/web/child_window_open_by_dom_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/browser/web/window_open_by_dom_egtest.mm
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/test/earl_grey/chrome_earl_grey.h
[modify] https://crrev.com/11d26503ec66bda5c19f3452435e59fd7f1863a6/ios/chrome/test/earl_grey/chrome_earl_grey.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 7 2017

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

commit f88eb294b2d56872f60fd8b5484ab872432e5dae
Author: liaoyuke <liaoyuke@google.com>
Date: Fri Jul 07 19:08:31 2017

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 7 2017

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

commit 373224d730562bd0c90d4d17ccc38c9abd4953c0
Author: Yuke Liao <liaoyuke@chromium.org>
Date: Fri Jul 07 19:27:40 2017

Delete Assert[Main|Incognito]TabCount.

This CL deletes Assert[Main|Incognito]TabCount as they have been
replaced by [ChromeEarlGrey waitFor[Main|Incognito]TabCount].

Bug:  735598 
Change-Id: I43a2eece9e936ca9851a6fe9ccc3b1242e8fe8b0
Reviewed-on: https://chromium-review.googlesource.com/563100
Reviewed-by: Mike Baxley <baxley@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485008}
[modify] https://crrev.com/373224d730562bd0c90d4d17ccc38c9abd4953c0/ios/chrome/test/earl_grey/BUILD.gn
[delete] https://crrev.com/987b0d546a3b0cc49512a8f2b2fdfe1996c6f0db/ios/chrome/test/earl_grey/chrome_assertions.h
[delete] https://crrev.com/987b0d546a3b0cc49512a8f2b2fdfe1996c6f0db/ios/chrome/test/earl_grey/chrome_assertions.mm

Status: Fixed (was: Assigned)

Sign in to add a comment