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

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)

Created:
3 years, 8 months ago by baxley
Modified:
3 years, 6 months ago
CC:
chromium-reviews, Eugene But (OOO till 7-30), ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, pkl (ping after 24h if needed), browser-components-watch_chromium.org, liaoyuke+watch_chromium.org, mathp+autofillwatch_chromium.org, marq+watch_chromium.org, noyau+watch_chromium.org, asvitkine+watch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, huangml+watch_chromium.org, ios-reviews+web_chromium.org, baxley+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create ChromeEarlGrey waitForWebViewContainingText. Matchers should not wait, so this is a replacement. This replaces most uses of chrome_test_util::WebViewContainingText. There are a few left over that are dependent upon having a method that waits for the absence of a test. BUG=707009 Review-Url: https://codereview.chromium.org/2798773002 Cr-Commit-Position: refs/heads/master@{#478687} Committed: https://chromium.googlesource.com/chromium/src/+/ee4557b858b9b19eeab13da386f15e31e27718e6

Patch Set 1 #

Patch Set 2 : fix all of them #

Patch Set 3 : distiller workaround #

Patch Set 4 : rebase #

Patch Set 5 : diff #

Patch Set 6 : try again #

Patch Set 7 : make tests pass #

Patch Set 8 : better formatting #

Total comments: 13

Patch Set 9 : back to std::string #

Patch Set 10 : clean up #

Patch Set 11 : revert formatting to original cl #

Patch Set 12 : more cleanup #

Total comments: 10

Patch Set 13 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -486 lines) Patch
M ios/chrome/browser/autofill/form_input_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -4 lines 0 comments Download
M ios/chrome/browser/context_menu/context_menu_egtest.mm View 1 2 3 4 5 6 7 8 2 chunks +1 line, -4 lines 0 comments Download
M ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm View 1 2 3 4 5 6 7 8 14 chunks +16 lines, -50 lines 0 comments Download
M ios/chrome/browser/translate/translate_egtest.mm View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -9 lines 0 comments Download
M ios/chrome/browser/ui/browser_view_controller_egtest.mm View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -8 lines 0 comments Download
M ios/chrome/browser/ui/dialogs/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +26 lines, -26 lines 0 comments Download
M ios/chrome/browser/ui/external_url_error_page_egtest.mm View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -5 lines 0 comments Download
M ios/chrome/browser/ui/find_bar/find_in_page_egtest.mm View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -5 lines 0 comments Download
M ios/chrome/browser/ui/fullscreen_egtest.mm View 1 2 3 4 5 6 7 8 8 chunks +8 lines, -17 lines 0 comments Download
M ios/chrome/browser/ui/history/history_ui_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +5 lines, -11 lines 0 comments Download
M ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_controller_egtest.mm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -4 lines 0 comments Download
M ios/chrome/browser/ui/print/print_controller_egtest.mm View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -9 lines 0 comments Download
M ios/chrome/browser/ui/reading_list/reading_list_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +19 lines, -20 lines 0 comments Download
M ios/chrome/browser/ui/settings/settings_egtest.mm View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -12 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_egtest.mm View 1 2 3 4 5 6 7 8 2 chunks +1 line, -3 lines 0 comments Download
M ios/chrome/browser/ui/webui/web_ui_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +9 lines, -16 lines 0 comments Download
M ios/chrome/browser/web/browsing_egtest.mm View 1 2 3 4 5 6 7 8 9 10 5 chunks +7 lines, -17 lines 0 comments Download
M ios/chrome/browser/web/browsing_prevent_default_egtest.mm View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -24 lines 0 comments Download
M ios/chrome/browser/web/cache_egtest.mm View 1 2 3 4 5 6 7 8 5 chunks +14 lines, -38 lines 0 comments Download
M ios/chrome/browser/web/child_window_open_by_dom_egtest.mm View 1 2 3 4 5 6 7 8 9 8 chunks +17 lines, -35 lines 0 comments Download
M ios/chrome/browser/web/http_auth_egtest.mm View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -3 lines 0 comments Download
M ios/chrome/browser/web/navigation_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +22 lines, -40 lines 0 comments Download
M ios/chrome/browser/web/progress_indicator_egtest.mm View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -8 lines 0 comments Download
M ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -17 lines 0 comments Download
M ios/chrome/browser/web/stop_loading_egtest.mm View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -3 lines 0 comments Download
M ios/chrome/browser/web/visible_url_egtest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 16 chunks +15 lines, -31 lines 0 comments Download
M ios/chrome/browser/web/window_open_by_dom_egtest.mm View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -5 lines 0 comments Download
M ios/chrome/test/earl_grey/chrome_earl_grey.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M ios/chrome/test/earl_grey/chrome_earl_grey.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -0 lines 0 comments Download
M ios/chrome/test/earl_grey/device_check_egtest.mm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M ios/web/public/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A ios/web/public/test/web_view_content_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +20 lines, -0 lines 0 comments Download
A ios/web/public/test/web_view_content_test_util.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +32 lines, -0 lines 0 comments Download
M ios/web/shell/test/context_menu_egtest.mm View 1 2 3 4 5 6 7 8 9 5 chunks +4 lines, -9 lines 0 comments Download
M ios/web/shell/test/earl_grey/shell_earl_grey.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M ios/web/shell/test/earl_grey/shell_earl_grey.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -0 lines 0 comments Download
M ios/web/shell/test/earl_grey/web_shell_test_case.mm View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ios/web/shell/test/meta_tags_egtest.mm View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -3 lines 0 comments Download
M ios/web/shell/test/navigation_egtest.mm View 1 2 3 4 5 6 7 8 9 5 chunks +8 lines, -17 lines 0 comments Download
M ios/web/shell/test/plugin_placeholder_egtest.mm View 1 2 3 4 5 6 7 8 9 8 chunks +9 lines, -19 lines 0 comments Download
M ios/web/shell/test/redirect_egtest.mm View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
baxley
If you don't have time, we can wait a week on this. Please look at ...
3 years, 8 months ago (2017-04-21 18:13:53 UTC) #3
Eugene But (OOO till 7-30)
Thank you for doing this! https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm File ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm (right): https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm#newcode167 ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm:167: NSString* URL = base::SysUTF8ToNSString( ...
3 years, 8 months ago (2017-04-21 18:49:21 UTC) #4
baxley
A few follow up questions on some of the comments... https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm File ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm (right): https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm#newcode170 ...
3 years, 8 months ago (2017-04-21 20:09:01 UTC) #5
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/test/earl_grey/chrome_earl_grey.h File ios/chrome/test/earl_grey/chrome_earl_grey.h (right): https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/test/earl_grey/chrome_earl_grey.h#newcode85 ios/chrome/test/earl_grey/chrome_earl_grey.h:85: + (void)waitForWebViewContainingText:(NSString*)text; On 2017/04/21 20:09:01, baxley wrote: > On ...
3 years, 8 months ago (2017-04-21 21:37:46 UTC) #6
baxley
Thanks for the comments. https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/test/earl_grey/chrome_earl_grey.h File ios/chrome/test/earl_grey/chrome_earl_grey.h (right): https://codereview.chromium.org/2798773002/diff/140001/ios/chrome/test/earl_grey/chrome_earl_grey.h#newcode85 ios/chrome/test/earl_grey/chrome_earl_grey.h:85: + (void)waitForWebViewContainingText:(NSString*)text; On 2017/04/21 21:37:45, ...
3 years, 8 months ago (2017-04-21 22:41:58 UTC) #7
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2798773002/diff/140001/ios/web/public/test/web_view_content_test_util.h File ios/web/public/test/web_view_content_test_util.h (right): https://codereview.chromium.org/2798773002/diff/140001/ios/web/public/test/web_view_content_test_util.h#newcode14 ios/web/public/test/web_view_content_test_util.h:14: // Otherwise, returns false. On 2017/04/21 22:41:58, baxley wrote: ...
3 years, 8 months ago (2017-04-21 22:46:15 UTC) #8
baxley
I finally got back to cleaning this up! Unfortunately, it's probably easiest to review it ...
3 years, 6 months ago (2017-06-09 20:30:16 UTC) #9
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2798773002/diff/200002/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm File ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm (right): https://codereview.chromium.org/2798773002/diff/200002/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm#newcode321 ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm:321: [ChromeEarlGrey waitForWebViewContainingText:""]; nit: s/""std::string() https://codereview.chromium.org/2798773002/diff/200002/ios/chrome/browser/ui/history/history_ui_egtest.mm File ios/chrome/browser/ui/history/history_ui_egtest.mm (right): ...
3 years, 6 months ago (2017-06-12 03:47:12 UTC) #10
baxley
Comments addressed. Thanks for the thorough review! https://codereview.chromium.org/2798773002/diff/200002/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm File ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm (right): https://codereview.chromium.org/2798773002/diff/200002/ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm#newcode321 ios/chrome/browser/ui/dialogs/javascript_dialog_egtest.mm:321: [ChromeEarlGrey waitForWebViewContainingText:""]; ...
3 years, 6 months ago (2017-06-12 16:41:18 UTC) #11
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/2798773002/230001
3 years, 6 months ago (2017-06-12 16:42:45 UTC) #15
commit-bot: I haz the power
3 years, 6 months ago (2017-06-12 18:22:13 UTC) #18
Message was sent while issue was closed.
Committed patchset #13 (id:230001) as
https://chromium.googlesource.com/chromium/src/+/ee4557b858b9b19eeab13da386f1...

Powered by Google App Engine
This is Rietveld 408576698