Update web-platform-tests to revision 5349c6a6327372f856ecbe07d863d468a4236726

This commit is contained in:
WPT Sync Bot 2018-12-08 20:32:47 -05:00
parent d17d5adb6d
commit c5c7a1f47a
19 changed files with 427 additions and 39 deletions

View file

@ -297779,6 +297779,16 @@
{} {}
] ]
], ],
"infrastructure/testdriver/file_upload.py": [
[
{}
]
],
"infrastructure/testdriver/file_upload_data.txt": [
[
{}
]
],
"infrastructure/webdriver/tests/conftest.py": [ "infrastructure/webdriver/tests/conftest.py": [
[ [
{} {}
@ -317514,6 +317524,11 @@
{} {}
] ]
], ],
"tools/wptserve/tests/functional/docroot/subdir/sub_path.sub.txt": [
[
{}
]
],
"tools/wptserve/tests/functional/docroot/test.asis": [ "tools/wptserve/tests/functional/docroot/test.asis": [
[ [
{} {}
@ -378697,6 +378712,14 @@
} }
] ]
], ],
"infrastructure/testdriver/file_upload.sub.html": [
[
"/infrastructure/testdriver/file_upload.sub.html",
{
"testdriver": true
}
]
],
"infrastructure/testdriver/send_keys.html": [ "infrastructure/testdriver/send_keys.html": [
[ [
"/infrastructure/testdriver/send_keys.html", "/infrastructure/testdriver/send_keys.html",
@ -632202,6 +632225,18 @@
"37721ad9ef3df10f8cdc1da74c27a2259d4601f6", "37721ad9ef3df10f8cdc1da74c27a2259d4601f6",
"testharness" "testharness"
], ],
"infrastructure/testdriver/file_upload.py": [
"32633679a9f33d516398f811d888cabf9b062b90",
"support"
],
"infrastructure/testdriver/file_upload.sub.html": [
"29c42b49f1716200ef6b68eda4fefd716441fcd8",
"testharness"
],
"infrastructure/testdriver/file_upload_data.txt": [
"097d2a3a3f31dbd8f14cff73974cf042b6ebfcd2",
"support"
],
"infrastructure/testdriver/send_keys.html": [ "infrastructure/testdriver/send_keys.html": [
"2170347c9729564f7e492009b3d20b3267422c1d", "2170347c9729564f7e492009b3d20b3267422c1d",
"testharness" "testharness"
@ -632807,7 +632842,7 @@
"support" "support"
], ],
"interfaces/webxr.idl": [ "interfaces/webxr.idl": [
"7f7b43c222bd3bc4dcab0c618402ff8ff61ae470", "27ee27493aaa98869c9fe3adc0f4f19ec99e85e2",
"support" "support"
], ],
"interfaces/worklets.idl": [ "interfaces/worklets.idl": [
@ -671035,7 +671070,7 @@
"support" "support"
], ],
"tools/wptrunner/wptrunner/browsers/firefox.py": [ "tools/wptrunner/wptrunner/browsers/firefox.py": [
"59f06699b585f88c2e2723c74b41f75f03beb754", "26d744749e534e79c02569ebc235b35c4baccbd6",
"support" "support"
], ],
"tools/wptrunner/wptrunner/browsers/ie.py": [ "tools/wptrunner/wptrunner/browsers/ie.py": [
@ -671574,6 +671609,10 @@
"3b42b29be95174007e1ed18fc10eccdedd80b581", "3b42b29be95174007e1ed18fc10eccdedd80b581",
"support" "support"
], ],
"tools/wptserve/tests/functional/docroot/subdir/sub_path.sub.txt": [
"44027f2855eb6b95daf7e34c4269444d88166245",
"support"
],
"tools/wptserve/tests/functional/docroot/test.asis": [ "tools/wptserve/tests/functional/docroot/test.asis": [
"b05ba7da80932036cef863a541d9f417ebd0dcf6", "b05ba7da80932036cef863a541d9f417ebd0dcf6",
"support" "support"
@ -671623,7 +671662,7 @@
"support" "support"
], ],
"tools/wptserve/tests/functional/test_pipes.py": [ "tools/wptserve/tests/functional/test_pipes.py": [
"693cb82e2410b6a66ce15085fb91218f04eb683c", "2ba6f744b228763659db3dcce1abf1e8ba91f0c5",
"support" "support"
], ],
"tools/wptserve/tests/functional/test_request.py": [ "tools/wptserve/tests/functional/test_request.py": [
@ -671675,7 +671714,7 @@
"support" "support"
], ],
"tools/wptserve/wptserve/pipes.py": [ "tools/wptserve/wptserve/pipes.py": [
"bb24cd310068a953bec34ac6d224e42bae3ddb3e", "92b284c93e3f8be26157afebb28af33bedc3e8a1",
"support" "support"
], ],
"tools/wptserve/wptserve/ranges.py": [ "tools/wptserve/wptserve/ranges.py": [

View file

@ -532,7 +532,7 @@
expected: FAIL expected: FAIL
[windows-1252: iso_8859-1:1987 (XMLHttpRequest)] [windows-1252: iso_8859-1:1987 (XMLHttpRequest)]
expected: FAIL expected: TIMEOUT
[windows-1254: iso_8859-9:1989 (XMLHttpRequest)] [windows-1254: iso_8859-9:1989 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
@ -636,5 +636,11 @@
[windows-1252: l1 (XMLHttpRequest)] [windows-1252: l1 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[windows-1252: iso88591 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: iso8859-1 (XMLHttpRequest)]
expected: TIMEOUT
[single-byte-decoder.html?TextDecoder] [single-byte-decoder.html?TextDecoder]

View file

@ -0,0 +1,4 @@
[006.html]
[Link with onclick form submit and href navigation ]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -5,5 +5,5 @@
expected: NOTRUN expected: NOTRUN
[calling play() on a sufficiently long video should trigger timeupdate event] [calling play() on a sufficiently long video should trigger timeupdate event]
expected: NOTRUN expected: FAIL

View file

@ -2,14 +2,23 @@
type: testharness type: testharness
expected: TIMEOUT expected: TIMEOUT
[picture: source (max-width:500px) broken image, img valid image, resize to wide] [picture: source (max-width:500px) broken image, img valid image, resize to wide]
expected: FAIL expected: TIMEOUT
[picture: source (max-width:500px) valid image, img valid image, resize to wide] [picture: source (max-width:500px) valid image, img valid image, resize to wide]
expected: FAIL expected: TIMEOUT
[picture: source (max-width:500px) valid image, img broken image, resize to narrow] [picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT expected: TIMEOUT
[picture: source (max-width:500px) valid image, img valid image, resize to narrow] [picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: TIMEOUT expected: FAIL
[picture: source (max-width:500px) broken image, img valid image, resize to narrow]
expected: FAIL
[img (srcset 1 cand) valid image, resize to narrow]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to narrow]
expected: FAIL

View file

@ -1,10 +0,0 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -1,7 +0,0 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -2,3 +2,6 @@
[document.open() after parser is aborted] [document.open() after parser is aborted]
expected: FAIL expected: FAIL
[async document.open() after parser is aborted]
expected: FAIL

View file

@ -0,0 +1,283 @@
[quirks.html]
[top: -\\31 .5]
expected: FAIL
[bottom: -1A]
expected: FAIL
[bottom: -1a]
expected: FAIL
[top: @1]
expected: FAIL
[top: "1a"]
expected: FAIL
[top: @a]
expected: FAIL
[bottom: "1"]
expected: FAIL
[bottom: -/**/1]
expected: FAIL
[top: +/**/1]
expected: FAIL
[bottom: @1a]
expected: FAIL
[top: 1\\31 ]
expected: FAIL
[top: url('1')]
expected: FAIL
[bottom: -\\31 ]
expected: FAIL
[top: calc(1)]
expected: FAIL
[top: \\31 ]
expected: FAIL
[bottom: +1\\31 ]
expected: FAIL
[bottom: 1\\31 .5]
expected: FAIL
[bottom: #0001]
expected: FAIL
[top: calc(2 * 2px)]
expected: FAIL
[bottom: 1a]
expected: FAIL
[bottom: A]
expected: FAIL
[bottom: #01]
expected: FAIL
[top: +\\31 .5]
expected: FAIL
[bottom: #1]
expected: FAIL
[top: -/**/1]
expected: FAIL
[bottom: +\\31 .5]
expected: FAIL
[bottom: \\31 ]
expected: FAIL
[bottom: calc(1)]
expected: FAIL
[top: #001]
expected: FAIL
[top: +\\31 ]
expected: FAIL
[bottom: +\\31 ]
expected: FAIL
[top: +1.5]
expected: FAIL
[top: +1\\31 ]
expected: FAIL
[bottom: @a]
expected: FAIL
[bottom: @1]
expected: FAIL
[top: #1]
expected: FAIL
[top: 1a]
expected: FAIL
[bottom: +1a]
expected: FAIL
[bottom: +1A]
expected: FAIL
[bottom: "a"]
expected: FAIL
[top: #00001]
expected: FAIL
[bottom: -1\\31 .5]
expected: FAIL
[top: "1"]
expected: FAIL
[bottom: 1.5]
expected: FAIL
[bottom: -\\31 .5]
expected: FAIL
[bottom: url('1')]
expected: FAIL
[bottom: -1.5]
expected: FAIL
[top: \\31 .5]
expected: FAIL
[bottom: "1a"]
expected: FAIL
[bottom: calc(2 * 2px)]
expected: FAIL
[bottom: +1\\31 .5]
expected: FAIL
[bottom: 1\\31 ]
expected: FAIL
[bottom: +/**/1]
expected: FAIL
[bottom: #00001]
expected: FAIL
[top: url(1)]
expected: FAIL
[bottom: #001]
expected: FAIL
[top: +1\\31 .5]
expected: FAIL
[top: -1a]
expected: FAIL
[top: -1A]
expected: FAIL
[bottom: url(1)]
expected: FAIL
[top: a]
expected: FAIL
[top: A]
expected: FAIL
[top: #000001]
expected: FAIL
[top: 1]
expected: FAIL
[top: 1\\31 .5]
expected: FAIL
[bottom: a]
expected: FAIL
[bottom: 1]
expected: FAIL
[bottom: +1]
expected: FAIL
[bottom: #000001]
expected: FAIL
[bottom: +a]
expected: FAIL
[bottom: +A]
expected: FAIL
[top: 1.5]
expected: FAIL
[top: +A]
expected: FAIL
[top: +a]
expected: FAIL
[top: +1]
expected: FAIL
[top: -1.5]
expected: FAIL
[top: -1\\31 .5]
expected: FAIL
[top: +1a]
expected: FAIL
[top: +1A]
expected: FAIL
[top: @1a]
expected: FAIL
[bottom: \\31 .5]
expected: FAIL
[top: "a"]
expected: FAIL
[top: #01]
expected: FAIL
[bottom: +1.5]
expected: FAIL
[bottom: -A]
expected: FAIL
[bottom: -a]
expected: FAIL
[bottom: -1\\31 ]
expected: FAIL
[top: #0001]
expected: FAIL
[bottom: -1]
expected: FAIL
[top: -\\31 ]
expected: FAIL
[top: -A]
expected: FAIL
[top: -a]
expected: FAIL
[top: -1]
expected: FAIL
[top: -1\\31 ]
expected: FAIL

View file

@ -1,5 +1,4 @@
[005.html] [005.html]
expected: ERROR
[dedicated worker in shared worker in dedicated worker] [dedicated worker in shared worker in dedicated worker]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,2 @@
def main(request, response):
return "PASS" if request.POST["file_input"].file.read() == b"File to upload\n" else "FAIL"

View file

@ -0,0 +1,26 @@
<!doctype html>
<meta charset=utf8>
<title>File upload using testdriver</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<form id="form">
<input id="file_input" name="file_input" type="file">
</form>
<script>
let form = document.getElementById("form");
let input = document.getElementById("file_input");
test_driver
.send_keys(input, "{{fs_path(file_upload_data.txt)}}")
.then(() =>
fetch("file_upload.py",
{method: "POST",
body: new FormData(form)}))
.then(response => response.text())
.then(data => {
assert_equals(data, "PASS");
done();
})
.catch(() => assert_unreached("File upload failed"));
</script>

View file

@ -0,0 +1 @@
File to upload

View file

@ -17,17 +17,6 @@ partial interface Navigator {
[SameObject] readonly attribute XR xr; [SameObject] readonly attribute XR xr;
}; };
enum XRSessionMode {
"inline",
"immersive-vr",
"immersive-ar"
};
dictionary XRSessionCreationOptions {
XRSessionMode mode = "inline";
XRPresentationContext outputContext;
};
enum XREnvironmentBlendMode { enum XREnvironmentBlendMode {
"opaque", "opaque",
"additive", "additive",
@ -64,6 +53,17 @@ enum XREnvironmentBlendMode {
attribute EventHandler onselectend; attribute EventHandler onselectend;
}; };
enum XRSessionMode {
"inline",
"immersive-vr",
"immersive-ar"
};
dictionary XRSessionCreationOptions {
XRSessionMode mode = "inline";
XRPresentationContext outputContext;
};
callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame); callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame);
[SecureContext, Exposed=Window] interface XRFrame { [SecureContext, Exposed=Window] interface XRFrame {

View file

@ -243,7 +243,7 @@ class FirefoxBrowser(Browser):
self.profile.set_preferences({ self.profile.set_preferences({
"marionette.port": self.marionette_port, "marionette.port": self.marionette_port,
"network.dns.localDomains": ",".join(self.config.domains_set), "network.dns.localDomains": ",".join(self.config.domains_set),
"dom.file.createInChild": True,
# TODO: Remove preferences once Firefox 64 is stable (Bug 905404) # TODO: Remove preferences once Firefox 64 is stable (Bug 905404)
"network.proxy.type": 0, "network.proxy.type": 0,
"places.history.enabled": False, "places.history.enabled": False,

View file

@ -0,0 +1,3 @@
{{fs_path(sub_path.sub.txt)}}
{{fs_path(../sub_path.sub.txt)}}
{{fs_path(/sub_path.sub.txt)}}

View file

@ -117,6 +117,15 @@ server: http://localhost:{0}""".format(self.server.port).encode("ascii")
expected = b"localhost %d A %d B localhost C" % (port, port) expected = b"localhost %d A %d B localhost C" % (port, port)
self.assertEqual(resp.read().rstrip(), expected) self.assertEqual(resp.read().rstrip(), expected)
def test_sub_fs_path(self):
resp = self.request("/subdir/sub_path.sub.txt")
root = os.path.abspath(doc_root)
expected = """%(root)s%(sep)ssubdir%(sep)ssub_path.sub.txt
%(root)s%(sep)ssub_path.sub.txt
%(root)s%(sep)ssub_path.sub.txt
""" % {"root": root, "sep": os.path.sep}
self.assertEqual(resp.read(), expected.encode("utf8"))
class TestTrickle(TestUsingServer): class TestTrickle(TestUsingServer):
def test_trickle(self): def test_trickle(self):
#Actually testing that the response trickles in is not that easy #Actually testing that the response trickles in is not that easy

View file

@ -354,6 +354,8 @@ def sub(request, response, escape_type="html"):
sha224, sha256, sha384, and sha512. For example: sha224, sha256, sha384, and sha512. For example:
{{file_hash(md5, dom/interfaces.html)}} {{file_hash(md5, dom/interfaces.html)}}
fs_path(filepath)
The absolute path to a file inside the wpt document root
So for example in a setup running on localhost with a www So for example in a setup running on localhost with a www
subdomain and a http server on ports 80 and 81:: subdomain and a http server on ports 80 and 81::
@ -414,6 +416,21 @@ class SubFunctions(object):
return base64.b64encode(hash_obj.digest()).strip() return base64.b64encode(hash_obj.digest()).strip()
@staticmethod
def fs_path(request, path):
if not path.startswith("/"):
subdir = request.request_path[len(request.url_base):]
if "/" in subdir:
subdir = subdir.rsplit("/", 1)[0]
root_rel_path = subdir + "/" + path
else:
root_rel_path = path[1:]
root_rel_path = root_rel_path.replace("/", os.path.sep)
absolute_path = os.path.abspath(os.path.join(request.doc_root, root_rel_path))
if ".." in os.path.relpath(absolute_path, request.doc_root):
raise ValueError("Path outside wpt root")
return absolute_path
def template(request, content, escape_type="html"): def template(request, content, escape_type="html"):
#TODO: There basically isn't any error handling here #TODO: There basically isn't any error handling here
tokenizer = ReplacementTokenizer() tokenizer = ReplacementTokenizer()