Bug 1407695 - Allows cookie 'expiry' to be optional; r=ato
☠☠ backed out by 48aa910c888f ☠ ☠
authorØyvind Strømmen <insula.ventus@gmail.com>
Mon, 23 Oct 2017 22:23:10 +0200
changeset 685756 d5d1935726bbca66eba72670ffc461d444455519
parent 685755 f5b8efb37541dc9e6bb764734522d456e10a4d71
child 685757 cd2147b5bc3d7fe3fa403eefe815cf43b357eb35
push id86016
push userkgupta@mozilla.com
push dateWed, 25 Oct 2017 01:53:44 +0000
reviewersato
bugs1407695
milestone58.0a1
Bug 1407695 - Allows cookie 'expiry' to be optional; r=ato When getting a session cookie we expect 'expiry' to be either null, or to be missing. MozReview-Commit-ID: Qvq0c0GiSO
testing/web-platform/tests/webdriver/tests/cookies/get_named_cookie.py
--- a/testing/web-platform/tests/webdriver/tests/cookies/get_named_cookie.py
+++ b/testing/web-platform/tests/webdriver/tests/cookies/get_named_cookie.py
@@ -1,12 +1,12 @@
 from tests.support.inline import inline
 from tests.support.fixtures import clear_all_cookies
 
-def test_get_named_cookie(session, url):
+def test_get_named_session_cookie(session, url):
     session.url = url("/common/blank.html")
     clear_all_cookies(session)
     session.execute_script("document.cookie = 'foo=bar'")
 
     result = session.transport.send("GET", "session/%s/cookie/foo" % session.session_id)
     assert result.status == 200
     assert isinstance(result.body["value"], dict)
 
@@ -21,17 +21,17 @@ def test_get_named_cookie(session, url):
     assert isinstance(cookie["path"], basestring)
     assert "domain" in cookie
     assert isinstance(cookie["domain"], basestring)
     assert "secure" in cookie
     assert isinstance(cookie["secure"], bool)
     assert "httpOnly" in cookie
     assert isinstance(cookie["httpOnly"], bool)
     assert "expiry" in cookie
-    assert isinstance(cookie["expiry"], (int, long))
+    assert cookie.get("expiry") is None
 
     assert cookie["name"] == "foo"
     assert cookie["value"] == "bar"
 
 def test_duplicated_cookie(session, url):
     session.url = url("/common/blank.html")
     clear_all_cookies(session)
     create_cookie_request = {