]> Cypherpunks repositories - gostls13.git/commit
exp/cookiejar: make cookie sorting deterministic.
authorVolker Dobler <dr.volker.dobler@gmail.com>
Mon, 18 Feb 2013 00:27:41 +0000 (11:27 +1100)
committerNigel Tao <nigeltao@golang.org>
Mon, 18 Feb 2013 00:27:41 +0000 (11:27 +1100)
commit6bbd12f1767b2b606c2a25981a1e74c21d8c67ef
tree0d8fc769fc90c7b24248d79f0cc12a0837cc8a3e
parent556dd0bfbd52876933ef0454ca86f492c618f342
exp/cookiejar: make cookie sorting deterministic.

Re-enable TestUpdateAndDelete, TestExpiration, TestChromiumDomain and
TestChromiumDeletion on Windows.

Sorting of cookies with same path length and same creation
time is done by an additional seqNum field.
This makes the order in which cookies are returned in Cookies
deterministic, even if the system clock is manipulated or on
systems with a low-resolution clock.

The tests now use a synthetic time: This makes cookie testing
reliable in case of bogus system clocks and speeds up the
expiration tests.

R=nigeltao, alex.brainman, dave
CC=golang-dev
https://golang.org/cl/7323063
src/pkg/exp/cookiejar/jar.go
src/pkg/exp/cookiejar/jar_test.go