Skip to content

Commit

Permalink
test: redownload wpt fixtures with correct encoding
Browse files Browse the repository at this point in the history
PR-URL: #37467
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
targos authored and danielleadams committed Mar 16, 2021
1 parent 057c6a8 commit c09bd77
Show file tree
Hide file tree
Showing 45 changed files with 138 additions and 37 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/wpt/common/square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/encoding/eof-shift_jis.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<meta charset=shift_jis>
<title>Shift_JIS file ending with a truncated sequence</title>
<link rel=match href=/encoding/eof-shift_jis-ref.html>
One-byte truncated sequence:
One-byte truncated sequence:ƒ
2 changes: 1 addition & 1 deletion test/fixtures/wpt/encoding/eof-utf-8-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<meta charset=utf-8>
<title>UTF-8 file ending with a one-byte truncated sequence</title>
<link rel=match href="eof-utf-8-one-ref.html">
One-byte truncated sequence:
One-byte truncated sequence:ð
2 changes: 1 addition & 1 deletion test/fixtures/wpt/encoding/eof-utf-8-three.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<meta charset=utf-8>
<title>UTF-8 file ending with a three-byte truncated sequence</title>
<link rel=match href="eof-utf-8-three-ref.html">
Three-byte truncated sequence:
Three-byte truncated sequence:ðŸ’
2 changes: 1 addition & 1 deletion test/fixtures/wpt/encoding/eof-utf-8-two.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<meta charset=utf-8>
<title>UTF-8 file ending with a two-byte truncated sequence</title>
<link rel=match href="eof-utf-8-two-ref.html">
Two-byte truncated sequence:
Two-byte truncated sequence:ðŸ

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<meta charset="euc-jp">
<title>EUC-JP characters</title>
</head>
<body><span></span> <span>���</span> <span>���</span> <span></span> <span>���</span> <span></span> <span>���</span> <span>1</span> <span>��</span> <span>��</span> <span>��</span> </body>
<body><span>°</span> <span>°µ°</span> <span>°°°</span> <span>ÿ</span> <span>°µÿ</span> <span></span> <span>°µ‘</span> <span>°1</span> <span>°ÿ</span> <span>° </span> <span>¢¹</span> </body>
</html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<meta charset="shift_jis">
<title>Shift_JIS characters</title>
</head>
<body><span></span> <span>�n�</span> <span>���</span> <span></span> <span></span> <span></span> <span>���</span> <span>��</span> <span>��</span> <span>��</span> </body>
<body><span>ú</span> <span>únú</span> <span>úúú</span> <span>ÿ</span> <span> </span> <span>á</span> <span>úúÿ</span> <span>úý</span> <span>úþ</span> <span>µ</span> </body>
</html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<meta charset="euc-kr">
<title>EUC-KR characters</title>
</head>
<body><span></span> <span>���</span> <span>���</span> <span></span> <span>���</span> <span>1</span> <span>��</span> <span>[</span> </body>
<body><span>°</span> <span>°µ°</span> <span>°°°</span> <span>ÿ</span> <span>°µÿ</span> <span>°1</span> <span>°ÿ</span> <span>[</span> </body>
</html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<meta charset="big5">
<title>Big5 characters</title>
</head>
<body><span></span> <span>���</span> <span>���</span> <span></span> <span>���</span> <span>1</span> <span>��</span> <span>��</span> </body>
<body><span>«</span> <span>«µ«</span> <span>«««</span> <span>ÿ</span> <span>«µÿ</span> <span>«1</span> <span>«ÿ</span> <span>Èò</span> </body>
</html>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
����
����
Original file line number Diff line number Diff line change
@@ -1 +1 @@
����
����
Binary file modified test/fixtures/wpt/encoding/resources/utf-32-big-endian-bom.html
Binary file not shown.
Binary file modified test/fixtures/wpt/encoding/resources/utf-32-big-endian-bom.xml
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions test/fixtures/wpt/hr-time/resources/unload.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ const setupListeners = (docName, nextDocument) => {
if (docName !== "c") { syncDelay(1000); }
});
};

100 changes: 100 additions & 0 deletions test/fixtures/wpt/interfaces/FileAPI.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: File API (https://w3c.github.io/FileAPI/)

[Exposed=(Window,Worker), Serializable]
interface Blob {
constructor(optional sequence<BlobPart> blobParts,
optional BlobPropertyBag options = {});

readonly attribute unsigned long long size;
readonly attribute DOMString type;

// slice Blob into byte-ranged chunks
Blob slice(optional [Clamp] long long start,
optional [Clamp] long long end,
optional DOMString contentType);

// read from the Blob.
[NewObject] ReadableStream stream();
[NewObject] Promise<USVString> text();
[NewObject] Promise<ArrayBuffer> arrayBuffer();
};

enum EndingType { "transparent", "native" };

dictionary BlobPropertyBag {
DOMString type = "";
EndingType endings = "transparent";
};

typedef (BufferSource or Blob or USVString) BlobPart;

[Exposed=(Window,Worker), Serializable]
interface File : Blob {
constructor(sequence<BlobPart> fileBits,
USVString fileName,
optional FilePropertyBag options = {});
readonly attribute DOMString name;
readonly attribute long long lastModified;
};

dictionary FilePropertyBag : BlobPropertyBag {
long long lastModified;
};

[Exposed=(Window,Worker), Serializable]
interface FileList {
getter File? item(unsigned long index);
readonly attribute unsigned long length;
};

[Exposed=(Window,Worker)]
interface FileReader: EventTarget {
constructor();
// async read methods
undefined readAsArrayBuffer(Blob blob);
undefined readAsBinaryString(Blob blob);
undefined readAsText(Blob blob, optional DOMString encoding);
undefined readAsDataURL(Blob blob);

undefined abort();

// states
const unsigned short EMPTY = 0;
const unsigned short LOADING = 1;
const unsigned short DONE = 2;

readonly attribute unsigned short readyState;

// File or Blob data
readonly attribute (DOMString or ArrayBuffer)? result;

readonly attribute DOMException? error;

// event handler content attributes
attribute EventHandler onloadstart;
attribute EventHandler onprogress;
attribute EventHandler onload;
attribute EventHandler onabort;
attribute EventHandler onerror;
attribute EventHandler onloadend;
};

[Exposed=(DedicatedWorker,SharedWorker)]
interface FileReaderSync {
constructor();
// Synchronously return strings

ArrayBuffer readAsArrayBuffer(Blob blob);
DOMString readAsBinaryString(Blob blob);
DOMString readAsText(Blob blob, optional DOMString encoding);
DOMString readAsDataURL(Blob blob);
};

[Exposed=(Window,DedicatedWorker,SharedWorker)]
partial interface URL {
static DOMString createObjectURL((Blob or MediaSource) obj);
static undefined revokeObjectURL(DOMString url);
};

0 comments on commit c09bd77

Please sign in to comment.