@@ -21,7 +21,7 @@ async def test_should_return_no_cookies_in_pristine_browser_context(context):
2121 assert await context .cookies () == []
2222
2323
24- async def test_should_get_a_cookie (context , page , server , is_firefox ):
24+ async def test_should_get_a_cookie (context , page , server , is_chromium ):
2525 await page .goto (server .EMPTY_PAGE )
2626 document_cookie = await page .evaluate (
2727 """() => {
@@ -39,12 +39,12 @@ async def test_should_get_a_cookie(context, page, server, is_firefox):
3939 "expires" : - 1 ,
4040 "httpOnly" : False ,
4141 "secure" : False ,
42- "sameSite" : "None" ,
42+ "sameSite" : "Lax" if is_chromium else " None" ,
4343 }
4444 ]
4545
4646
47- async def test_should_get_a_non_session_cookie (context , page , server , is_firefox ):
47+ async def test_should_get_a_non_session_cookie (context , page , server , is_chromium ):
4848 await page .goto (server .EMPTY_PAGE )
4949 # @see https://en.wikipedia.org/wiki/Year_2038_problem
5050 date = int (datetime .datetime (2038 , 1 , 1 ).timestamp () * 1000 )
@@ -66,7 +66,7 @@ async def test_should_get_a_non_session_cookie(context, page, server, is_firefox
6666 "expires" : date / 1000 ,
6767 "httpOnly" : False ,
6868 "secure" : False ,
69- "sameSite" : "None" ,
69+ "sameSite" : "Lax" if is_chromium else " None" ,
7070 }
7171 ]
7272
@@ -124,7 +124,7 @@ async def test_should_properly_report_lax_sameSite_cookie(
124124 assert cookies [0 ]["sameSite" ] == "Lax"
125125
126126
127- async def test_should_get_multiple_cookies (context , page , server , is_firefox ):
127+ async def test_should_get_multiple_cookies (context , page , server , is_chromium ):
128128 await page .goto (server .EMPTY_PAGE )
129129 document_cookie = await page .evaluate (
130130 """() => {
@@ -145,7 +145,7 @@ async def test_should_get_multiple_cookies(context, page, server, is_firefox):
145145 "expires" : - 1 ,
146146 "httpOnly" : False ,
147147 "secure" : False ,
148- "sameSite" : "None" ,
148+ "sameSite" : "Lax" if is_chromium else " None" ,
149149 },
150150 {
151151 "name" : "username" ,
@@ -155,12 +155,12 @@ async def test_should_get_multiple_cookies(context, page, server, is_firefox):
155155 "expires" : - 1 ,
156156 "httpOnly" : False ,
157157 "secure" : False ,
158- "sameSite" : "None" ,
158+ "sameSite" : "Lax" if is_chromium else " None" ,
159159 },
160160 ]
161161
162162
163- async def test_should_get_cookies_from_multiple_urls (context ):
163+ async def test_should_get_cookies_from_multiple_urls (context , is_chromium ):
164164 await context .add_cookies (
165165 [
166166 {"url" : "https://foo.com" , "name" : "doggo" , "value" : "woofs" },
@@ -180,7 +180,7 @@ async def test_should_get_cookies_from_multiple_urls(context):
180180 "expires" : - 1 ,
181181 "httpOnly" : False ,
182182 "secure" : True ,
183- "sameSite" : "None" ,
183+ "sameSite" : "Lax" if is_chromium else " None" ,
184184 },
185185 {
186186 "name" : "doggo" ,
@@ -190,6 +190,6 @@ async def test_should_get_cookies_from_multiple_urls(context):
190190 "expires" : - 1 ,
191191 "httpOnly" : False ,
192192 "secure" : True ,
193- "sameSite" : "None" ,
193+ "sameSite" : "Lax" if is_chromium else " None" ,
194194 },
195195 ]
0 commit comments