1414
1515
1616import pytest
17- from flaky import flaky
1817
1918
2019async def test_should_have_default_url_when_launching_browser (
@@ -28,34 +27,6 @@ async def test_should_have_default_url_when_launching_browser(
2827 await browser_context .close ()
2928
3029
31- async def test_headless_should_be_able_to_read_cookies_written_by_headful (
32- browser_type , launch_arguments , server , tmpdir , is_chromium , is_win
33- ):
34- if is_chromium and is_win :
35- pytest .skip ("see https://github.com/microsoft/playwright/issues/717" )
36- return
37- # Write a cookie in headful chrome
38- headful_context = await browser_type .launch_persistent_context (
39- tmpdir , ** {** launch_arguments , "headless" : False }
40- )
41- headful_page = await headful_context .new_page ()
42- await headful_page .goto (server .EMPTY_PAGE )
43- await headful_page .evaluate (
44- """() => document.cookie = 'foo=true; expires=Fri, 31 Dec 9999 23:59:59 GMT'"""
45- )
46- await headful_context .close ()
47- # Read the cookie from headless chrome
48- headless_context = await browser_type .launch_persistent_context (
49- tmpdir , ** {** launch_arguments , "headless" : True }
50- )
51- headless_page = await headless_context .new_page ()
52- await headless_page .goto (server .EMPTY_PAGE )
53- cookie = await headless_page .evaluate ("() => document.cookie" )
54- await headless_context .close ()
55- # This might throw. See https://github.com/GoogleChrome/puppeteer/issues/2778
56- assert cookie == "foo=true"
57-
58-
5930async def test_should_close_browser_with_beforeunload_page (
6031 browser_type , launch_arguments , server , tmpdir
6132):
@@ -177,7 +148,6 @@ async def test_should_not_override_viewport_size_when_passed_null(
177148 await browser .close ()
178149
179150
180- @flaky
181151async def test_page_bring_to_front_should_work (browser_type , launch_arguments ):
182152 browser = await browser_type .launch (** {** launch_arguments , "headless" : False })
183153 page1 = await browser .new_page ()
0 commit comments