mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'
This commit is contained in:
parent
35e95f55a1
commit
58e8ee674b
9438 changed files with 266112 additions and 106976 deletions
|
@ -1,16 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>File constructor</title>
|
||||
<link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#dfn-file">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
// META: title=File constructor
|
||||
|
||||
const to_string_obj = { toString: () => 'a string' };
|
||||
const to_string_throws = { toString: () => { throw new Error('expected'); } };
|
||||
|
||||
test(function() {
|
||||
assert_true("File" in window, "window should have a File property.");
|
||||
assert_true("File" in globalThis, "globalThis should have a File property.");
|
||||
}, "File interface object exists");
|
||||
|
||||
test(t => {
|
||||
|
@ -155,5 +149,3 @@ test(t => {
|
|||
() => new File(['bits'], 'name.txt', {type: to_string_throws}),
|
||||
'Constructor should propagate exceptions');
|
||||
}, 'Property bag propagates exceptions');
|
||||
|
||||
</script>
|
|
@ -1,4 +1,3 @@
|
|||
from six import PY3
|
||||
from wptserve.utils import isomorphic_encode
|
||||
|
||||
# Outputs the request body, with controls and non-ASCII bytes escaped
|
||||
|
@ -6,10 +5,8 @@ from wptserve.utils import isomorphic_encode
|
|||
# As a convenience, CRLF newlines are left as is.
|
||||
|
||||
def escape_byte(byte):
|
||||
# We want a single-char binary string, but in Python 3 we may get an int
|
||||
# from iterating over bytes.
|
||||
if PY3:
|
||||
byte = bytes([byte])
|
||||
# Convert int byte into a single-char binary string.
|
||||
byte = bytes([byte])
|
||||
if b"\0" <= byte <= b"\x1F" or byte >= b"\x7F":
|
||||
return b"\\x%02x" % ord(byte)
|
||||
if byte == b"\\":
|
||||
|
|
|
@ -1,28 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>FormData: Upload files named using controls (tentative)</title>
|
||||
<!--
|
||||
NOTE: This test is tentative because encoding for filename
|
||||
control characters is not yet standardized.
|
||||
-->
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"
|
||||
/>
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist"
|
||||
/>
|
||||
<link rel="help" href="https://w3c.github.io/FileAPI/#file-constructor" />
|
||||
<link
|
||||
rel="author"
|
||||
title="Benjamin C. Wiley Sittler"
|
||||
href="mailto:bsittler@chromium.org"
|
||||
/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../support/send-file-formdata-helper.js"></script>
|
||||
<script>
|
||||
// META: title=FormData: FormData: Upload files named using controls
|
||||
// META: script=../support/send-file-formdata-helper.js
|
||||
"use strict";
|
||||
|
||||
formDataPostFileUploadTest({
|
||||
|
@ -90,4 +67,3 @@
|
|||
fileNameSource: "ASCII",
|
||||
fileBaseName: "file-for-upload-in-form-SPACE-[ ].txt",
|
||||
});
|
||||
</script>
|
|
@ -1,28 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>FormData: Upload files named using punctuation (tentative)</title>
|
||||
<!--
|
||||
NOTE: This test is tentative because encoding for filename
|
||||
punctuation characters is not yet standardized.
|
||||
-->
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"
|
||||
/>
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist"
|
||||
/>
|
||||
<link rel="help" href="https://w3c.github.io/FileAPI/#file-constructor" />
|
||||
<link
|
||||
rel="author"
|
||||
title="Benjamin C. Wiley Sittler"
|
||||
href="mailto:bsittler@chromium.org"
|
||||
/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../support/send-file-formdata-helper.js"></script>
|
||||
<script>
|
||||
// META: title=FormData: FormData: Upload files named using punctuation
|
||||
// META: script=../support/send-file-formdata-helper.js
|
||||
"use strict";
|
||||
|
||||
// These have characters that undergo processing in name=,
|
||||
|
@ -165,4 +142,3 @@
|
|||
fileNameSource: "ASCII",
|
||||
fileBaseName: "'file-for-upload-in-form-single-quoted.txt'",
|
||||
});
|
||||
</script>
|
|
@ -1,24 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>FormData: Upload files in UTF-8 fetch()</title>
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"
|
||||
/>
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist"
|
||||
/>
|
||||
<link rel="help" href="https://w3c.github.io/FileAPI/#file-constructor" />
|
||||
<link
|
||||
rel="author"
|
||||
title="Benjamin C. Wiley Sittler"
|
||||
href="mailto:bsittler@chromium.org"
|
||||
/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../support/send-file-formdata-helper.js"></script>
|
||||
<script>
|
||||
// META: title=FormData: FormData: Upload files in UTF-8 fetch()
|
||||
// META: script=../support/send-file-formdata-helper.js
|
||||
"use strict";
|
||||
|
||||
formDataPostFileUploadTest({
|
||||
|
@ -50,4 +31,3 @@
|
|||
fileNameSource: "Unicode",
|
||||
fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
// META: title=FormData: Upload ASCII-named file in UTF-8 form
|
||||
// META: script=../support/send-file-formdata-helper.js
|
||||
"use strict";
|
||||
|
||||
formDataPostFileUploadTest({
|
||||
fileNameSource: "ASCII",
|
||||
fileBaseName: "file-for-upload-in-form.txt",
|
||||
});
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8" />
|
||||
<title>FormData: Upload ASCII-named file in UTF-8 form</title>
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"
|
||||
/>
|
||||
<link
|
||||
rel="help"
|
||||
href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist"
|
||||
/>
|
||||
<link rel="help" href="https://w3c.github.io/FileAPI/#file-constructor" />
|
||||
<link
|
||||
rel="author"
|
||||
title="Benjamin C. Wiley Sittler"
|
||||
href="mailto:bsittler@chromium.org"
|
||||
/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../support/send-file-formdata-helper.js"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
formDataPostFileUploadTest({
|
||||
fileNameSource: "ASCII",
|
||||
fileBaseName: "file-for-upload-in-form.txt",
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue