Skip to content

Commit

Permalink
[Win] http/tests/cookies/document-cookie-during-iframe-parsing.html i…
Browse files Browse the repository at this point in the history
…s timing out

https://bugs.webkit.org/show_bug.cgi?id=263364

Reviewed by Ross Kirsling.

Windows Python replaces '\n' to '\r\n' for sys.stdout. Use
sys.stdout.buffer.write instead of sys.stdout.write.

* LayoutTests/http/tests/cookies/resources/set-cookie-and-serve.py:
* LayoutTests/platform/wincairo/TestExpectations:

Canonical link: https://commits.webkit.org/269590@main
  • Loading branch information
fujii committed Oct 20, 2023
1 parent 903c53a commit f40446c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 6 additions & 5 deletions LayoutTests/http/tests/cookies/resources/set-cookie-and-serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
cookie_value = query.get('cookie-value', [''])[0]
destination = query.get('destination', [''])[0]

sys.stdout.write(
sys.stdout.buffer.write(
'Content-Type: text/html\r\n'
'Cache-Control: no-store\r\n'
'Set-Cookie: {}={}; path=/\r\n'.format(cookie_name, cookie_value)
'Set-Cookie: {}={}; path=/\r\n'.format(cookie_name, cookie_value).encode()
)

with open(os.path.join(os.path.dirname(__file__), destination), 'r') as file:
with open(os.path.join(os.path.dirname(__file__), destination), 'rb') as file:
content = file.read()
sys.stdout.write('Content-Length: {}\r\n\r\n{}'.format(len(content), content))
sys.stdout.buffer.write('Content-Length: {}\r\n\r\n'.format(len(content)).encode())
sys.stdout.buffer.write(content)

sys.exit(0)
sys.exit(0)
2 changes: 0 additions & 2 deletions LayoutTests/platform/wincairo/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,6 @@ webkit.org/b/209455 http/wpt/misc/no-last-modified.html [ Failure Pass ]

http/tests/IndexedDB/storage-limit-1.https.html [ Failure ]
http/tests/IndexedDB/storage-limit.https.html [ Failure ]
http/tests/cookies/document-cookie-after-showModalDialog.html [ Timeout ]
http/tests/cookies/document-cookie-during-iframe-parsing.html [ Timeout ]
http/tests/cookies/document-cookie-multiple-cookies.html [ Failure ]
http/tests/misc/form-post-textplain-cross-site.html [ Failure ]
http/tests/misc/form-post-textplain.html [ Failure ]
Expand Down

0 comments on commit f40446c

Please sign in to comment.