Re-fixed bug #66469
Fixed previous commit may delete unwanted cookies. Sync tests from upper branches.
Fixed previous commit may delete unwanted cookies.