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

Issue 2734963004: Refactor Assert[No]CookieExists to return a boolean (Closed)

Created:
3 years, 9 months ago by liaoyuke
Modified:
3 years, 9 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor Assert[No]CookieExists to return a boolean Instead of asserting inside helper functions, this CL refactors Assert[NO]CookieExists functions to return a boolean value and have the test asserts explicitly. This not only makes the intention of the functions more clear but also allows more flexible handling of the error, such as wrap it inside a wait condition or customize error message etc. BUG=693580 Review-Url: https://codereview.chromium.org/2734963004 Cr-Commit-Position: refs/heads/master@{#456868} Committed: https://chromium.googlesource.com/chromium/src/+/e5dbb7a7fe2cf1b9086f1f7a88082e998705086f

Patch Set 1 : Refactor Assert[No]CookieExists to return a boolean #

Total comments: 4

Patch Set 2 : Addressed feedback #

Total comments: 10

Patch Set 3 : Move cookie helpers to a shared location #

Total comments: 10

Patch Set 4 : Addressed comments #

Patch Set 5 : Update comments #

Total comments: 18

Patch Set 6 : Eugene's comments #

Total comments: 4

Patch Set 7 : Addressed comments #

Patch Set 8 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -111 lines) Patch
M ios/chrome/browser/net/cookies_egtest.mm View 1 2 3 4 5 9 chunks +77 lines, -73 lines 0 comments Download
M ios/chrome/browser/ui/settings/settings_egtest.mm View 1 2 3 4 5 7 chunks +21 lines, -38 lines 0 comments Download
M ios/chrome/test/earl_grey/chrome_earl_grey.h View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M ios/chrome/test/earl_grey/chrome_earl_grey.mm View 1 2 3 4 5 6 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
liaoyuke
Hey Mike, Please take a look. Thank you very much!
3 years, 9 months ago (2017-03-08 01:42:20 UTC) #3
baxley
I just have one regex question. I'm happy with the naming and structure of these ...
3 years, 9 months ago (2017-03-08 16:20:50 UTC) #4
liaoyuke
PTAL. Thanks! https://codereview.chromium.org/2734963004/diff/20001/ios/chrome/browser/ui/settings/settings_egtest.mm File ios/chrome/browser/ui/settings/settings_egtest.mm (right): https://codereview.chromium.org/2734963004/diff/20001/ios/chrome/browser/ui/settings/settings_egtest.mm#newcode180 ios/chrome/browser/ui/settings/settings_egtest.mm:180: // Returns true if |cookie| is the ...
3 years, 9 months ago (2017-03-08 21:27:26 UTC) #6
liaoyuke
PTAL. Thanks!
3 years, 9 months ago (2017-03-10 21:28:37 UTC) #7
baxley
A few naming and comment nits, but overall seems fine. Once addressed, LGTM (you'll need ...
3 years, 9 months ago (2017-03-10 21:58:17 UTC) #8
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2734963004/diff/60001/ios/chrome/browser/ui/settings/settings_egtest.mm File ios/chrome/browser/ui/settings/settings_egtest.mm (right): https://codereview.chromium.org/2734963004/diff/60001/ios/chrome/browser/ui/settings/settings_egtest.mm#newcode168 ios/chrome/browser/ui/settings/settings_egtest.mm:168: // Returns true if ...
3 years, 9 months ago (2017-03-13 16:12:50 UTC) #10
baxley
I think the overall approach is good. I have a few questions about the number ...
3 years, 9 months ago (2017-03-13 21:29:04 UTC) #11
liaoyuke
Hey Eugene, Please take a look for owner's approval. Thanks, Yuke https://codereview.chromium.org/2734963004/diff/100001/ios/chrome/browser/net/cookies_egtest.mm File ios/chrome/browser/net/cookies_egtest.mm (right): ...
3 years, 9 months ago (2017-03-13 22:50:40 UTC) #13
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2734963004/diff/140001/ios/chrome/browser/ui/settings/settings_egtest.mm File ios/chrome/browser/ui/settings/settings_egtest.mm (right): https://codereview.chromium.org/2734963004/diff/140001/ios/chrome/browser/ui/settings/settings_egtest.mm#newcode65 ios/chrome/browser/ui/settings/settings_egtest.mm:65: NSString* const kCookieKey = @"key"; s/kCookieKey/kCookieName and s/key/name https://codereview.chromium.org/2734963004/diff/140001/ios/chrome/browser/ui/settings/settings_egtest.mm#newcode649 ...
3 years, 9 months ago (2017-03-14 00:43:39 UTC) #14
liaoyuke
PTAL. Thank you very much! https://codereview.chromium.org/2734963004/diff/140001/ios/chrome/browser/ui/settings/settings_egtest.mm File ios/chrome/browser/ui/settings/settings_egtest.mm (right): https://codereview.chromium.org/2734963004/diff/140001/ios/chrome/browser/ui/settings/settings_egtest.mm#newcode65 ios/chrome/browser/ui/settings/settings_egtest.mm:65: NSString* const kCookieKey = ...
3 years, 9 months ago (2017-03-14 17:04:40 UTC) #15
Eugene But (OOO till 7-30)
lgtm with changes to the script https://codereview.chromium.org/2734963004/diff/160001/ios/chrome/test/earl_grey/chrome_earl_grey.mm File ios/chrome/test/earl_grey/chrome_earl_grey.mm (right): https://codereview.chromium.org/2734963004/diff/160001/ios/chrome/test/earl_grey/chrome_earl_grey.mm#newcode74 ios/chrome/test/earl_grey/chrome_earl_grey.mm:74: @"(function getCookies() {" ...
3 years, 9 months ago (2017-03-14 17:32:02 UTC) #16
liaoyuke
https://codereview.chromium.org/2734963004/diff/160001/ios/chrome/test/earl_grey/chrome_earl_grey.mm File ios/chrome/test/earl_grey/chrome_earl_grey.mm (right): https://codereview.chromium.org/2734963004/diff/160001/ios/chrome/test/earl_grey/chrome_earl_grey.mm#newcode74 ios/chrome/test/earl_grey/chrome_earl_grey.mm:74: @"(function getCookies() {" On 2017/03/14 17:32:02, Eugene But wrote: ...
3 years, 9 months ago (2017-03-14 20:08:55 UTC) #18
liaoyuke
Thank you very much for reviewing!
3 years, 9 months ago (2017-03-14 20:09:19 UTC) #20
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/2734963004/200001
3 years, 9 months ago (2017-03-14 22:31:22 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 22:37:32 UTC) #30
Message was sent while issue was closed.
Committed patchset #8 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/e5dbb7a7fe2cf1b9086f1f7a8808...

Powered by Google App Engine
This is Rietveld 408576698