https://github.com/web-platform-tests/wpt
Raw File
Tip revision: bf7cc00ba4855d78175d162308b5c59c6bed197d authored by Andy Paicu on 23 May 2018, 13:12:21 UTC
Prevent sandboxed documents from reusing the default window
Tip revision: bf7cc00
dropSecure.py
from helpers import makeDropCookie, readParameter, setNoCacheAndCORSHeaders

def main(request, response):
    """Respond to `/cookie/drop/secure` by dropping the two cookie set by
    `setSecureTestCookies()`"""
    headers = setNoCacheAndCORSHeaders(request, response)

    # Expire the cookies, and return a JSON-encoded success code.
    headers.append(makeDropCookie("alone_secure", False))
    headers.append(makeDropCookie("alone_insecure", False))
    return headers, '{"success": true}'
back to top