|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by Eugene But (OOO till 7-30) Modified:
3 years, 11 months ago Reviewers:
marq (ping after 24h) CC:
chromium-reviews, cbentzel+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[ios] Do not use SetSynchronizedWithSystemStore in tests.
There are 2 ways how CookieStoreIOS() is created in production code:
- Synchronized with NSHTTPCookieStorage and without persistent_store
(via CookieStoreIOS::CreateCookieStore factory method).
- Not synchronized with NSHTTPCookieStorage and with persistent_store
(via CookieStoreIOS::CookieStoreIOS constructor).
Updated tests to test these 2 flows using 2 different test fixtures:
SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend.
With this new approach there is no need to call
|SetSynchronizedWithSystemStore| method and it can be safely removed in
a separate CL as it is not used in production code.
Also removed obsolete tests which tested synchronized store with backend:
- CookieStoreIOSWithBackend.Synchronizing
- CookieStoreIOSWithBackend.FlushOnCookieChanged
- CookieStoreIOSWithBackend.ManualFlush
BUG=676144
Committed: https://crrev.com/646ec2f38d767ac5ab60d2f443e3558061dbf2a0
Cr-Commit-Position: refs/heads/master@{#441034}
Patch Set 1 #
Total comments: 4
Messages
Total messages: 17 (10 generated)
Description was changed from ========== [ios] Do not use SetSynchronizedWithSystemStore in tests. There are 2 ways how CookieStoreIOS() is created in production code: - Synchronized with NSHTTPCookieStorage and without persistent_store (via CookieStoreIOS::CreateCookieStore factory method). - Not synchronized with NSHTTPCookieStorage and with persistent_store (via CookieStoreIOS::CookieStoreIOS constructor). Updated tests to test these 2 flows using 2 different test fixtures: SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend. With this new approach there is no need to call |SetSynchronizedWithSystemStore| method and it can be safely removed in a separate CL as it is not used in production code. Also removed obsolete tests which tested dynamic synchronization: - BUG=676144 ========== to ========== [ios] Do not use SetSynchronizedWithSystemStore in tests. There are 2 ways how CookieStoreIOS() is created in production code: - Synchronized with NSHTTPCookieStorage and without persistent_store (via CookieStoreIOS::CreateCookieStore factory method). - Not synchronized with NSHTTPCookieStorage and with persistent_store (via CookieStoreIOS::CookieStoreIOS constructor). Updated tests to test these 2 flows using 2 different test fixtures: SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend. With this new approach there is no need to call |SetSynchronizedWithSystemStore| method and it can be safely removed in a separate CL as it is not used in production code. Also removed obsolete tests which tested synchronized store with backend: - CookieStoreIOSWithBackend.Synchronizing - CookieStoreIOSWithBackend.FlushOnCookieChanged - CookieStoreIOSWithBackend.ManualFlush BUG=676144 ==========
eugenebut@chromium.org changed reviewers: + marq@chromium.org
https://codereview.chromium.org/2601973002/diff/1/ios/net/cookies/cookie_stor... File ios/net/cookies/cookie_store_ios_unittest.mm (right): https://codereview.chromium.org/2601973002/diff/1/ios/net/cookies/cookie_stor... ios/net/cookies/cookie_store_ios_unittest.mm:576: EXPECT_EQ(1U, cookies.size()); Synchronized CookieStoreIOS works differently if created without backend. Testing synchronized CookieStoreIOS with backend does not make any sense, because this configuration is not used in prod. However I'm not sure why callbacks now return different cookie set. Mark, do you think I should file bug for these tests or the change is expected? https://codereview.chromium.org/2601973002/diff/1/ios/net/cookies/cookie_stor... ios/net/cookies/cookie_store_ios_unittest.mm:608: EXPECT_EQ(2U, cookies.size()); Same change here https://codereview.chromium.org/2601973002/diff/1/ios/net/cookies/cookie_stor... ios/net/cookies/cookie_store_ios_unittest.mm:621: EXPECT_EQ(2U, cookies.size()); And here...
The CQ bit was checked by eugenebut@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Mark?
LGTM but see my note about the change in behavior. https://codereview.chromium.org/2601973002/diff/1/ios/net/cookies/cookie_stor... File ios/net/cookies/cookie_store_ios_unittest.mm (right): https://codereview.chromium.org/2601973002/diff/1/ios/net/cookies/cookie_stor... ios/net/cookies/cookie_store_ios_unittest.mm:576: EXPECT_EQ(1U, cookies.size()); On 2016/12/28 19:34:23, Eugene But wrote: > Synchronized CookieStoreIOS works differently if created without backend. > Testing synchronized CookieStoreIOS with backend does not make any sense, > because this configuration is not used in prod. However I'm not sure why > callbacks now return different cookie set. Mark, do you think I should file bug > for these tests or the change is expected? I don't know these interfaces well at all, so I would treat a change in behavior as a bug.
Thank you! Filed crbug.com/677662
The CQ bit was checked by eugenebut@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 1, "attempt_start_ts": 1483115811183470, "parent_rev":
"234fdf6bf737b9de54539ae575d86f4f2c597b82", "commit_rev":
"7165f229ddd009aed12de954fdb3e8b8a29d36e8"}
Message was sent while issue was closed.
Description was changed from ========== [ios] Do not use SetSynchronizedWithSystemStore in tests. There are 2 ways how CookieStoreIOS() is created in production code: - Synchronized with NSHTTPCookieStorage and without persistent_store (via CookieStoreIOS::CreateCookieStore factory method). - Not synchronized with NSHTTPCookieStorage and with persistent_store (via CookieStoreIOS::CookieStoreIOS constructor). Updated tests to test these 2 flows using 2 different test fixtures: SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend. With this new approach there is no need to call |SetSynchronizedWithSystemStore| method and it can be safely removed in a separate CL as it is not used in production code. Also removed obsolete tests which tested synchronized store with backend: - CookieStoreIOSWithBackend.Synchronizing - CookieStoreIOSWithBackend.FlushOnCookieChanged - CookieStoreIOSWithBackend.ManualFlush BUG=676144 ========== to ========== [ios] Do not use SetSynchronizedWithSystemStore in tests. There are 2 ways how CookieStoreIOS() is created in production code: - Synchronized with NSHTTPCookieStorage and without persistent_store (via CookieStoreIOS::CreateCookieStore factory method). - Not synchronized with NSHTTPCookieStorage and with persistent_store (via CookieStoreIOS::CookieStoreIOS constructor). Updated tests to test these 2 flows using 2 different test fixtures: SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend. With this new approach there is no need to call |SetSynchronizedWithSystemStore| method and it can be safely removed in a separate CL as it is not used in production code. Also removed obsolete tests which tested synchronized store with backend: - CookieStoreIOSWithBackend.Synchronizing - CookieStoreIOSWithBackend.FlushOnCookieChanged - CookieStoreIOSWithBackend.ManualFlush BUG=676144 Review-Url: https://codereview.chromium.org/2601973002 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== [ios] Do not use SetSynchronizedWithSystemStore in tests. There are 2 ways how CookieStoreIOS() is created in production code: - Synchronized with NSHTTPCookieStorage and without persistent_store (via CookieStoreIOS::CreateCookieStore factory method). - Not synchronized with NSHTTPCookieStorage and with persistent_store (via CookieStoreIOS::CookieStoreIOS constructor). Updated tests to test these 2 flows using 2 different test fixtures: SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend. With this new approach there is no need to call |SetSynchronizedWithSystemStore| method and it can be safely removed in a separate CL as it is not used in production code. Also removed obsolete tests which tested synchronized store with backend: - CookieStoreIOSWithBackend.Synchronizing - CookieStoreIOSWithBackend.FlushOnCookieChanged - CookieStoreIOSWithBackend.ManualFlush BUG=676144 Review-Url: https://codereview.chromium.org/2601973002 ========== to ========== [ios] Do not use SetSynchronizedWithSystemStore in tests. There are 2 ways how CookieStoreIOS() is created in production code: - Synchronized with NSHTTPCookieStorage and without persistent_store (via CookieStoreIOS::CreateCookieStore factory method). - Not synchronized with NSHTTPCookieStorage and with persistent_store (via CookieStoreIOS::CookieStoreIOS constructor). Updated tests to test these 2 flows using 2 different test fixtures: SynchronizedCookieStoreIOS and NotSynchronizedCookieStoreIOSWithBackend. With this new approach there is no need to call |SetSynchronizedWithSystemStore| method and it can be safely removed in a separate CL as it is not used in production code. Also removed obsolete tests which tested synchronized store with backend: - CookieStoreIOSWithBackend.Synchronizing - CookieStoreIOSWithBackend.FlushOnCookieChanged - CookieStoreIOSWithBackend.ManualFlush BUG=676144 Committed: https://crrev.com/646ec2f38d767ac5ab60d2f443e3558061dbf2a0 Cr-Commit-Position: refs/heads/master@{#441034} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/646ec2f38d767ac5ab60d2f443e3558061dbf2a0 Cr-Commit-Position: refs/heads/master@{#441034} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
