Worklet: Fix credentials tests for worklets
Before this CL, credentials tests for worklets are completely broken as follows: - In credentials.py, |credentials_mode| is compared by "is" that conducts the object equality check. As a result, all conditions unexpectedly pass through and the script always returns a valid response. - In credentials.py, |is_cross_origin| value is always |False| because requests don't have the GET param. - fetch() needs { credentials: 'include' } option for configuring the document's cookie with the Set-Cookie header, but it's not specified. - Response headers are not specified for a 404 response. This results in test timeout instead of a network error. This CL fixes these bugs and cleans up tests. Bug: 738769 Change-Id: I9aeb11fca23dec3fd3057a765fa60eb6e59d8258 Reviewed-on: https://chromium-review.googlesource.com/799730 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by:Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#523713}
Showing
Please register or sign in to comment