forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@4d4166da585da2a0b00c123ae4fe853f107669e1
Using wpt-import in Chromium 84a440a. With Chromium commits locally applied on WPT: 9c24e63 "Check for first frame in CreateImageBitmap" a8a2808 "[Security][Coop] Browsing context switch reporting WPT" b2436c3 "Ensure cloning a template element into an inactive document does not crash." 027aefc "OPTION element: Update OPTION label even if it has invalid markup" 0776aa6 "Mark pointerevent_pointermove_in_pointerlock test non flaky" d2ee98f "Move manual offscreen wpt tests to own folder" 458dc85 "WPT: Migrate content-visibility tests to wpt." 84f61c8 "Exclude non relevants reports from the COOP-opener-breakage tests." Note to sheriffs: This CL imports external tests and adds expectations for those tests; if this CL is large and causes a few new failures, please fix the failures by adding new lines to TestExpectations rather than reverting. See: https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md NOAUTOREVERT=true TBR=foolip@google.com No-Export: true Change-Id: I10d45089057aad743e2b4aca2465a6928edeced7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2239528 Reviewed-by: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#776992}
- Loading branch information
Chromium WPT Sync
authored and
Commit Bot
committed
Jun 10, 2020
1 parent
2ee54c3
commit 966eb93
Showing
10 changed files
with
107 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...web_tests/external/wpt/client-hints/accept-ch-stickiness/resources/accept-ch-and-redir.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
def main(request, response): | ||
url = '' | ||
if 'url' in request.GET: | ||
url = request.GET['url'] | ||
return 301, [('Location', url),('Accept-CH', 'device-memory, DPR')], '' | ||
url = b'' | ||
if b'url' in request.GET: | ||
url = request.GET[b'url'] | ||
return 301, [(b'Location', url),(b'Accept-CH', b'device-memory, DPR')], u'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 16 additions & 8 deletions
24
...blink/web_tests/external/wpt/client-hints/resources/expect-client-hints-headers-iframe.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
from wptserve.utils import isomorphic_decode | ||
|
||
def main(request, response): | ||
""" | ||
Simple handler that returns an HTML response that passes when the required | ||
Client Hints are received as request headers. | ||
""" | ||
values = [ "Device-Memory", "DPR", "Viewport-Width", "Sec-CH-UA", "Sec-CH-UA-Mobile" ] | ||
values = [b"Device-Memory", b"DPR", b"Viewport-Width", b"Sec-CH-UA", b"Sec-CH-UA-Mobile"] | ||
|
||
result = "PASS" | ||
log = "" | ||
result = u"PASS" | ||
log = u"" | ||
for value in values: | ||
should = (request.GET[value.lower()] == "true") | ||
should = (request.GET[value.lower()] == b"true") | ||
present = request.headers.get(value.lower()) or request.headers.get(value) | ||
log += value + " " + str(should) + " " + str(present) +", " | ||
if present: | ||
log += isomorphic_decode(value) + u" " + str(should) + u" " + isomorphic_decode(present) + u", " | ||
else: | ||
log += isomorphic_decode(value) + u" " + str(should) + u" " + str(present) + u", " | ||
if (should and not present) or (not should and present): | ||
result = "FAIL " + value + " " + str(should) + " " + str(present) | ||
if present: | ||
result = u"FAIL " + isomorphic_decode(value) + u" " + str(should) + u" " + isomorphic_decode(present) | ||
else: | ||
result = u"FAIL " + isomorphic_decode(value) + u" " + str(should) + u" " + str(present) | ||
break | ||
|
||
response.headers.append("Access-Control-Allow-Origin", "*") | ||
body = "<script>console.log('" + log +"'); window.parent.postMessage('" + result + "', '*');</script>" | ||
response.headers.append(b"Access-Control-Allow-Origin", b"*") | ||
body = u"<script>console.log('" + log + u"'); window.parent.postMessage('" + result + u"', '*');</script>" | ||
|
||
response.content = body |
10 changes: 5 additions & 5 deletions
10
third_party/blink/web_tests/external/wpt/client-hints/resources/sec-ch-ua.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters