Update web-platform-tests to revision 5084587f6b05bf99ad09e7844be66dcc61070cdf

This commit is contained in:
WPT Sync Bot 2018-04-25 21:10:30 -04:00 committed by Anthony Ramine
parent 6d42d2f1e8
commit 7d1071a6a4
408 changed files with 8968 additions and 2608 deletions

View file

@ -0,0 +1,14 @@
// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
promise_test(async() => {
const text = await (await fetch('/interfaces/encoding.idl')).text();
const idl_array = new IdlArray();
idl_array.add_idls(text);
idl_array.add_objects({
TextEncoder: ['new TextEncoder()'],
TextDecoder: ['new TextDecoder()']
});
idl_array.test();
}, 'Encoding Standard IDL');

View file

@ -1,25 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>idlharness test: Encoding Living Standard API</title>
<link rel="author" title="Joshua Bell" href="mailto:jsbell@google.com" />
<link rel="help" href="https://encoding.spec.whatwg.org/#api"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<h1>idlharness test</h1>
<p>This test validates the WebIDL included in the Encoding Living Standard.</p>
<script>
promise_test(async() => {
const text = await (await fetch('/interfaces/encoding.idl')).text();
const idl_array = new IdlArray();
idl_array.add_idls(text);
idl_array.add_objects({
TextEncoder: ['new TextEncoder()'],
TextDecoder: ['new TextDecoder()']
});
idl_array.test();
}, 'Test driver');
</script>

View file

@ -7,6 +7,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="jis0208_index.js"></script>
<script src="iso2022jp-encoder.js"></script>
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://encoding.spec.whatwg.org/#names-and-labels">
<meta name="assert" content="The browser produces the same encoding behavior for a document labeled 'csiso2022jp' as for a document labeled 'iso-2022-jp'.">

View file

@ -33,6 +33,10 @@ function encode(input, output, desc) {
// test ASCII - test separately for chars that aren't escaped
for (var a = 0; a < 0x7f; a++) {
// The first 3 are stripped from URLs and the last is # which introduces a new URL segment
if (a === 0x09 || a === 0x0a || a === 0x0d || a === 0x23) {
continue;
}
hex = a.toString(16).toUpperCase();
while (hex.length < 2) {
hex = "0" + hex;