LayoutTests/ChangeLog

 12021-01-22 Jonathan Bedard <jbedard@apple.com>
 2
 3 [LayoutTests] Move redirect.py in resources folder
 4 https://bugs.webkit.org/show_bug.cgi?id=220876
 5 <rdar://problem/73516627>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation.html:
 10 * http/wpt/html/dom/elements/images/redirect.py: Moved to images/resources /redirect.py
 11 * http/wpt/html/dom/elements/images/resources: Added.
 12 * http/wpt/html/dom/elements/images/resources/redirect.py: Moved from images/redirect.py.
 13
1142021-01-22 Chris Fleizach <cfleizach@apple.com>
215
316 AX: AT-synthesized key events for common user actions (increment/decrement) are detectably different in many ways, potentially causing both web app breakage and AT identification
271761

LayoutTests/http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation.html

@@function getImagePixel(image)
1717
1818function computeRedirectionURL(finalURL)
1919{
20  return "redirect.py?status=302&location="+ encodeURIComponent(finalURL);
 20 return "resources/redirect.py?status=302&location="+ encodeURIComponent(finalURL);
2121}
2222
2323let resolve;
271760

LayoutTests/http/wpt/html/dom/elements/images/redirect.py

1 def main(request, response):
2  """Simple handler that causes not-cacheable redirection.
3 
4  The request should typically have two query parameters:
5  status - The status to use for the redirection. Defaults to 302.
6  location - The resource to redirect to.
7  """
8  status = 302
9  if b"status" in request.GET:
10  try:
11  status = int(request.GET.first(b"status"))
12  except ValueError:
13  pass
14 
15  response.status = status
16 
17  location = request.GET.first(b"location")
18 
19  response.headers.set(b"Location", location)
20  response.headers.set(b"Cache-Control", "no-store")
271760

LayoutTests/http/wpt/html/dom/elements/images/resources/redirect.py

 1def main(request, response):
 2 """Simple handler that causes not-cacheable redirection.
 3
 4 The request should typically have two query parameters:
 5 status - The status to use for the redirection. Defaults to 302.
 6 location - The resource to redirect to.
 7 """
 8 status = 302
 9 if b"status" in request.GET:
 10 try:
 11 status = int(request.GET.first(b"status"))
 12 except ValueError:
 13 pass
 14
 15 response.status = status
 16
 17 location = request.GET.first(b"location")
 18
 19 response.headers.set(b"Location", location)
 20 response.headers.set(b"Cache-Control", "no-store")
nonexistent