commit | f8cb27d6e3051319643aef24c79cd94db0b52aa1 | [log] [tgz] |
---|---|---|
author | Victor Costan <pwnall@chromium.org> | Wed Feb 21 09:16:23 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Feb 21 09:16:23 2018 |
tree | 552c2a723afb72d4b6d10b3a5403ba0e7b350c95 | |
parent | 83bd9378e8b4c62b9a2f2e360b610a77f950b21a [diff] |
Cookie Store: Revamp change observation tests. //net/cookies/cookie_store_unittest.h contains tests against the net::CookieStore interface, which is implemented by net::CookieMonster (in //net/cookies), android_webview::AwCookieStoreWrapper (in //android_webview/browser/net), and net::CookieStoreIOS and net::CookieStoreIOSPersistent (in //ios/net/cookies). Currently, the tests for net::CookieStore::AddCallbackForCookie() are in //net/cookies/cookie_monster_unittest.cc, so they are not run against the other net::CookieStore implementations. This is highly undesirable, as it opens up the possibility for bugs to creep into the other implementations. This CL takes the following steps to fix this situation: 1) Move AddCallbackForCookie() tests from cookie_monster_unittest.h to a new header file, cooie_store_change_unittest.h. 2) Move AddCallbackForAllChange() tests from cookie_store_unittest.h to to the same new new header file, cooie_store_change_unittest.h. 3) Harmonize test styles. 4) Sync the tests for AddCallbackForCookie() with the tests for AllCallbackForAllChanges(), so they have the same coverage. This results in new tests for both cases. 5) Add more tests covering the change filtering in AddCallbackForCookie(). 6) Fix the bugs uncovered by running the tests against AwCookieStoreWrapper. The iOS cookie store implementations will be fixed in a separate CL. Bug: 729800, 770269 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I10f0a24755a5858d2faa291ef6b855f43a880ec3 Reviewed-on: https://chromium-review.googlesource.com/925694 Reviewed-by: David Roger <droger@chromium.org> Reviewed-by: Randy Smith <rdsmith@chromium.org> Reviewed-by: Richard Coles <torne@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#538047}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .