<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[278962] trunk/LayoutTests</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/278962">278962</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2021-06-16 15:39:29 -0700 (Wed, 16 Jun 2021)</dd>
</dl>
<h3>Log Message</h3>
<pre>Resync FileAPI tests from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=227089
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Resync FileAPI tests from upstream WPT b5949c67c948bc452e3.
* web-platform-tests/FileAPI/*: Updated.
LayoutTests:
* tests-options.json:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIFileReaderw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobstreamanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-stream.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileresourcesechocontentescapedpy">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/resources/echo-content-escaped.py</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilew3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIsupportsendfileformdatahelperjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/support/send-file-formdata-helper.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/w3c-import.log</a></li>
<li><a href="#trunkLayoutTeststestsoptionsjson">trunk/LayoutTests/tests-options.json</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructordomwindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructordomwindowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructordomwindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyjs">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIFileReaderProgress_event_bubbles_cancelableexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIFileReaderProgress_event_bubbles_cancelablehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobslicehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformcontrolstentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformcontrolstentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformiso2022jptentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformiso2022jptentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformpunctuationtentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformpunctuationtentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformutf8expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformutf8html">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformwindows1252tentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformwindows1252tentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformxuserdefinedtentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformxuserdefinedtentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolstentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolstentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8html">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatahtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinghtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributeshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_aborthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_errorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTexthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystatehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resulthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/ChangeLog 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2021-06-16 Chris Dumez <cdumez@apple.com>
+
+ Resync FileAPI tests from upstream WPT
+ https://bugs.webkit.org/show_bug.cgi?id=227089
+
+ Reviewed by Darin Adler.
+
+ * tests-options.json:
+
</ins><span class="cx"> 2021-06-16 Ada Chan <ada.chan@apple.com>
</span><span class="cx">
</span><span class="cx"> Allow WebXR tests to be run on Mac
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/TestExpectations 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -2638,8 +2638,6 @@
</span><span class="cx"> # FileAPI
</span><span class="cx"> webkit.org/b/172099 imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html [ ImageOnlyFailure ]
</span><span class="cx"> imported/w3c/web-platform-tests/FileAPI/url/sandboxed-iframe.html [ Failure ]
</span><del>-# Test output contains WebKitFormBoundary lines with randomly generated text.
-imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html [ Failure ]
</del><span class="cx">
</span><span class="cx"> # Secure Contexts tests that timeout
</span><span class="cx"> imported/w3c/web-platform-tests/secure-contexts/basic-dedicated-worker.html [ Skip ]
</span><span class="lines">@@ -2931,7 +2929,6 @@
</span><span class="cx"> webkit.org/b/210731 imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.html [ Skip ]
</span><span class="cx"> webkit.org/b/210731 imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.worker.html [ Skip ]
</span><span class="cx">
</span><del>-webkit.org/b/186848 imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html [ Pass Failure ]
</del><span class="cx"> webkit.org/b/179176 svg/wicd/test-rightsizing-a.xhtml [ Pass Failure ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/172864 imported/blink/storage/indexeddb/blob-delete-objectstore-db.html [ Pass Timeout ]
</span><span class="lines">@@ -2942,8 +2939,6 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/202805 [ Debug ] fast/multicol/fragflow-gains-new-in-flow-descendant-crash.html [ Skip ]
</span><span class="cx">
</span><del>-webkit.org/b/187269 [ Debug ] imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html [ Skip ]
-
</del><span class="cx"> # This newly imported test crashes in debug and flakily times out.
</span><span class="cx"> webkit.org/b/189917 imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/contentType.window.html [ Skip ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2021-06-16 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Resync FileAPI tests from upstream WPT
+ https://bugs.webkit.org/show_bug.cgi?id=227089
+
+ Reviewed by Darin Adler.
+
+ Resync FileAPI tests from upstream WPT b5949c67c948bc452e3.
+
+ * web-platform-tests/FileAPI/*: Updated.
+
+2021-06-16 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Resync webaudio tests from upstream WPT
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=227091
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIFileReaderProgress_event_bubbles_cancelableexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-
-PASS Check the values of bubbles and cancelable are false when the progress event is dispatched
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIFileReaderProgress_event_bubbles_cancelablehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,33 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>File API Test: Progress Event - bubbles, cancelable</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="help" href="http://www.w3.org/TR/FileAPI/#events">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
- async_test(function(){
- var blob = new Blob(["TEST"]);
- var reader = new FileReader();
-
- reader.onloadstart = this.step_func(function(evt) {
- assert_false(evt.bubbles, "The bubbles must be false when the event is dispatched");
- assert_false(evt.cancelable, "The cancelable must be false when the event is dispatched");
- });
-
- reader.onload = this.step_func(function(evt) {
- assert_false(evt.bubbles, "The bubbles must be false when the event is dispatched");
- assert_false(evt.cancelable, "The cancelable must be false when the event is dispatched");
- });
-
- reader.onloadend = this.step_func(function(evt) {
- assert_false(evt.bubbles, "The bubbles must be false when the event is dispatched");
- assert_false(evt.cancelable, "The cancelable must be false when the event is dispatched");
- this.done();
- });
-
- reader.readAsText(blob);
- }, "Check the values of bubbles and cancelable are false when the progress event is dispatched");
-</script>
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIFileReaderw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/w3c-import.log (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/w3c-import.log 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/w3c-import.log 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -14,5 +14,5 @@
</span><span class="cx"> None
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/progress_event_bubbles_cancelable.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/workers.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructordomwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+PASS Passing platform objects for blobParts should throw a TypeError.
+PASS A platform object that supports indexed properties should be treated as a sequence for the blobParts argument (overwritten 'length'.)
+PASS Passing an platform object that supports indexed properties as the blobParts array should work (select).
+PASS Passing an platform object that supports indexed properties as the blobParts array should work (attributes).
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructordomwindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructordomwindowjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.js (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+// META: title=Blob constructor
+// META: script=../support/Blob.js
+'use strict';
+
+var test_error = {
+ name: "test",
+ message: "test error",
+};
+
+test(function() {
+ var args = [
+ document.createElement("div"),
+ window,
+ ];
+ args.forEach(function(arg) {
+ assert_throws_js(TypeError, function() {
+ new Blob(arg);
+ }, "Should throw for argument " + format_value(arg) + ".");
+ });
+}, "Passing platform objects for blobParts should throw a TypeError.");
+
+test(function() {
+ var element = document.createElement("div");
+ element.appendChild(document.createElement("div"));
+ element.appendChild(document.createElement("p"));
+ var list = element.children;
+ Object.defineProperty(list, "length", {
+ get: function() { throw test_error; }
+ });
+ assert_throws_exactly(test_error, function() {
+ new Blob(list);
+ });
+}, "A platform object that supports indexed properties should be treated as a sequence for the blobParts argument (overwritten 'length'.)");
+
+test_blob(function() {
+ var select = document.createElement("select");
+ select.appendChild(document.createElement("option"));
+ return new Blob(select);
+}, {
+ expected: "[object HTMLOptionElement]",
+ type: "",
+ desc: "Passing an platform object that supports indexed properties as the blobParts array should work (select)."
+});
+
+test_blob(function() {
+ var elm = document.createElement("div");
+ elm.setAttribute("foo", "bar");
+ return new Blob(elm.attributes);
+}, {
+ expected: "[object Attr]",
+ type: "",
+ desc: "Passing an platform object that supports indexed properties as the blobParts array should work (attributes)."
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+
+PASS Blob interface object
+PASS Blob constructor with no arguments
+PASS Blob constructor with no arguments, without 'new'
+PASS Blob constructor without brackets
+PASS Blob constructor with undefined as first argument
+PASS Passing non-objects, Dates and RegExps for blobParts should throw a TypeError.
+PASS A plain object with @@iterator should be treated as a sequence for the blobParts argument.
+PASS A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.
+PASS A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.
+PASS A String object should be treated as a sequence for the blobParts argument.
+PASS A Uint8Array object should be treated as a sequence for the blobParts argument.
+PASS The length getter should be invoked and any exceptions should be propagated.
+PASS ToUint32 should be applied to the length and any exceptions should be propagated.
+PASS Getters and value conversions should happen in order until an exception is thrown.
+PASS ToString should be called on elements of the blobParts array and any exceptions should be propagated.
+PASS Changes to the blobParts array should be reflected in the returned Blob (pop).
+PASS Changes to the blobParts array should be reflected in the returned Blob (unshift).
+PASS ToString should be called on elements of the blobParts array.
+PASS ArrayBuffer elements of the blobParts array should be supported.
+PASS Passing typed arrays as elements of the blobParts array should work.
+PASS Passing a Float64Array as element of the blobParts array should work.
+PASS Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).
+PASS Array with two blobs
+PASS Array with two buffers
+PASS Array with two bufferviews
+PASS Array with mixed types
+PASS options properties should be accessed in lexicographic order.
+PASS Arguments should be evaluated from left to right.
+PASS Passing null (index 0) for options should use the defaults.
+PASS Passing null (index 0) for options should use the defaults (with newlines).
+PASS Passing undefined (index 1) for options should use the defaults.
+PASS Passing undefined (index 1) for options should use the defaults (with newlines).
+PASS Passing object "[object Object]" (index 2) for options should use the defaults.
+PASS Passing object "[object Object]" (index 2) for options should use the defaults (with newlines).
+PASS Passing object "[object Object]" (index 3) for options should use the defaults.
+PASS Passing object "[object Object]" (index 3) for options should use the defaults (with newlines).
+PASS Passing object "/regex/" (index 4) for options should use the defaults.
+PASS Passing object "/regex/" (index 4) for options should use the defaults (with newlines).
+PASS Passing function "function () {}" (index 5) for options should use the defaults.
+PASS Passing function "function () {}" (index 5) for options should use the defaults (with newlines).
+PASS Passing 123 for options should throw
+PASS Passing 123.4 for options should throw
+PASS Passing true for options should throw
+PASS Passing "abc" for options should throw
+PASS Blob with type ""
+PASS Blob with type "a"
+PASS Blob with type "A"
+PASS Blob with type "text/html"
+PASS Blob with type "TEXT/HTML"
+PASS Blob with type "text/plain;charset=utf-8"
+PASS Blob with type "å"
+PASS Blob with type "𐑾"
+PASS Blob with type " image/gif "
+PASS Blob with type "\timage/gif\t"
+PASS Blob with type "image/gif;"
+PASS Blob with type "İmage/gif"
+PASS Blob with type "ımage/gif"
+PASS Blob with type "image/gif\0"
+PASS Blob with type "unknown/unknown"
+PASS Blob with type "text/plain"
+PASS Blob with type "image/png"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructorhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,459 @@
</span><ins>+// META: title=Blob constructor
+// META: script=../support/Blob.js
+'use strict';
+
+test(function() {
+ assert_true("Blob" in globalThis, "globalThis should have a Blob property.");
+ assert_equals(Blob.length, 0, "Blob.length should be 0.");
+ assert_true(Blob instanceof Function, "Blob should be a function.");
+}, "Blob interface object");
+
+// Step 1.
+test(function() {
+ var blob = new Blob();
+ assert_true(blob instanceof Blob);
+ assert_equals(String(blob), '[object Blob]');
+ assert_equals(blob.size, 0);
+ assert_equals(blob.type, "");
+}, "Blob constructor with no arguments");
+test(function() {
+ assert_throws_js(TypeError, function() { var blob = Blob(); });
+}, "Blob constructor with no arguments, without 'new'");
+test(function() {
+ var blob = new Blob;
+ assert_true(blob instanceof Blob);
+ assert_equals(blob.size, 0);
+ assert_equals(blob.type, "");
+}, "Blob constructor without brackets");
+test(function() {
+ var blob = new Blob(undefined);
+ assert_true(blob instanceof Blob);
+ assert_equals(String(blob), '[object Blob]');
+ assert_equals(blob.size, 0);
+ assert_equals(blob.type, "");
+}, "Blob constructor with undefined as first argument");
+
+// blobParts argument (WebIDL).
+test(function() {
+ var args = [
+ null,
+ true,
+ false,
+ 0,
+ 1,
+ 1.5,
+ "FAIL",
+ new Date(),
+ new RegExp(),
+ {},
+ { 0: "FAIL", length: 1 },
+ ];
+ args.forEach(function(arg) {
+ assert_throws_js(TypeError, function() {
+ new Blob(arg);
+ }, "Should throw for argument " + format_value(arg) + ".");
+ });
+}, "Passing non-objects, Dates and RegExps for blobParts should throw a TypeError.");
+
+test_blob(function() {
+ return new Blob({
+ [Symbol.iterator]: Array.prototype[Symbol.iterator],
+ });
+}, {
+ expected: "",
+ type: "",
+ desc: "A plain object with @@iterator should be treated as a sequence for the blobParts argument."
+});
+test(t => {
+ const blob = new Blob({
+ [Symbol.iterator]() {
+ var i = 0;
+ return {next: () => [
+ {done:false, value:'ab'},
+ {done:false, value:'cde'},
+ {done:true}
+ ][i++]
+ };
+ }
+ });
+ assert_equals(blob.size, 5, 'Custom @@iterator should be treated as a sequence');
+}, "A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.");
+test_blob(function() {
+ return new Blob({
+ [Symbol.iterator]: Array.prototype[Symbol.iterator],
+ 0: "PASS",
+ length: 1
+ });
+}, {
+ expected: "PASS",
+ type: "",
+ desc: "A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument."
+});
+test_blob(function() {
+ return new Blob(new String("xyz"));
+}, {
+ expected: "xyz",
+ type: "",
+ desc: "A String object should be treated as a sequence for the blobParts argument."
+});
+test_blob(function() {
+ return new Blob(new Uint8Array([1, 2, 3]));
+}, {
+ expected: "123",
+ type: "",
+ desc: "A Uint8Array object should be treated as a sequence for the blobParts argument."
+});
+
+var test_error = {
+ name: "test",
+ message: "test error",
+};
+
+test(function() {
+ var obj = {
+ [Symbol.iterator]: Array.prototype[Symbol.iterator],
+ get length() { throw test_error; }
+ };
+ assert_throws_exactly(test_error, function() {
+ new Blob(obj);
+ });
+}, "The length getter should be invoked and any exceptions should be propagated.");
+
+test(function() {
+ assert_throws_exactly(test_error, function() {
+ var obj = {
+ [Symbol.iterator]: Array.prototype[Symbol.iterator],
+ length: {
+ valueOf: null,
+ toString: function() { throw test_error; }
+ }
+ };
+ new Blob(obj);
+ });
+ assert_throws_exactly(test_error, function() {
+ var obj = {
+ [Symbol.iterator]: Array.prototype[Symbol.iterator],
+ length: { valueOf: function() { throw test_error; } }
+ };
+ new Blob(obj);
+ });
+}, "ToUint32 should be applied to the length and any exceptions should be propagated.");
+
+test(function() {
+ var received = [];
+ var obj = {
+ get [Symbol.iterator]() {
+ received.push("Symbol.iterator");
+ return Array.prototype[Symbol.iterator];
+ },
+ get length() {
+ received.push("length getter");
+ return {
+ valueOf: function() {
+ received.push("length valueOf");
+ return 3;
+ }
+ };
+ },
+ get 0() {
+ received.push("0 getter");
+ return {
+ toString: function() {
+ received.push("0 toString");
+ return "a";
+ }
+ };
+ },
+ get 1() {
+ received.push("1 getter");
+ throw test_error;
+ },
+ get 2() {
+ received.push("2 getter");
+ assert_unreached("Should not call the getter for 2 if the getter for 1 threw.");
+ }
+ };
+ assert_throws_exactly(test_error, function() {
+ new Blob(obj);
+ });
+ assert_array_equals(received, [
+ "Symbol.iterator",
+ "length getter",
+ "length valueOf",
+ "0 getter",
+ "0 toString",
+ "length getter",
+ "length valueOf",
+ "1 getter",
+ ]);
+}, "Getters and value conversions should happen in order until an exception is thrown.");
+
+// XXX should add tests edge cases of ToLength(length)
+
+test(function() {
+ assert_throws_exactly(test_error, function() {
+ new Blob([{ toString: function() { throw test_error; } }]);
+ }, "Throwing toString");
+ assert_throws_exactly(test_error, function() {
+ new Blob([{ toString: undefined, valueOf: function() { throw test_error; } }]);
+ }, "Throwing valueOf");
+ assert_throws_exactly(test_error, function() {
+ new Blob([{
+ toString: function() { throw test_error; },
+ valueOf: function() { assert_unreached("Should not call valueOf if toString is present."); }
+ }]);
+ }, "Throwing toString and valueOf");
+ assert_throws_js(TypeError, function() {
+ new Blob([{toString: null, valueOf: null}]);
+ }, "Null toString and valueOf");
+}, "ToString should be called on elements of the blobParts array and any exceptions should be propagated.");
+
+test_blob(function() {
+ var arr = [
+ { toString: function() { arr.pop(); return "PASS"; } },
+ { toString: function() { assert_unreached("Should have removed the second element of the array rather than called toString() on it."); } }
+ ];
+ return new Blob(arr);
+}, {
+ expected: "PASS",
+ type: "",
+ desc: "Changes to the blobParts array should be reflected in the returned Blob (pop)."
+});
+
+test_blob(function() {
+ var arr = [
+ {
+ toString: function() {
+ if (arr.length === 3) {
+ return "A";
+ }
+ arr.unshift({
+ toString: function() {
+ assert_unreached("Should only access index 0 once.");
+ }
+ });
+ return "P";
+ }
+ },
+ {
+ toString: function() {
+ return "SS";
+ }
+ }
+ ];
+ return new Blob(arr);
+}, {
+ expected: "PASS",
+ type: "",
+ desc: "Changes to the blobParts array should be reflected in the returned Blob (unshift)."
+});
+
+test_blob(function() {
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=17652
+ return new Blob([
+ null,
+ undefined,
+ true,
+ false,
+ 0,
+ 1,
+ new String("stringobject"),
+ [],
+ ['x', 'y'],
+ {},
+ { 0: "FAIL", length: 1 },
+ { toString: function() { return "stringA"; } },
+ { toString: undefined, valueOf: function() { return "stringB"; } },
+ { valueOf: function() { assert_unreached("Should not call valueOf if toString is present on the prototype."); } }
+ ]);
+}, {
+ expected: "nullundefinedtruefalse01stringobjectx,y[object Object][object Object]stringAstringB[object Object]",
+ type: "",
+ desc: "ToString should be called on elements of the blobParts array."
+});
+
+test_blob(function() {
+ return new Blob([
+ new ArrayBuffer(8)
+ ]);
+}, {
+ expected: "\0\0\0\0\0\0\0\0",
+ type: "",
+ desc: "ArrayBuffer elements of the blobParts array should be supported."
+});
+
+test_blob(function() {
+ return new Blob([
+ new Uint8Array([0x50, 0x41, 0x53, 0x53]),
+ new Int8Array([0x50, 0x41, 0x53, 0x53]),
+ new Uint16Array([0x4150, 0x5353]),
+ new Int16Array([0x4150, 0x5353]),
+ new Uint32Array([0x53534150]),
+ new Int32Array([0x53534150]),
+ new Float32Array([0xD341500000])
+ ]);
+}, {
+ expected: "PASSPASSPASSPASSPASSPASSPASS",
+ type: "",
+ desc: "Passing typed arrays as elements of the blobParts array should work."
+});
+test_blob(function() {
+ return new Blob([
+ // 0x535 3415053534150
+ // 0x535 = 0b010100110101 -> Sign = +, Exponent = 1333 - 1023 = 310
+ // 0x13415053534150 * 2**(-52)
+ // ==> 0x13415053534150 * 2**258 = 2510297372767036725005267563121821874921913208671273727396467555337665343087229079989707079680
+ new Float64Array([2510297372767036725005267563121821874921913208671273727396467555337665343087229079989707079680])
+ ]);
+}, {
+ expected: "PASSPASS",
+ type: "",
+ desc: "Passing a Float64Array as element of the blobParts array should work."
+});
+
+
+
+var t_ports = async_test("Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).");
+t_ports.step(function() {
+ var channel = new MessageChannel();
+ channel.port2.onmessage = this.step_func(function(e) {
+ var b_ports = new Blob(e.ports);
+ assert_equals(b_ports.size, "[object MessagePort]".length);
+ this.done();
+ });
+ var channel2 = new MessageChannel();
+ channel.port1.postMessage('', [channel2.port1]);
+});
+
+test_blob(function() {
+ var blob = new Blob(['foo']);
+ return new Blob([blob, blob]);
+}, {
+ expected: "foofoo",
+ type: "",
+ desc: "Array with two blobs"
+});
+
+test_blob_binary(function() {
+ var view = new Uint8Array([0, 255, 0]);
+ return new Blob([view.buffer, view.buffer]);
+}, {
+ expected: [0, 255, 0, 0, 255, 0],
+ type: "",
+ desc: "Array with two buffers"
+});
+
+test_blob_binary(function() {
+ var view = new Uint8Array([0, 255, 0, 4]);
+ var blob = new Blob([view, view]);
+ assert_equals(blob.size, 8);
+ var view1 = new Uint16Array(view.buffer, 2);
+ return new Blob([view1, view.buffer, view1]);
+}, {
+ expected: [0, 4, 0, 255, 0, 4, 0, 4],
+ type: "",
+ desc: "Array with two bufferviews"
+});
+
+test_blob(function() {
+ var view = new Uint8Array([0]);
+ var blob = new Blob(["fo"]);
+ return new Blob([view.buffer, blob, "foo"]);
+}, {
+ expected: "\0fofoo",
+ type: "",
+ desc: "Array with mixed types"
+});
+
+test(function() {
+ const accessed = [];
+ const stringified = [];
+
+ new Blob([], {
+ get type() { accessed.push('type'); },
+ get endings() { accessed.push('endings'); }
+ });
+ new Blob([], {
+ type: { toString: () => { stringified.push('type'); return ''; } },
+ endings: { toString: () => { stringified.push('endings'); return 'transparent'; } }
+ });
+ assert_array_equals(accessed, ['endings', 'type']);
+ assert_array_equals(stringified, ['endings', 'type']);
+}, "options properties should be accessed in lexicographic order.");
+
+test(function() {
+ assert_throws_exactly(test_error, function() {
+ new Blob(
+ [{ toString: function() { throw test_error } }],
+ {
+ get type() { assert_unreached("type getter should not be called."); }
+ }
+ );
+ });
+}, "Arguments should be evaluated from left to right.");
+
+[
+ null,
+ undefined,
+ {},
+ { unrecognized: true },
+ /regex/,
+ function() {}
+].forEach(function(arg, idx) {
+ test_blob(function() {
+ return new Blob([], arg);
+ }, {
+ expected: "",
+ type: "",
+ desc: "Passing " + format_value(arg) + " (index " + idx + ") for options should use the defaults."
+ });
+ test_blob(function() {
+ return new Blob(["\na\r\nb\n\rc\r"], arg);
+ }, {
+ expected: "\na\r\nb\n\rc\r",
+ type: "",
+ desc: "Passing " + format_value(arg) + " (index " + idx + ") for options should use the defaults (with newlines)."
+ });
+});
+
+[
+ 123,
+ 123.4,
+ true,
+ 'abc'
+].forEach(arg => {
+ test(t => {
+ assert_throws_js(TypeError, () => new Blob([], arg),
+ 'Blob constructor should throw with invalid property bag');
+ }, `Passing ${JSON.stringify(arg)} for options should throw`);
+});
+
+var type_tests = [
+ // blobParts, type, expected type
+ [[], '', ''],
+ [[], 'a', 'a'],
+ [[], 'A', 'a'],
+ [[], 'text/html', 'text/html'],
+ [[], 'TEXT/HTML', 'text/html'],
+ [[], 'text/plain;charset=utf-8', 'text/plain;charset=utf-8'],
+ [[], '\u00E5', ''],
+ [[], '\uD801\uDC7E', ''], // U+1047E
+ [[], ' image/gif ', ' image/gif '],
+ [[], '\timage/gif\t', ''],
+ [[], 'image/gif;\u007f', ''],
+ [[], '\u0130mage/gif', ''], // uppercase i with dot
+ [[], '\u0131mage/gif', ''], // lowercase dotless i
+ [[], 'image/gif\u0000', ''],
+ // check that type isn't changed based on sniffing
+ [[0x3C, 0x48, 0x54, 0x4D, 0x4C, 0x3E], 'unknown/unknown', 'unknown/unknown'], // "<HTML>"
+ [[0x00, 0xFF], 'text/plain', 'text/plain'],
+ [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61], 'image/png', 'image/png'], // "GIF89a"
+];
+
+type_tests.forEach(function(t) {
+ test(function() {
+ var arr = new Uint8Array([t[0]]).buffer;
+ var b = new Blob([arr], {type:t[1]});
+ assert_equals(b.type, t[2]);
+ }, "Blob with type " + format_value(t[1]));
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+
+PASS Blob interface object
+PASS Blob constructor with no arguments
+PASS Blob constructor with no arguments, without 'new'
+PASS Blob constructor without brackets
+PASS Blob constructor with undefined as first argument
+PASS Passing non-objects, Dates and RegExps for blobParts should throw a TypeError.
+PASS A plain object with @@iterator should be treated as a sequence for the blobParts argument.
+PASS A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.
+PASS A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.
+PASS A String object should be treated as a sequence for the blobParts argument.
+PASS A Uint8Array object should be treated as a sequence for the blobParts argument.
+PASS The length getter should be invoked and any exceptions should be propagated.
+PASS ToUint32 should be applied to the length and any exceptions should be propagated.
+PASS Getters and value conversions should happen in order until an exception is thrown.
+PASS ToString should be called on elements of the blobParts array and any exceptions should be propagated.
+PASS Changes to the blobParts array should be reflected in the returned Blob (pop).
+PASS Changes to the blobParts array should be reflected in the returned Blob (unshift).
+PASS ToString should be called on elements of the blobParts array.
+PASS ArrayBuffer elements of the blobParts array should be supported.
+PASS Passing typed arrays as elements of the blobParts array should work.
+PASS Passing a Float64Array as element of the blobParts array should work.
+PASS Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).
+PASS Array with two blobs
+PASS Array with two buffers
+PASS Array with two bufferviews
+PASS Array with mixed types
+PASS options properties should be accessed in lexicographic order.
+PASS Arguments should be evaluated from left to right.
+PASS Passing null (index 0) for options should use the defaults.
+PASS Passing null (index 0) for options should use the defaults (with newlines).
+PASS Passing undefined (index 1) for options should use the defaults.
+PASS Passing undefined (index 1) for options should use the defaults (with newlines).
+PASS Passing object "[object Object]" (index 2) for options should use the defaults.
+PASS Passing object "[object Object]" (index 2) for options should use the defaults (with newlines).
+PASS Passing object "[object Object]" (index 3) for options should use the defaults.
+PASS Passing object "[object Object]" (index 3) for options should use the defaults (with newlines).
+PASS Passing object "/regex/" (index 4) for options should use the defaults.
+PASS Passing object "/regex/" (index 4) for options should use the defaults (with newlines).
+PASS Passing function "function () {}" (index 5) for options should use the defaults.
+PASS Passing function "function () {}" (index 5) for options should use the defaults (with newlines).
+PASS Passing 123 for options should throw
+PASS Passing 123.4 for options should throw
+PASS Passing true for options should throw
+PASS Passing "abc" for options should throw
+PASS Blob with type ""
+PASS Blob with type "a"
+PASS Blob with type "A"
+PASS Blob with type "text/html"
+PASS Blob with type "TEXT/HTML"
+PASS Blob with type "text/plain;charset=utf-8"
+PASS Blob with type "å"
+PASS Blob with type "𐑾"
+PASS Blob with type " image/gif "
+PASS Blob with type "\timage/gif\t"
+PASS Blob with type "image/gif;"
+PASS Blob with type "İmage/gif"
+PASS Blob with type "ımage/gif"
+PASS Blob with type "image/gif\0"
+PASS Blob with type "unknown/unknown"
+PASS Blob with type "text/plain"
+PASS Blob with type "image/png"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructoranyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobconstructorhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,501 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>Blob constructor</title>
-<link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob">
-<link rel=help href="https://heycam.github.io/webidl/#es-union">
-<link rel=help href="https://heycam.github.io/webidl/#es-dictionary">
-<link rel=help href="https://heycam.github.io/webidl/#es-sequence">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="../support/Blob.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
- assert_true("Blob" in window, "window should have a Blob property.");
- assert_equals(Blob.length, 0, "Blob.length should be 0.");
- assert_true(Blob instanceof Function, "Blob should be a function.");
-}, "Blob interface object");
-
-// Step 1.
-test(function() {
- var blob = new Blob();
- assert_true(blob instanceof Blob);
- assert_equals(String(blob), '[object Blob]');
- assert_equals(blob.size, 0);
- assert_equals(blob.type, "");
-}, "Blob constructor with no arguments");
-test(function() {
- assert_throws_js(TypeError, function() { var blob = Blob(); });
-}, "Blob constructor with no arguments, without 'new'");
-test(function() {
- var blob = new Blob;
- assert_true(blob instanceof Blob);
- assert_equals(blob.size, 0);
- assert_equals(blob.type, "");
-}, "Blob constructor without brackets");
-test(function() {
- var blob = new Blob(undefined);
- assert_true(blob instanceof Blob);
- assert_equals(String(blob), '[object Blob]');
- assert_equals(blob.size, 0);
- assert_equals(blob.type, "");
-}, "Blob constructor with undefined as first argument");
-
-// blobParts argument (WebIDL).
-test(function() {
- var args = [
- null,
- true,
- false,
- 0,
- 1,
- 1.5,
- "FAIL",
- new Date(),
- new RegExp(),
- {},
- { 0: "FAIL", length: 1 },
- document.createElement("div"),
- window,
- ];
- args.forEach(function(arg) {
- assert_throws_js(TypeError, function() {
- new Blob(arg);
- }, "Should throw for argument " + format_value(arg) + ".");
- });
-}, "Passing non-objects, Dates and RegExps for blobParts should throw a TypeError.");
-
-test_blob(function() {
- return new Blob({
- [Symbol.iterator]: Array.prototype[Symbol.iterator],
- });
-}, {
- expected: "",
- type: "",
- desc: "A plain object with @@iterator should be treated as a sequence for the blobParts argument."
-});
-test(t => {
- const blob = new Blob({
- [Symbol.iterator]() {
- var i = 0;
- return {next: () => [
- {done:false, value:'ab'},
- {done:false, value:'cde'},
- {done:true}
- ][i++]
- };
- }
- });
- assert_equals(blob.size, 5, 'Custom @@iterator should be treated as a sequence');
-}, "A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.");
-test_blob(function() {
- return new Blob({
- [Symbol.iterator]: Array.prototype[Symbol.iterator],
- 0: "PASS",
- length: 1
- });
-}, {
- expected: "PASS",
- type: "",
- desc: "A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument."
-});
-test_blob(function() {
- return new Blob(new String("xyz"));
-}, {
- expected: "xyz",
- type: "",
- desc: "A String object should be treated as a sequence for the blobParts argument."
-});
-test_blob(function() {
- return new Blob(new Uint8Array([1, 2, 3]));
-}, {
- expected: "123",
- type: "",
- desc: "A Uint8Array object should be treated as a sequence for the blobParts argument."
-});
-
-var test_error = {
- name: "test",
- message: "test error",
-};
-
-test(function() {
- var obj = {
- [Symbol.iterator]: Array.prototype[Symbol.iterator],
- get length() { throw test_error; }
- };
- assert_throws_exactly(test_error, function() {
- new Blob(obj);
- });
-}, "The length getter should be invoked and any exceptions should be propagated.");
-
-test(function() {
- var element = document.createElement("div");
- element.appendChild(document.createElement("div"));
- element.appendChild(document.createElement("p"));
- var list = element.children;
- Object.defineProperty(list, "length", {
- get: function() { throw test_error; }
- });
- assert_throws_exactly(test_error, function() {
- new Blob(list);
- });
-}, "A platform object that supports indexed properties should be treated as a sequence for the blobParts argument (overwritten 'length'.)");
-
-test(function() {
- assert_throws_exactly(test_error, function() {
- var obj = {
- [Symbol.iterator]: Array.prototype[Symbol.iterator],
- length: {
- valueOf: null,
- toString: function() { throw test_error; }
- }
- };
- new Blob(obj);
- });
- assert_throws_exactly(test_error, function() {
- var obj = {
- [Symbol.iterator]: Array.prototype[Symbol.iterator],
- length: { valueOf: function() { throw test_error; } }
- };
- new Blob(obj);
- });
-}, "ToUint32 should be applied to the length and any exceptions should be propagated.");
-
-test(function() {
- var received = [];
- var obj = {
- get [Symbol.iterator]() {
- received.push("Symbol.iterator");
- return Array.prototype[Symbol.iterator];
- },
- get length() {
- received.push("length getter");
- return {
- valueOf: function() {
- received.push("length valueOf");
- return 3;
- }
- };
- },
- get 0() {
- received.push("0 getter");
- return {
- toString: function() {
- received.push("0 toString");
- return "a";
- }
- };
- },
- get 1() {
- received.push("1 getter");
- throw test_error;
- },
- get 2() {
- received.push("2 getter");
- assert_unreached("Should not call the getter for 2 if the getter for 1 threw.");
- }
- };
- assert_throws_exactly(test_error, function() {
- new Blob(obj);
- });
- assert_array_equals(received, [
- "Symbol.iterator",
- "length getter",
- "length valueOf",
- "0 getter",
- "0 toString",
- "length getter",
- "length valueOf",
- "1 getter",
- ]);
-}, "Getters and value conversions should happen in order until an exception is thrown.");
-
-// XXX should add tests edge cases of ToLength(length)
-
-test(function() {
- assert_throws_exactly(test_error, function() {
- new Blob([{ toString: function() { throw test_error; } }]);
- }, "Throwing toString");
- assert_throws_exactly(test_error, function() {
- new Blob([{ toString: undefined, valueOf: function() { throw test_error; } }]);
- }, "Throwing valueOf");
- assert_throws_exactly(test_error, function() {
- new Blob([{
- toString: function() { throw test_error; },
- valueOf: function() { assert_unreached("Should not call valueOf if toString is present."); }
- }]);
- }, "Throwing toString and valueOf");
- assert_throws_js(TypeError, function() {
- new Blob([{toString: null, valueOf: null}]);
- }, "Null toString and valueOf");
-}, "ToString should be called on elements of the blobParts array and any exceptions should be propagated.");
-
-test_blob(function() {
- var arr = [
- { toString: function() { arr.pop(); return "PASS"; } },
- { toString: function() { assert_unreached("Should have removed the second element of the array rather than called toString() on it."); } }
- ];
- return new Blob(arr);
-}, {
- expected: "PASS",
- type: "",
- desc: "Changes to the blobParts array should be reflected in the returned Blob (pop)."
-});
-
-test_blob(function() {
- var arr = [
- {
- toString: function() {
- if (arr.length === 3) {
- return "A";
- }
- arr.unshift({
- toString: function() {
- assert_unreached("Should only access index 0 once.");
- }
- });
- return "P";
- }
- },
- {
- toString: function() {
- return "SS";
- }
- }
- ];
- return new Blob(arr);
-}, {
- expected: "PASS",
- type: "",
- desc: "Changes to the blobParts array should be reflected in the returned Blob (unshift)."
-});
-
-test_blob(function() {
- // https://www.w3.org/Bugs/Public/show_bug.cgi?id=17652
- return new Blob([
- null,
- undefined,
- true,
- false,
- 0,
- 1,
- new String("stringobject"),
- [],
- ['x', 'y'],
- {},
- { 0: "FAIL", length: 1 },
- { toString: function() { return "stringA"; } },
- { toString: undefined, valueOf: function() { return "stringB"; } },
- { valueOf: function() { assert_unreached("Should not call valueOf if toString is present on the prototype."); } }
- ]);
-}, {
- expected: "nullundefinedtruefalse01stringobjectx,y[object Object][object Object]stringAstringB[object Object]",
- type: "",
- desc: "ToString should be called on elements of the blobParts array."
-});
-
-test_blob(function() {
- return new Blob([
- new ArrayBuffer(8)
- ]);
-}, {
- expected: "\0\0\0\0\0\0\0\0",
- type: "",
- desc: "ArrayBuffer elements of the blobParts array should be supported."
-});
-
-test_blob(function() {
- return new Blob([
- new Uint8Array([0x50, 0x41, 0x53, 0x53]),
- new Int8Array([0x50, 0x41, 0x53, 0x53]),
- new Uint16Array([0x4150, 0x5353]),
- new Int16Array([0x4150, 0x5353]),
- new Uint32Array([0x53534150]),
- new Int32Array([0x53534150]),
- new Float32Array([0xD341500000])
- ]);
-}, {
- expected: "PASSPASSPASSPASSPASSPASSPASS",
- type: "",
- desc: "Passing typed arrays as elements of the blobParts array should work."
-});
-test_blob(function() {
- return new Blob([
- // 0x535 3415053534150
- // 0x535 = 0b010100110101 -> Sign = +, Exponent = 1333 - 1023 = 310
- // 0x13415053534150 * 2**(-52)
- // ==> 0x13415053534150 * 2**258 = 2510297372767036725005267563121821874921913208671273727396467555337665343087229079989707079680
- new Float64Array([2510297372767036725005267563121821874921913208671273727396467555337665343087229079989707079680])
- ]);
-}, {
- expected: "PASSPASS",
- type: "",
- desc: "Passing a Float64Array as element of the blobParts array should work."
-});
-
-test_blob(function() {
- var select = document.createElement("select");
- select.appendChild(document.createElement("option"));
- return new Blob(select);
-}, {
- expected: "[object HTMLOptionElement]",
- type: "",
- desc: "Passing an platform object that supports indexed properties as the blobParts array should work (select)."
-});
-
-test_blob(function() {
- var elm = document.createElement("div");
- elm.setAttribute("foo", "bar");
- return new Blob(elm.attributes);
-}, {
- expected: "[object Attr]",
- type: "",
- desc: "Passing an platform object that supports indexed properties as the blobParts array should work (attributes)."
-});
-
-var t_ports = async_test("Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).");
-t_ports.step(function() {
- var channel = new MessageChannel();
- channel.port2.onmessage = this.step_func(function(e) {
- var b_ports = new Blob(e.ports);
- assert_equals(b_ports.size, "[object MessagePort]".length);
- this.done();
- });
- var channel2 = new MessageChannel();
- channel.port1.postMessage('', [channel2.port1]);
-});
-
-test_blob(function() {
- var blob = new Blob(['foo']);
- return new Blob([blob, blob]);
-}, {
- expected: "foofoo",
- type: "",
- desc: "Array with two blobs"
-});
-
-test_blob_binary(function() {
- var view = new Uint8Array([0, 255, 0]);
- return new Blob([view.buffer, view.buffer]);
-}, {
- expected: [0, 255, 0, 0, 255, 0],
- type: "",
- desc: "Array with two buffers"
-});
-
-test_blob_binary(function() {
- var view = new Uint8Array([0, 255, 0, 4]);
- var blob = new Blob([view, view]);
- assert_equals(blob.size, 8);
- var view1 = new Uint16Array(view.buffer, 2);
- return new Blob([view1, view.buffer, view1]);
-}, {
- expected: [0, 4, 0, 255, 0, 4, 0, 4],
- type: "",
- desc: "Array with two bufferviews"
-});
-
-test_blob(function() {
- var view = new Uint8Array([0]);
- var blob = new Blob(["fo"]);
- return new Blob([view.buffer, blob, "foo"]);
-}, {
- expected: "\0fofoo",
- type: "",
- desc: "Array with mixed types"
-});
-
-test(function() {
- const accessed = [];
- const stringified = [];
-
- new Blob([], {
- get type() { accessed.push('type'); },
- get endings() { accessed.push('endings'); }
- });
- new Blob([], {
- type: { toString: () => { stringified.push('type'); return ''; } },
- endings: { toString: () => { stringified.push('endings'); return 'transparent'; } }
- });
- assert_array_equals(accessed, ['endings', 'type']);
- assert_array_equals(stringified, ['endings', 'type']);
-}, "options properties should be accessed in lexicographic order.");
-
-test(function() {
- assert_throws_exactly(test_error, function() {
- new Blob(
- [{ toString: function() { throw test_error } }],
- {
- get type() { assert_unreached("type getter should not be called."); }
- }
- );
- });
-}, "Arguments should be evaluated from left to right.");
-
-[
- null,
- undefined,
- {},
- { unrecognized: true },
- /regex/,
- function() {}
-].forEach(function(arg, idx) {
- test_blob(function() {
- return new Blob([], arg);
- }, {
- expected: "",
- type: "",
- desc: "Passing " + format_value(arg) + " (index " + idx + ") for options should use the defaults."
- });
- test_blob(function() {
- return new Blob(["\na\r\nb\n\rc\r"], arg);
- }, {
- expected: "\na\r\nb\n\rc\r",
- type: "",
- desc: "Passing " + format_value(arg) + " (index " + idx + ") for options should use the defaults (with newlines)."
- });
-});
-
-[
- 123,
- 123.4,
- true,
- 'abc'
-].forEach(arg => {
- test(t => {
- assert_throws_js(TypeError, () => new Blob([], arg),
- 'Blob constructor should throw with invalid property bag');
- }, `Passing ${JSON.stringify(arg)} for options should throw`);
-});
-
-var type_tests = [
- // blobParts, type, expected type
- [[], '', ''],
- [[], 'a', 'a'],
- [[], 'A', 'a'],
- [[], 'text/html', 'text/html'],
- [[], 'TEXT/HTML', 'text/html'],
- [[], 'text/plain;charset=utf-8', 'text/plain;charset=utf-8'],
- [[], '\u00E5', ''],
- [[], '\uD801\uDC7E', ''], // U+1047E
- [[], ' image/gif ', ' image/gif '],
- [[], '\timage/gif\t', ''],
- [[], 'image/gif;\u007f', ''],
- [[], '\u0130mage/gif', ''], // uppercase i with dot
- [[], '\u0131mage/gif', ''], // lowercase dotless i
- [[], 'image/gif\u0000', ''],
- // check that type isn't changed based on sniffing
- [[0x3C, 0x48, 0x54, 0x4D, 0x4C, 0x3E], 'unknown/unknown', 'unknown/unknown'], // "<HTML>"
- [[0x00, 0xFF], 'text/plain', 'text/plain'],
- [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61], 'image/png', 'image/png'], // "GIF89a"
-];
-
-type_tests.forEach(function(t) {
- test(function() {
- var arr = new Uint8Array([t[0]]).buffer;
- var b = new Blob([arr], {type:t[1]});
- assert_equals(b.type, t[2]);
- }, "Blob with type " + format_value(t[1]));
-});
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+PASS slice start is negative, relativeStart will be max((size + start), 0)
+PASS slice start is greater than blob size, relativeStart will be min(start, size)
+PASS slice end is negative, relativeEnd will be max((size + end), 0)
+PASS slice end is greater than blob size, relativeEnd will be min(end, size)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+// META: title=Blob slice overflow
+'use strict';
+
+var text = '';
+
+for (var i = 0; i < 2000; ++i) {
+ text += 'A';
+}
+
+test(function() {
+ var blob = new Blob([text]);
+ var sliceBlob = blob.slice(-1, blob.size);
+ assert_equals(sliceBlob.size, 1, "Blob slice size");
+}, "slice start is negative, relativeStart will be max((size + start), 0)");
+
+test(function() {
+ var blob = new Blob([text]);
+ var sliceBlob = blob.slice(blob.size + 1, blob.size);
+ assert_equals(sliceBlob.size, 0, "Blob slice size");
+}, "slice start is greater than blob size, relativeStart will be min(start, size)");
+
+test(function() {
+ var blob = new Blob([text]);
+ var sliceBlob = blob.slice(blob.size - 2, -1);
+ assert_equals(sliceBlob.size, 1, "Blob slice size");
+}, "slice end is negative, relativeEnd will be max((size + end), 0)");
+
+test(function() {
+ var blob = new Blob([text]);
+ var sliceBlob = blob.slice(blob.size - 2, blob.size + 999);
+ assert_equals(sliceBlob.size, 2, "Blob slice size");
+}, "slice end is greater than blob size, relativeEnd will be min(end, size)");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+PASS slice start is negative, relativeStart will be max((size + start), 0)
+PASS slice start is greater than blob size, relativeStart will be min(start, size)
+PASS slice end is negative, relativeEnd will be max((size + end), 0)
+PASS slice end is greater than blob size, relativeEnd will be min(end, size)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceoverflowhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Blob slice overflow</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="help" href="https://w3c.github.io/FileAPI/#dfn-slice">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-
-var text = '';
-
-for (var i = 0; i < 2000; ++i) {
- text += 'A';
-}
-
-test(function() {
- var blob = new Blob([text]);
- var sliceBlob = blob.slice(-1, blob.size);
- assert_equals(sliceBlob.size, 1, "Blob slice size");
-}, "slice start is negative, relativeStart will be max((size + start), 0)");
-
-test(function() {
- var blob = new Blob([text]);
- var sliceBlob = blob.slice(blob.size + 1, blob.size);
- assert_equals(sliceBlob.size, 0, "Blob slice size");
-}, "slice start is greater than blob size, relativeStart will be min(start, size)");
-
-test(function() {
- var blob = new Blob([text]);
- var sliceBlob = blob.slice(blob.size - 2, -1);
- assert_equals(sliceBlob.size, 1, "Blob slice size");
-}, "slice end is negative, relativeEnd will be max((size + end), 0)");
-
-test(function() {
- var blob = new Blob([text]);
- var sliceBlob = blob.slice(blob.size - 2, blob.size + 999);
- assert_equals(sliceBlob.size, 2, "Blob slice size");
-}, "slice end is greater than blob size, relativeEnd will be min(end, size)");
-
-</script>
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+
+PASS no-argument Blob slice
+PASS Slices
+PASS blob1.
+PASS blob2.
+PASS null type Blob slice
+PASS undefined type Blob slice
+PASS no type Blob slice
+PASS Slicing test (0,0).
+PASS Slicing test: slice (0,0).
+PASS Slicing test (0,1).
+PASS Slicing test: slice (0,1).
+PASS Slicing test (0,2).
+PASS Slicing test: slice (0,2).
+PASS Slicing test (0,3).
+PASS Slicing test: slice (0,3).
+PASS Slicing test (0,4).
+PASS Slicing test: slice (0,4).
+PASS Slicing test (0,5).
+PASS Slicing test: slice (0,5).
+PASS Slicing test (0,6).
+PASS Slicing test: slice (0,6).
+PASS Slicing test (0,7).
+PASS Slicing test: slice (0,7).
+PASS Slicing test (0,8).
+PASS Slicing test: slice (0,8).
+PASS Slicing test (1,0).
+PASS Slicing test: slice (1,0).
+PASS Slicing test (1,1).
+PASS Slicing test: slice (1,1).
+PASS Slicing test (1,2).
+PASS Slicing test: slice (1,2).
+PASS Slicing test (1,3).
+PASS Slicing test: slice (1,3).
+PASS Slicing test (1,4).
+PASS Slicing test: slice (1,4).
+PASS Slicing test (1,5).
+PASS Slicing test: slice (1,5).
+PASS Slicing test (1,6).
+PASS Slicing test: slice (1,6).
+PASS Slicing test (1,7).
+PASS Slicing test: slice (1,7).
+PASS Slicing test (2,0).
+PASS Slicing test: slice (2,0).
+PASS Slicing test (2,1).
+PASS Slicing test: slice (2,1).
+PASS Slicing test (2,2).
+PASS Slicing test: slice (2,2).
+PASS Slicing test (2,3).
+PASS Slicing test: slice (2,3).
+PASS Slicing test (3,0).
+PASS Slicing test: slice (3,0).
+PASS Slicing test (3,1).
+PASS Slicing test: slice (3,1).
+PASS Slicing test (3,2).
+PASS Slicing test: slice (3,2).
+PASS Slicing test (3,3).
+PASS Slicing test: slice (3,3).
+PASS Slicing test (3,4).
+PASS Slicing test: slice (3,4).
+PASS Slicing test (3,5).
+PASS Slicing test: slice (3,5).
+PASS Slicing test (4,0).
+PASS Slicing test: slice (4,0).
+PASS Slicing test (4,1).
+PASS Slicing test: slice (4,1).
+PASS Slicing test (4,2).
+PASS Slicing test: slice (4,2).
+PASS Slicing test (4,3).
+PASS Slicing test: slice (4,3).
+PASS Slicing test (4,4).
+PASS Slicing test: slice (4,4).
+PASS Slicing test (5,0).
+PASS Slicing test: slice (5,0).
+PASS Slicing test (5,1).
+PASS Slicing test: slice (5,1).
+PASS Slicing test (5,2).
+PASS Slicing test: slice (5,2).
+PASS Slicing test (5,3).
+PASS Slicing test: slice (5,3).
+PASS Slicing test (6,0).
+PASS Slicing test: slice (6,0).
+PASS Slicing test (6,1).
+PASS Slicing test: slice (6,1).
+PASS Slicing test (6,2).
+PASS Slicing test: slice (6,2).
+PASS Slicing test (7,0).
+PASS Slicing test: slice (7,0).
+PASS Slicing test (7,1).
+PASS Slicing test: slice (7,1).
+PASS Slicing test (7,2).
+PASS Slicing test: slice (7,2).
+PASS Slicing test (7,3).
+PASS Slicing test: slice (7,3).
+PASS Slicing test (8,0).
+PASS Slicing test: slice (8,0).
+PASS Slicing test (8,1).
+PASS Slicing test: slice (8,1).
+PASS Slicing test (8,2).
+PASS Slicing test: slice (8,2).
+PASS Slicing test (8,3).
+PASS Slicing test: slice (8,3).
+PASS Invalid contentType ("ÿ")
+PASS Invalid contentType ("te\txt/plain")
+PASS Invalid contentType ("te\0xt/plain")
+PASS Invalid contentType ("te\x1fxt/plain")
+PASS Invalid contentType ("text/plain")
+PASS Valid contentType ("te(xt/plain")
+PASS Valid contentType ("te)xt/plain")
+PASS Valid contentType ("te<xt/plain")
+PASS Valid contentType ("te>xt/plain")
+PASS Valid contentType ("te@xt/plain")
+PASS Valid contentType ("te,xt/plain")
+PASS Valid contentType ("te;xt/plain")
+PASS Valid contentType ("te:xt/plain")
+PASS Valid contentType ("te\\xt/plain")
+PASS Valid contentType ("te\"xt/plain")
+PASS Valid contentType ("te/xt/plain")
+PASS Valid contentType ("te[xt/plain")
+PASS Valid contentType ("te]xt/plain")
+PASS Valid contentType ("te?xt/plain")
+PASS Valid contentType ("te=xt/plain")
+PASS Valid contentType ("te{xt/plain")
+PASS Valid contentType ("te}xt/plain")
+PASS Valid contentType ("te xt/plain")
+PASS Valid contentType ("TEXT/PLAIN")
+PASS Valid contentType ("text/plain;charset = UTF-8")
+PASS Valid contentType ("text/plain;charset=UTF-8")
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobslicehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,231 @@
</span><ins>+// META: title=Blob slice
+// META: script=../support/Blob.js
+'use strict';
+
+test_blob(function() {
+ var blobTemp = new Blob(["PASS"]);
+ return blobTemp.slice();
+}, {
+ expected: "PASS",
+ type: "",
+ desc: "no-argument Blob slice"
+});
+
+test(function() {
+ var blob1, blob2;
+
+ test_blob(function() {
+ return blob1 = new Blob(["squiggle"]);
+ }, {
+ expected: "squiggle",
+ type: "",
+ desc: "blob1."
+ });
+
+ test_blob(function() {
+ return blob2 = new Blob(["steak"], {type: "content/type"});
+ }, {
+ expected: "steak",
+ type: "content/type",
+ desc: "blob2."
+ });
+
+ test_blob(function() {
+ return new Blob().slice(0,0,null);
+ }, {
+ expected: "",
+ type: "null",
+ desc: "null type Blob slice"
+ });
+
+ test_blob(function() {
+ return new Blob().slice(0,0,undefined);
+ }, {
+ expected: "",
+ type: "",
+ desc: "undefined type Blob slice"
+ });
+
+ test_blob(function() {
+ return new Blob().slice(0,0);
+ }, {
+ expected: "",
+ type: "",
+ desc: "no type Blob slice"
+ });
+
+ var arrayBuffer = new ArrayBuffer(16);
+ var int8View = new Int8Array(arrayBuffer);
+ for (var i = 0; i < 16; i++) {
+ int8View[i] = i + 65;
+ }
+
+ var testData = [
+ [
+ ["PASSSTRING"],
+ [{start: -6, contents: "STRING"},
+ {start: -12, contents: "PASSSTRING"},
+ {start: 4, contents: "STRING"},
+ {start: 12, contents: ""},
+ {start: 0, end: -6, contents: "PASS"},
+ {start: 0, end: -12, contents: ""},
+ {start: 0, end: 4, contents: "PASS"},
+ {start: 0, end: 12, contents: "PASSSTRING"},
+ {start: 7, end: 4, contents: ""}]
+ ],
+
+ // Test 3 strings
+ [
+ ["foo", "bar", "baz"],
+ [{start: 0, end: 9, contents: "foobarbaz"},
+ {start: 0, end: 3, contents: "foo"},
+ {start: 3, end: 9, contents: "barbaz"},
+ {start: 6, end: 9, contents: "baz"},
+ {start: 6, end: 12, contents: "baz"},
+ {start: 0, end: 9, contents: "foobarbaz"},
+ {start: 0, end: 11, contents: "foobarbaz"},
+ {start: 10, end: 15, contents: ""}]
+ ],
+
+ // Test string, Blob, string
+ [
+ ["foo", blob1, "baz"],
+ [{start: 0, end: 3, contents: "foo"},
+ {start: 3, end: 11, contents: "squiggle"},
+ {start: 2, end: 4, contents: "os"},
+ {start: 10, end: 12, contents: "eb"}]
+ ],
+
+ // Test blob, string, blob
+ [
+ [blob1, "foo", blob1],
+ [{start: 0, end: 8, contents: "squiggle"},
+ {start: 7, end: 9, contents: "ef"},
+ {start: 10, end: 12, contents: "os"},
+ {start: 1, end: 4, contents: "qui"},
+ {start: 12, end: 15, contents: "qui"},
+ {start: 40, end: 60, contents: ""}]
+ ],
+
+ // Test blobs all the way down
+ [
+ [blob2, blob1, blob2],
+ [{start: 0, end: 5, contents: "steak"},
+ {start: 5, end: 13, contents: "squiggle"},
+ {start: 13, end: 18, contents: "steak"},
+ {start: 1, end: 3, contents: "te"},
+ {start: 6, end: 10, contents: "quig"}]
+ ],
+
+ // Test an ArrayBufferView
+ [
+ [int8View, blob1, "foo"],
+ [{start: 0, end: 8, contents: "ABCDEFGH"},
+ {start: 8, end: 18, contents: "IJKLMNOPsq"},
+ {start: 17, end: 20, contents: "qui"},
+ {start: 4, end: 12, contents: "EFGHIJKL"}]
+ ],
+
+ // Test a partial ArrayBufferView
+ [
+ [new Uint8Array(arrayBuffer, 3, 5), blob1, "foo"],
+ [{start: 0, end: 8, contents: "DEFGHsqu"},
+ {start: 8, end: 18, contents: "igglefoo"},
+ {start: 4, end: 12, contents: "Hsquiggl"}]
+ ],
+
+ // Test type coercion of a number
+ [
+ [3, int8View, "foo"],
+ [{start: 0, end: 8, contents: "3ABCDEFG"},
+ {start: 8, end: 18, contents: "HIJKLMNOPf"},
+ {start: 17, end: 21, contents: "foo"},
+ {start: 4, end: 12, contents: "DEFGHIJK"}]
+ ],
+
+ [
+ [(new Uint8Array([0, 255, 0])).buffer,
+ new Blob(['abcd']),
+ 'efgh',
+ 'ijklmnopqrstuvwxyz'],
+ [{start: 1, end: 4, contents: "\uFFFD\u0000a"},
+ {start: 4, end: 8, contents: "bcde"},
+ {start: 8, end: 12, contents: "fghi"},
+ {start: 1, end: 12, contents: "\uFFFD\u0000abcdefghi"}]
+ ]
+ ];
+
+ testData.forEach(function(data, i) {
+ var blobs = data[0];
+ var tests = data[1];
+ tests.forEach(function(expectations, j) {
+ test(function() {
+ var blob = new Blob(blobs);
+ assert_true(blob instanceof Blob);
+ assert_false(blob instanceof File);
+
+ test_blob(function() {
+ return expectations.end === undefined
+ ? blob.slice(expectations.start)
+ : blob.slice(expectations.start, expectations.end);
+ }, {
+ expected: expectations.contents,
+ type: "",
+ desc: "Slicing test: slice (" + i + "," + j + ")."
+ });
+ }, "Slicing test (" + i + "," + j + ").");
+ });
+ });
+}, "Slices");
+
+var invalidTypes = [
+ "\xFF",
+ "te\x09xt/plain",
+ "te\x00xt/plain",
+ "te\x1Fxt/plain",
+ "te\x7Fxt/plain"
+];
+invalidTypes.forEach(function(type) {
+ test_blob(function() {
+ var blob = new Blob(["PASS"]);
+ return blob.slice(0, 4, type);
+ }, {
+ expected: "PASS",
+ type: "",
+ desc: "Invalid contentType (" + format_value(type) + ")"
+ });
+});
+
+var validTypes = [
+ "te(xt/plain",
+ "te)xt/plain",
+ "te<xt/plain",
+ "te>xt/plain",
+ "te@xt/plain",
+ "te,xt/plain",
+ "te;xt/plain",
+ "te:xt/plain",
+ "te\\xt/plain",
+ "te\"xt/plain",
+ "te/xt/plain",
+ "te[xt/plain",
+ "te]xt/plain",
+ "te?xt/plain",
+ "te=xt/plain",
+ "te{xt/plain",
+ "te}xt/plain",
+ "te\x20xt/plain",
+ "TEXT/PLAIN",
+ "text/plain;charset = UTF-8",
+ "text/plain;charset=UTF-8"
+];
+validTypes.forEach(function(type) {
+ test_blob(function() {
+ var blob = new Blob(["PASS"]);
+ return blob.slice(0, 4, type);
+ }, {
+ expected: "PASS",
+ type: type.toLowerCase(),
+ desc: "Valid contentType (" + format_value(type) + ")"
+ });
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+
+PASS no-argument Blob slice
+PASS Slices
+PASS blob1.
+PASS blob2.
+PASS null type Blob slice
+PASS undefined type Blob slice
+PASS no type Blob slice
+PASS Slicing test (0,0).
+PASS Slicing test: slice (0,0).
+PASS Slicing test (0,1).
+PASS Slicing test: slice (0,1).
+PASS Slicing test (0,2).
+PASS Slicing test: slice (0,2).
+PASS Slicing test (0,3).
+PASS Slicing test: slice (0,3).
+PASS Slicing test (0,4).
+PASS Slicing test: slice (0,4).
+PASS Slicing test (0,5).
+PASS Slicing test: slice (0,5).
+PASS Slicing test (0,6).
+PASS Slicing test: slice (0,6).
+PASS Slicing test (0,7).
+PASS Slicing test: slice (0,7).
+PASS Slicing test (0,8).
+PASS Slicing test: slice (0,8).
+PASS Slicing test (1,0).
+PASS Slicing test: slice (1,0).
+PASS Slicing test (1,1).
+PASS Slicing test: slice (1,1).
+PASS Slicing test (1,2).
+PASS Slicing test: slice (1,2).
+PASS Slicing test (1,3).
+PASS Slicing test: slice (1,3).
+PASS Slicing test (1,4).
+PASS Slicing test: slice (1,4).
+PASS Slicing test (1,5).
+PASS Slicing test: slice (1,5).
+PASS Slicing test (1,6).
+PASS Slicing test: slice (1,6).
+PASS Slicing test (1,7).
+PASS Slicing test: slice (1,7).
+PASS Slicing test (2,0).
+PASS Slicing test: slice (2,0).
+PASS Slicing test (2,1).
+PASS Slicing test: slice (2,1).
+PASS Slicing test (2,2).
+PASS Slicing test: slice (2,2).
+PASS Slicing test (2,3).
+PASS Slicing test: slice (2,3).
+PASS Slicing test (3,0).
+PASS Slicing test: slice (3,0).
+PASS Slicing test (3,1).
+PASS Slicing test: slice (3,1).
+PASS Slicing test (3,2).
+PASS Slicing test: slice (3,2).
+PASS Slicing test (3,3).
+PASS Slicing test: slice (3,3).
+PASS Slicing test (3,4).
+PASS Slicing test: slice (3,4).
+PASS Slicing test (3,5).
+PASS Slicing test: slice (3,5).
+PASS Slicing test (4,0).
+PASS Slicing test: slice (4,0).
+PASS Slicing test (4,1).
+PASS Slicing test: slice (4,1).
+PASS Slicing test (4,2).
+PASS Slicing test: slice (4,2).
+PASS Slicing test (4,3).
+PASS Slicing test: slice (4,3).
+PASS Slicing test (4,4).
+PASS Slicing test: slice (4,4).
+PASS Slicing test (5,0).
+PASS Slicing test: slice (5,0).
+PASS Slicing test (5,1).
+PASS Slicing test: slice (5,1).
+PASS Slicing test (5,2).
+PASS Slicing test: slice (5,2).
+PASS Slicing test (5,3).
+PASS Slicing test: slice (5,3).
+PASS Slicing test (6,0).
+PASS Slicing test: slice (6,0).
+PASS Slicing test (6,1).
+PASS Slicing test: slice (6,1).
+PASS Slicing test (6,2).
+PASS Slicing test: slice (6,2).
+PASS Slicing test (7,0).
+PASS Slicing test: slice (7,0).
+PASS Slicing test (7,1).
+PASS Slicing test: slice (7,1).
+PASS Slicing test (7,2).
+PASS Slicing test: slice (7,2).
+PASS Slicing test (7,3).
+PASS Slicing test: slice (7,3).
+PASS Slicing test (8,0).
+PASS Slicing test: slice (8,0).
+PASS Slicing test (8,1).
+PASS Slicing test: slice (8,1).
+PASS Slicing test (8,2).
+PASS Slicing test: slice (8,2).
+PASS Slicing test (8,3).
+PASS Slicing test: slice (8,3).
+PASS Invalid contentType ("ÿ")
+PASS Invalid contentType ("te\txt/plain")
+PASS Invalid contentType ("te\0xt/plain")
+PASS Invalid contentType ("te\x1fxt/plain")
+PASS Invalid contentType ("text/plain")
+PASS Valid contentType ("te(xt/plain")
+PASS Valid contentType ("te)xt/plain")
+PASS Valid contentType ("te<xt/plain")
+PASS Valid contentType ("te>xt/plain")
+PASS Valid contentType ("te@xt/plain")
+PASS Valid contentType ("te,xt/plain")
+PASS Valid contentType ("te;xt/plain")
+PASS Valid contentType ("te:xt/plain")
+PASS Valid contentType ("te\\xt/plain")
+PASS Valid contentType ("te\"xt/plain")
+PASS Valid contentType ("te/xt/plain")
+PASS Valid contentType ("te[xt/plain")
+PASS Valid contentType ("te]xt/plain")
+PASS Valid contentType ("te?xt/plain")
+PASS Valid contentType ("te=xt/plain")
+PASS Valid contentType ("te{xt/plain")
+PASS Valid contentType ("te}xt/plain")
+PASS Valid contentType ("te xt/plain")
+PASS Valid contentType ("TEXT/PLAIN")
+PASS Valid contentType ("text/plain;charset = UTF-8")
+PASS Valid contentType ("text/plain;charset=UTF-8")
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobsliceanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobslicehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,238 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>Blob slice</title>
-<link rel=help href="https://w3c.github.io/FileAPI/#slice-method-algo">
-<link rel=author title="Saurabh Anand" href="mailto:saurabhanandiit@gmail.com">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="../support/Blob.js"></script>
-<div id="log"></div>
-<script>
-test_blob(function() {
- var blobTemp = new Blob(["PASS"]);
- return blobTemp.slice();
-}, {
- expected: "PASS",
- type: "",
- desc: "no-argument Blob slice"
-});
-
-test(function() {
- var blob1, blob2;
-
- test_blob(function() {
- return blob1 = new Blob(["squiggle"]);
- }, {
- expected: "squiggle",
- type: "",
- desc: "blob1."
- });
-
- test_blob(function() {
- return blob2 = new Blob(["steak"], {type: "content/type"});
- }, {
- expected: "steak",
- type: "content/type",
- desc: "blob2."
- });
-
- test_blob(function() {
- return new Blob().slice(0,0,null);
- }, {
- expected: "",
- type: "null",
- desc: "null type Blob slice"
- });
-
- test_blob(function() {
- return new Blob().slice(0,0,undefined);
- }, {
- expected: "",
- type: "",
- desc: "undefined type Blob slice"
- });
-
- test_blob(function() {
- return new Blob().slice(0,0);
- }, {
- expected: "",
- type: "",
- desc: "no type Blob slice"
- });
-
- var arrayBuffer = new ArrayBuffer(16);
- var int8View = new Int8Array(arrayBuffer);
- for (var i = 0; i < 16; i++) {
- int8View[i] = i + 65;
- }
-
- var testData = [
- [
- ["PASSSTRING"],
- [{start: -6, contents: "STRING"},
- {start: -12, contents: "PASSSTRING"},
- {start: 4, contents: "STRING"},
- {start: 12, contents: ""},
- {start: 0, end: -6, contents: "PASS"},
- {start: 0, end: -12, contents: ""},
- {start: 0, end: 4, contents: "PASS"},
- {start: 0, end: 12, contents: "PASSSTRING"},
- {start: 7, end: 4, contents: ""}]
- ],
-
- // Test 3 strings
- [
- ["foo", "bar", "baz"],
- [{start: 0, end: 9, contents: "foobarbaz"},
- {start: 0, end: 3, contents: "foo"},
- {start: 3, end: 9, contents: "barbaz"},
- {start: 6, end: 9, contents: "baz"},
- {start: 6, end: 12, contents: "baz"},
- {start: 0, end: 9, contents: "foobarbaz"},
- {start: 0, end: 11, contents: "foobarbaz"},
- {start: 10, end: 15, contents: ""}]
- ],
-
- // Test string, Blob, string
- [
- ["foo", blob1, "baz"],
- [{start: 0, end: 3, contents: "foo"},
- {start: 3, end: 11, contents: "squiggle"},
- {start: 2, end: 4, contents: "os"},
- {start: 10, end: 12, contents: "eb"}]
- ],
-
- // Test blob, string, blob
- [
- [blob1, "foo", blob1],
- [{start: 0, end: 8, contents: "squiggle"},
- {start: 7, end: 9, contents: "ef"},
- {start: 10, end: 12, contents: "os"},
- {start: 1, end: 4, contents: "qui"},
- {start: 12, end: 15, contents: "qui"},
- {start: 40, end: 60, contents: ""}]
- ],
-
- // Test blobs all the way down
- [
- [blob2, blob1, blob2],
- [{start: 0, end: 5, contents: "steak"},
- {start: 5, end: 13, contents: "squiggle"},
- {start: 13, end: 18, contents: "steak"},
- {start: 1, end: 3, contents: "te"},
- {start: 6, end: 10, contents: "quig"}]
- ],
-
- // Test an ArrayBufferView
- [
- [int8View, blob1, "foo"],
- [{start: 0, end: 8, contents: "ABCDEFGH"},
- {start: 8, end: 18, contents: "IJKLMNOPsq"},
- {start: 17, end: 20, contents: "qui"},
- {start: 4, end: 12, contents: "EFGHIJKL"}]
- ],
-
- // Test a partial ArrayBufferView
- [
- [new Uint8Array(arrayBuffer, 3, 5), blob1, "foo"],
- [{start: 0, end: 8, contents: "DEFGHsqu"},
- {start: 8, end: 18, contents: "igglefoo"},
- {start: 4, end: 12, contents: "Hsquiggl"}]
- ],
-
- // Test type coercion of a number
- [
- [3, int8View, "foo"],
- [{start: 0, end: 8, contents: "3ABCDEFG"},
- {start: 8, end: 18, contents: "HIJKLMNOPf"},
- {start: 17, end: 21, contents: "foo"},
- {start: 4, end: 12, contents: "DEFGHIJK"}]
- ],
-
- [
- [(new Uint8Array([0, 255, 0])).buffer,
- new Blob(['abcd']),
- 'efgh',
- 'ijklmnopqrstuvwxyz'],
- [{start: 1, end: 4, contents: "\uFFFD\u0000a"},
- {start: 4, end: 8, contents: "bcde"},
- {start: 8, end: 12, contents: "fghi"},
- {start: 1, end: 12, contents: "\uFFFD\u0000abcdefghi"}]
- ]
- ];
-
- testData.forEach(function(data, i) {
- var blobs = data[0];
- var tests = data[1];
- tests.forEach(function(expectations, j) {
- test(function() {
- var blob = new Blob(blobs);
- assert_true(blob instanceof Blob);
- assert_false(blob instanceof File);
-
- test_blob(function() {
- return expectations.end === undefined
- ? blob.slice(expectations.start)
- : blob.slice(expectations.start, expectations.end);
- }, {
- expected: expectations.contents,
- type: "",
- desc: "Slicing test: slice (" + i + "," + j + ")."
- });
- }, "Slicing test (" + i + "," + j + ").");
- });
- });
-}, "Slices");
-
-var invalidTypes = [
- "\xFF",
- "te\x09xt/plain",
- "te\x00xt/plain",
- "te\x1Fxt/plain",
- "te\x7Fxt/plain"
-];
-invalidTypes.forEach(function(type) {
- test_blob(function() {
- var blob = new Blob(["PASS"]);
- return blob.slice(0, 4, type);
- }, {
- expected: "PASS",
- type: "",
- desc: "Invalid contentType (" + format_value(type) + ")"
- });
-});
-
-var validTypes = [
- "te(xt/plain",
- "te)xt/plain",
- "te<xt/plain",
- "te>xt/plain",
- "te@xt/plain",
- "te,xt/plain",
- "te;xt/plain",
- "te:xt/plain",
- "te\\xt/plain",
- "te\"xt/plain",
- "te/xt/plain",
- "te[xt/plain",
- "te]xt/plain",
- "te?xt/plain",
- "te=xt/plain",
- "te{xt/plain",
- "te}xt/plain",
- "te\x20xt/plain",
- "TEXT/PLAIN",
- "text/plain;charset = UTF-8",
- "text/plain;charset=UTF-8"
-];
-validTypes.forEach(function(type) {
- test_blob(function() {
- var blob = new Blob(["PASS"]);
- return blob.slice(0, 4, type);
- }, {
- expected: "PASS",
- type: type.toLowerCase(),
- desc: "Valid contentType (" + format_value(type) + ")"
- });
-});
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobBlobstreamanyjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-stream.any.js (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-stream.any.js 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-stream.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -3,15 +3,25 @@
</span><span class="cx"> // META: script=../../streams/resources/test-utils.js
</span><span class="cx"> 'use strict';
</span><span class="cx">
</span><ins>+// Helper function that triggers garbage collection while reading a chunk
+// if perform_gc is true.
+async function read_and_gc(reader, perform_gc) {
+ const read_promise = reader.read();
+ if (perform_gc)
+ garbageCollect();
+ return read_promise;
+}
+
</ins><span class="cx"> // Takes in a ReadableStream and reads from it until it is done, returning
</span><del>-// an array that contains the results of each read operation
-async function read_all_chunks(stream) {
</del><ins>+// an array that contains the results of each read operation. If perform_gc
+// is true, garbage collection is triggered while reading every chunk.
+async function read_all_chunks(stream, perform_gc = false) {
</ins><span class="cx"> assert_true(stream instanceof ReadableStream);
</span><span class="cx"> assert_true('getReader' in stream);
</span><span class="cx"> const reader = stream.getReader();
</span><span class="cx">
</span><span class="cx"> assert_true('read' in reader);
</span><del>- let read_value = await reader.read();
</del><ins>+ let read_value = await read_and_gc(reader, perform_gc);
</ins><span class="cx">
</span><span class="cx"> let out = [];
</span><span class="cx"> let i = 0;
</span><span class="lines">@@ -19,7 +29,7 @@
</span><span class="cx"> for (let val of read_value.value) {
</span><span class="cx"> out[i++] = val;
</span><span class="cx"> }
</span><del>- read_value = await reader.read();
</del><ins>+ read_value = await read_and_gc(reader, perform_gc);
</ins><span class="cx"> }
</span><span class="cx"> return out;
</span><span class="cx"> }
</span><span class="lines">@@ -56,7 +66,7 @@
</span><span class="cx"> const stream = blob.stream();
</span><span class="cx"> blob = null;
</span><span class="cx"> garbageCollect();
</span><del>- const chunks = await read_all_chunks(stream);
</del><ins>+ const chunks = await read_all_chunks(stream, /*perform_gc=*/true);
</ins><span class="cx"> assert_array_equals(chunks, input_arr);
</span><span class="cx"> }, "Blob.stream() garbage collection of blob shouldn't break stream" +
</span><span class="cx"> "consumption")
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIblobw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/w3c-import.log (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/w3c-import.log 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/w3c-import.log 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -15,10 +15,11 @@
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-dom.window.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-endings.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.any.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-in-worker.worker.js
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice.any.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-stream.any.js
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-text.any.js
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+
+PASS File interface object exists
+PASS Required arguments
+PASS empty fileBits
+PASS DOMString fileBits
+PASS Unicode DOMString fileBits
+PASS String object fileBits
+PASS Empty Blob fileBits
+PASS Blob fileBits
+PASS Empty File fileBits
+PASS File fileBits
+PASS ArrayBuffer fileBits
+PASS Typed array fileBits
+PASS Various fileBits
+PASS Number in fileBits
+PASS Array in fileBits
+PASS Object in fileBits
+PASS HTMLBodyElement in fileBits
+PASS Object with toString in fileBits
+PASS Custom @@iterator
+PASS Invalid bits argument: "hello"
+PASS Invalid bits argument: 0
+PASS Invalid bits argument: null
+PASS Bits argument: object that throws
+PASS Using fileName
+PASS No replacement when using special character in fileName
+PASS Using null fileName
+PASS Using number fileName
+PASS Using empty string fileName
+PASS Using object fileName
+PASS Using type in File constructor: text/plain
+PASS Using type in File constructor: text/plain;charset=UTF-8
+PASS Using type in File constructor: TEXT/PLAIN
+PASS Using type in File constructor: 𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫
+PASS Using type in File constructor: ascii/nonprintable
+PASS Using type in File constructor: ascii/nonprintable
+PASS Using type in File constructor: nonasciiî
+PASS Using type in File constructor: nonasciiሴ
+PASS Using type in File constructor: nonparsable
+PASS Using lastModified
+PASS Misusing name
+PASS Unknown properties are ignored
+PASS Invalid property bag: 123
+PASS Invalid property bag: 123.4
+PASS Invalid property bag: true
+PASS Invalid property bag: "abc"
+PASS Unusual but valid property bag: null
+PASS Unusual but valid property bag: undefined
+PASS Unusual but valid property bag: 1,2,3
+PASS Unusual but valid property bag: /regex/
+PASS Unusual but valid property bag: function () {}
+PASS Property bag propagates exceptions
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructorhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,151 @@
</span><ins>+// 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 globalThis, "globalThis should have a File property.");
+}, "File interface object exists");
+
+test(t => {
+ assert_throws_js(TypeError, () => new File(),
+ 'Bits argument is required');
+ assert_throws_js(TypeError, () => new File([]),
+ 'Name argument is required');
+}, 'Required arguments');
+
+function test_first_argument(arg1, expectedSize, testName) {
+ test(function() {
+ var file = new File(arg1, "dummy");
+ assert_true(file instanceof File);
+ assert_equals(file.name, "dummy");
+ assert_equals(file.size, expectedSize);
+ assert_equals(file.type, "");
+ // assert_false(file.isClosed); XXX: File.isClosed doesn't seem to be implemented
+ assert_not_equals(file.lastModified, "");
+ }, testName);
+}
+
+test_first_argument([], 0, "empty fileBits");
+test_first_argument(["bits"], 4, "DOMString fileBits");
+test_first_argument(["𝓽𝓮𝔁𝓽"], 16, "Unicode DOMString fileBits");
+test_first_argument([new String('string object')], 13, "String object fileBits");
+test_first_argument([new Blob()], 0, "Empty Blob fileBits");
+test_first_argument([new Blob(["bits"])], 4, "Blob fileBits");
+test_first_argument([new File([], 'world.txt')], 0, "Empty File fileBits");
+test_first_argument([new File(["bits"], 'world.txt')], 4, "File fileBits");
+test_first_argument([new ArrayBuffer(8)], 8, "ArrayBuffer fileBits");
+test_first_argument([new Uint8Array([0x50, 0x41, 0x53, 0x53])], 4, "Typed array fileBits");
+test_first_argument(["bits", new Blob(["bits"]), new Blob(), new Uint8Array([0x50, 0x41]),
+ new Uint16Array([0x5353]), new Uint32Array([0x53534150])], 16, "Various fileBits");
+test_first_argument([12], 2, "Number in fileBits");
+test_first_argument([[1,2,3]], 5, "Array in fileBits");
+test_first_argument([{}], 15, "Object in fileBits"); // "[object Object]"
+test_first_argument([document.body], 24, "HTMLBodyElement in fileBits"); // "[object HTMLBodyElement]"
+test_first_argument([to_string_obj], 8, "Object with toString in fileBits");
+test_first_argument({[Symbol.iterator]() {
+ let i = 0;
+ return {next: () => [
+ {done:false, value:'ab'},
+ {done:false, value:'cde'},
+ {done:true}
+ ][i++]};
+}}, 5, 'Custom @@iterator');
+
+[
+ 'hello',
+ 0,
+ null
+].forEach(arg => {
+ test(t => {
+ assert_throws_js(TypeError, () => new File(arg, 'world.html'),
+ 'Constructor should throw for invalid bits argument');
+ }, `Invalid bits argument: ${JSON.stringify(arg)}`);
+});
+
+test(t => {
+ assert_throws_js(Error, () => new File([to_string_throws], 'name.txt'),
+ 'Constructor should propagate exceptions');
+}, 'Bits argument: object that throws');
+
+
+function test_second_argument(arg2, expectedFileName, testName) {
+ test(function() {
+ var file = new File(["bits"], arg2);
+ assert_true(file instanceof File);
+ assert_equals(file.name, expectedFileName);
+ }, testName);
+}
+
+test_second_argument("dummy", "dummy", "Using fileName");
+test_second_argument("dummy/foo", "dummy/foo",
+ "No replacement when using special character in fileName");
+test_second_argument(null, "null", "Using null fileName");
+test_second_argument(1, "1", "Using number fileName");
+test_second_argument('', '', "Using empty string fileName");
+test_second_argument(document.body, '[object HTMLBodyElement]', "Using object fileName");
+
+// testing the third argument
+[
+ {type: 'text/plain', expected: 'text/plain'},
+ {type: 'text/plain;charset=UTF-8', expected: 'text/plain;charset=utf-8'},
+ {type: 'TEXT/PLAIN', expected: 'text/plain'},
+ {type: '𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫', expected: ''},
+ {type: 'ascii/nonprintable\u001F', expected: ''},
+ {type: 'ascii/nonprintable\u007F', expected: ''},
+ {type: 'nonascii\u00EE', expected: ''},
+ {type: 'nonascii\u1234', expected: ''},
+ {type: 'nonparsable', expected: 'nonparsable'}
+].forEach(testCase => {
+ test(t => {
+ var file = new File(["bits"], "dummy", { type: testCase.type});
+ assert_true(file instanceof File);
+ assert_equals(file.type, testCase.expected);
+ }, `Using type in File constructor: ${testCase.type}`);
+});
+test(function() {
+ var file = new File(["bits"], "dummy", { lastModified: 42 });
+ assert_true(file instanceof File);
+ assert_equals(file.lastModified, 42);
+}, "Using lastModified");
+test(function() {
+ var file = new File(["bits"], "dummy", { name: "foo" });
+ assert_true(file instanceof File);
+ assert_equals(file.name, "dummy");
+}, "Misusing name");
+test(function() {
+ var file = new File(["bits"], "dummy", { unknownKey: "value" });
+ assert_true(file instanceof File);
+ assert_equals(file.name, "dummy");
+}, "Unknown properties are ignored");
+
+[
+ 123,
+ 123.4,
+ true,
+ 'abc'
+].forEach(arg => {
+ test(t => {
+ assert_throws_js(TypeError, () => new File(['bits'], 'name.txt', arg),
+ 'Constructor should throw for invalid property bag type');
+ }, `Invalid property bag: ${JSON.stringify(arg)}`);
+});
+
+[
+ null,
+ undefined,
+ [1,2,3],
+ /regex/,
+ function() {}
+].forEach(arg => {
+ test(t => {
+ assert_equals(new File(['bits'], 'name.txt', arg).size, 4,
+ 'Constructor should accept object-ish property bag type');
+ }, `Unusual but valid property bag: ${arg}`);
+});
+
+test(t => {
+ assert_throws_js(Error,
+ () => new File(['bits'], 'name.txt', {type: to_string_throws}),
+ 'Constructor should propagate exceptions');
+}, 'Property bag propagates exceptions');
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+CONSOLE MESSAGE: ReferenceError: Can't find variable: document
+
+Harness Error (FAIL), message = ReferenceError: Can't find variable: document
+
+PASS File interface object exists
+PASS Required arguments
+PASS empty fileBits
+PASS DOMString fileBits
+PASS Unicode DOMString fileBits
+PASS String object fileBits
+PASS Empty Blob fileBits
+PASS Blob fileBits
+PASS Empty File fileBits
+PASS File fileBits
+PASS ArrayBuffer fileBits
+PASS Typed array fileBits
+PASS Various fileBits
+PASS Number in fileBits
+PASS Array in fileBits
+PASS Object in fileBits
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructoranyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileFileconstructorhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,159 +0,0 @@
</span><del>-<!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>
-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.");
-}, "File interface object exists");
-
-test(t => {
- assert_throws_js(TypeError, () => new File(),
- 'Bits argument is required');
- assert_throws_js(TypeError, () => new File([]),
- 'Name argument is required');
-}, 'Required arguments');
-
-function test_first_argument(arg1, expectedSize, testName) {
- test(function() {
- var file = new File(arg1, "dummy");
- assert_true(file instanceof File);
- assert_equals(file.name, "dummy");
- assert_equals(file.size, expectedSize);
- assert_equals(file.type, "");
- // assert_false(file.isClosed); XXX: File.isClosed doesn't seem to be implemented
- assert_not_equals(file.lastModified, "");
- }, testName);
-}
-
-test_first_argument([], 0, "empty fileBits");
-test_first_argument(["bits"], 4, "DOMString fileBits");
-test_first_argument(["𝓽𝓮𝔁𝓽"], 16, "Unicode DOMString fileBits");
-test_first_argument([new String('string object')], 13, "String object fileBits");
-test_first_argument([new Blob()], 0, "Empty Blob fileBits");
-test_first_argument([new Blob(["bits"])], 4, "Blob fileBits");
-test_first_argument([new File([], 'world.txt')], 0, "Empty File fileBits");
-test_first_argument([new File(["bits"], 'world.txt')], 4, "File fileBits");
-test_first_argument([new ArrayBuffer(8)], 8, "ArrayBuffer fileBits");
-test_first_argument([new Uint8Array([0x50, 0x41, 0x53, 0x53])], 4, "Typed array fileBits");
-test_first_argument(["bits", new Blob(["bits"]), new Blob(), new Uint8Array([0x50, 0x41]),
- new Uint16Array([0x5353]), new Uint32Array([0x53534150])], 16, "Various fileBits");
-test_first_argument([12], 2, "Number in fileBits");
-test_first_argument([[1,2,3]], 5, "Array in fileBits");
-test_first_argument([{}], 15, "Object in fileBits"); // "[object Object]"
-test_first_argument([document.body], 24, "HTMLBodyElement in fileBits"); // "[object HTMLBodyElement]"
-test_first_argument([to_string_obj], 8, "Object with toString in fileBits");
-test_first_argument({[Symbol.iterator]() {
- let i = 0;
- return {next: () => [
- {done:false, value:'ab'},
- {done:false, value:'cde'},
- {done:true}
- ][i++]};
-}}, 5, 'Custom @@iterator');
-
-[
- 'hello',
- 0,
- null
-].forEach(arg => {
- test(t => {
- assert_throws_js(TypeError, () => new File(arg, 'world.html'),
- 'Constructor should throw for invalid bits argument');
- }, `Invalid bits argument: ${JSON.stringify(arg)}`);
-});
-
-test(t => {
- assert_throws_js(Error, () => new File([to_string_throws], 'name.txt'),
- 'Constructor should propagate exceptions');
-}, 'Bits argument: object that throws');
-
-
-function test_second_argument(arg2, expectedFileName, testName) {
- test(function() {
- var file = new File(["bits"], arg2);
- assert_true(file instanceof File);
- assert_equals(file.name, expectedFileName);
- }, testName);
-}
-
-test_second_argument("dummy", "dummy", "Using fileName");
-test_second_argument("dummy/foo", "dummy/foo",
- "No replacement when using special character in fileName");
-test_second_argument(null, "null", "Using null fileName");
-test_second_argument(1, "1", "Using number fileName");
-test_second_argument('', '', "Using empty string fileName");
-test_second_argument(document.body, '[object HTMLBodyElement]', "Using object fileName");
-
-// testing the third argument
-[
- {type: 'text/plain', expected: 'text/plain'},
- {type: 'text/plain;charset=UTF-8', expected: 'text/plain;charset=utf-8'},
- {type: 'TEXT/PLAIN', expected: 'text/plain'},
- {type: '𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫', expected: ''},
- {type: 'ascii/nonprintable\u001F', expected: ''},
- {type: 'ascii/nonprintable\u007F', expected: ''},
- {type: 'nonascii\u00EE', expected: ''},
- {type: 'nonascii\u1234', expected: ''},
- {type: 'nonparsable', expected: 'nonparsable'}
-].forEach(testCase => {
- test(t => {
- var file = new File(["bits"], "dummy", { type: testCase.type});
- assert_true(file instanceof File);
- assert_equals(file.type, testCase.expected);
- }, `Using type in File constructor: ${testCase.type}`);
-});
-test(function() {
- var file = new File(["bits"], "dummy", { lastModified: 42 });
- assert_true(file instanceof File);
- assert_equals(file.lastModified, 42);
-}, "Using lastModified");
-test(function() {
- var file = new File(["bits"], "dummy", { name: "foo" });
- assert_true(file instanceof File);
- assert_equals(file.name, "dummy");
-}, "Misusing name");
-test(function() {
- var file = new File(["bits"], "dummy", { unknownKey: "value" });
- assert_true(file instanceof File);
- assert_equals(file.name, "dummy");
-}, "Unknown properties are ignored");
-
-[
- 123,
- 123.4,
- true,
- 'abc'
-].forEach(arg => {
- test(t => {
- assert_throws_js(TypeError, () => new File(['bits'], 'name.txt', arg),
- 'Constructor should throw for invalid property bag type');
- }, `Invalid property bag: ${JSON.stringify(arg)}`);
-});
-
-[
- null,
- undefined,
- [1,2,3],
- /regex/,
- function() {}
-].forEach(arg => {
- test(t => {
- assert_equals(new File(['bits'], 'name.txt', arg).size, 4,
- 'Constructor should accept object-ish property bag type');
- }, `Unusual but valid property bag: ${arg}`);
-});
-
-test(t => {
- assert_throws_js(Error,
- () => new File(['bits'], 'name.txt', {type: to_string_throws}),
- 'Constructor should propagate exceptions');
-}, 'Property bag propagates exceptions');
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileresourcesechocontentescapedpy"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/resources/echo-content-escaped.py (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/resources/echo-content-escaped.py 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/resources/echo-content-escaped.py 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -5,6 +5,8 @@
</span><span class="cx"> # As a convenience, CRLF newlines are left as is.
</span><span class="cx">
</span><span class="cx"> def escape_byte(byte):
</span><ins>+ # Convert int byte into a single-char binary string.
+ byte = bytes([byte])
</ins><span class="cx"> if b"\0" <= byte <= b"\x1F" or byte >= b"\x7F":
</span><span class="cx"> return b"\\x%02x" % ord(byte)
</span><span class="cx"> if byte == b"\\":
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformcontrolstentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,17 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form-NUL-[\0].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-BS-[].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-VT-[].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-LF-[
-].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-LF-CR-[
-\r].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-CR-[\r].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-CR-LF-[\r
-].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-HT-[ ].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-FF-[].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-DEL-[].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-ESC-[].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-SPACE-[ ].txt (ASCII) in UTF-8 form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformcontrolstentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,117 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8" />
-<title>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-form-helper.js"></script>
-<script>
- "use strict";
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-NUL-[\0].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-NUL-[\0].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-BS-[\b].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-BS-[\b].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-VT-[\v].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-VT-[\v].txt",
- });
-
- // These have characters that undergo processing in name=,
- // filename=, and/or value; formPostFileUploadTest postprocesses
- // expectedEncodedBaseName for these internally.
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LF-[\n].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-LF-[\n].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LF-CR-[\n\r].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-LF-CR-[\n\r].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-CR-[\r].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-CR-[\r].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-CR-LF-[\r\n].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-CR-LF-[\r\n].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-HT-[\t].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-HT-[\t].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-FF-[\f].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-FF-[\f].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-DEL-[\x7F].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-DEL-[\x7F].txt",
- });
-
- // The rest should be passed through unmodified:
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-ESC-[\x1B].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-ESC-[\x1B].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-SPACE-[ ].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-SPACE-[ ].txt",
- });
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformiso2022jptentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form.txt (ASCII) in ISO-2022-JP form
-PASS Upload file-for-upload-in-form-.txt (x-user-defined) in ISO-2022-JP form
-PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in ISO-2022-JP form
-PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in ISO-2022-JP form
-PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in ISO-2022-JP form
-PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in ISO-2022-JP form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformiso2022jptentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Upload files in ISO-2022-JP form (tentative)</title>
-<!--
- NOTE: This test is tentative because encoding for filename
- characters unrepresentable in the form charset is not yet
- standardized.
- -->
-<link rel="help"
- href="https://github.com/whatwg/html/issues/3223">
-<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-form-helper.js"></script>
-<script>
-'use strict';
-
-formPostFileUploadTest({
- fileNameSource: 'ASCII',
- fileBaseName: 'file-for-upload-in-form.txt',
- formEncoding: 'ISO-2022-JP',
- expectedEncodedBaseName: 'file-for-upload-in-form.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'x-user-defined',
- fileBaseName: 'file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt',
- formEncoding: 'ISO-2022-JP',
- expectedEncodedBaseName: (
- 'file-for-upload-in-form-.txt'),
-});
-
-formPostFileUploadTest({
- fileNameSource: 'windows-1252',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'ISO-2022-JP',
- expectedEncodedBaseName: (
- 'file-for-upload-in-form-☺😂.txt'),
-});
-
-formPostFileUploadTest({
- fileNameSource: 'JIS X 0201 and JIS X 0208',
- fileBaseName: 'file-for-upload-in-form-★星★.txt',
- formEncoding: 'ISO-2022-JP',
- expectedEncodedBaseName: 'file-for-upload-in-form-\x1B$B!z@1!z\x1B(B.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'ISO-2022-JP',
- expectedEncodedBaseName: 'file-for-upload-in-form-☺😂.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
- formEncoding: 'ISO-2022-JP',
- expectedEncodedBaseName: `file-for-upload-in-form-${
- kTestFallbackIso2022jp
- }.txt`,
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformpunctuationtentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form-QUOTATION-MARK-["].txt (ASCII) in UTF-8 form
-PASS Upload "file-for-upload-in-form-double-quoted.txt" (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-REVERSE-SOLIDUS-[\].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-EXCLAMATION-MARK-[!].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-DOLLAR-SIGN-[$].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-PERCENT-SIGN-[%].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-AMPERSAND-[&].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-APOSTROPHE-['].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-ASTERISK-[*].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-PLUS-SIGN-[+].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-COMMA-[,].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-FULL-STOP-[.].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-SOLIDUS-[/].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-COLON-[:].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-SEMICOLON-[;].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-EQUALS-SIGN-[=].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-QUESTION-MARK-[?].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-VERTICAL-LINE-[|].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-TILDE-[~].txt (ASCII) in UTF-8 form
-PASS Upload 'file-for-upload-in-form-single-quoted.txt' (ASCII) in UTF-8 form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformpunctuationtentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,230 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8" />
-<title>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-form-helper.js"></script>
-<script>
- "use strict";
-
- // These have characters that undergo processing in name=,
- // filename=, and/or value; formPostFileUploadTest postprocesses
- // expectedEncodedBaseName for these internally.
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-QUOTATION-MARK-[\x22].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-QUOTATION-MARK-[\x22].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: '"file-for-upload-in-form-double-quoted.txt"',
- formEncoding: "UTF-8",
- expectedEncodedBaseName: '"file-for-upload-in-form-double-quoted.txt"',
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt",
- });
-
- // The rest should be passed through unmodified:
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-ASTERISK-[*].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-ASTERISK-[*].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-COMMA-[,].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-COMMA-[,].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-COLON-[:].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-COLON-[:].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName:
- "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-TILDE-[~].txt",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "file-for-upload-in-form-TILDE-[~].txt",
- });
-
- formPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "'file-for-upload-in-form-single-quoted.txt'",
- formEncoding: "UTF-8",
- expectedEncodedBaseName: "'file-for-upload-in-form-single-quoted.txt'",
- });
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformutf8expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form
-PASS Upload file-for-upload-in-form-.txt (x-user-defined) in UTF-8 form
-PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in UTF-8 form
-PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in UTF-8 form
-PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in UTF-8 form
-PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in UTF-8 form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformutf8html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Upload files 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-form-helper.js"></script>
-<script>
-'use strict';
-
-formPostFileUploadTest({
- fileNameSource: 'ASCII',
- fileBaseName: 'file-for-upload-in-form.txt',
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: 'file-for-upload-in-form.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'x-user-defined',
- fileBaseName: 'file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt',
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: (
- 'file-for-upload-in-form-\xEF\x9F\xB0\xEF\x9E\x93\xEF\x9E\x83\xEF\x9E\xA0.txt'),
-});
-
-formPostFileUploadTest({
- fileNameSource: 'windows-1252',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: (
- 'file-for-upload-in-form-\xC3\xA2\xCB\x9C\xC2\xBA\xC3\xB0\xC5\xB8\xCB\x9C\xE2\x80\x9A.txt'),
-});
-
-formPostFileUploadTest({
- fileNameSource: 'JIS X 0201 and JIS X 0208',
- fileBaseName: 'file-for-upload-in-form-★星★.txt',
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: 'file-for-upload-in-form-\xE2\x98\x85\xE6\x98\x9F\xE2\x98\x85.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: 'file-for-upload-in-form-\xE2\x98\xBA\xF0\x9F\x98\x82.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: `file-for-upload-in-form-${kTestFallbackUtf8}.txt`,
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformwindows1252tentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form.txt (ASCII) in windows-1252 form
-PASS Upload file-for-upload-in-form-.txt (x-user-defined) in windows-1252 form
-PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in windows-1252 form
-PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in windows-1252 form
-PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in windows-1252 form
-PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in windows-1252 form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformwindows1252tentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Upload files in Windows-1252 form (tentative)</title>
-<!--
- NOTE: This test is tentative because encoding for filename
- characters unrepresentable in the form charset is not yet
- standardized.
- -->
-<link rel="help"
- href="https://github.com/whatwg/html/issues/3223">
-<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-form-helper.js"></script>
-<script>
-'use strict';
-
-formPostFileUploadTest({
- fileNameSource: 'ASCII',
- fileBaseName: 'file-for-upload-in-form.txt',
- formEncoding: 'windows-1252',
- expectedEncodedBaseName: 'file-for-upload-in-form.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'x-user-defined',
- fileBaseName: 'file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt',
- formEncoding: 'windows-1252',
- expectedEncodedBaseName: 'file-for-upload-in-form-.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'windows-1252',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'windows-1252',
- expectedEncodedBaseName: 'file-for-upload-in-form-\xE2\x98\xBA\xF0\x9F\x98\x82.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'JIS X 0201 and JIS X 0208',
- fileBaseName: 'file-for-upload-in-form-★星★.txt',
- formEncoding: 'windows-1252',
- expectedEncodedBaseName: 'file-for-upload-in-form-★星★.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'windows-1252',
- expectedEncodedBaseName: 'file-for-upload-in-form-☺😂.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
- formEncoding: 'windows-1252',
- expectedEncodedBaseName: `file-for-upload-in-form-${
- kTestFallbackWindows1252
- }.txt`,
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformxuserdefinedtentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,8 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form.txt (ASCII) in x-user-defined form
-PASS Upload file-for-upload-in-form-.txt (x-user-defined) in x-user-defined form
-PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in x-user-defined form
-PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in x-user-defined form
-PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in x-user-defined form
-PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in x-user-defined form
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformxuserdefinedtentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,70 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Upload files in x-user-defined form (tentative)</title>
-<!--
- NOTE: This test is tentative because encoding for filename
- characters unrepresentable in the form charset is not yet
- standardized.
- -->
-<link rel="help"
- href="https://github.com/whatwg/html/issues/3223">
-<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-form-helper.js"></script>
-<script>
-'use strict';
-
-formPostFileUploadTest({
- fileNameSource: 'ASCII',
- fileBaseName: 'file-for-upload-in-form.txt',
- formEncoding: 'x-user-defined',
- expectedEncodedBaseName: 'file-for-upload-in-form.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'x-user-defined',
- fileBaseName: 'file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt',
- formEncoding: 'x-user-defined',
- expectedEncodedBaseName: 'file-for-upload-in-form-\xF0\x93\x83\xA0.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'windows-1252',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'x-user-defined',
- expectedEncodedBaseName: ('file-for-upload-in-form-' +
- '☺😂.txt'),
-});
-
-formPostFileUploadTest({
- fileNameSource: 'JIS X 0201 and JIS X 0208',
- fileBaseName: 'file-for-upload-in-form-★星★.txt',
- formEncoding: 'x-user-defined',
- expectedEncodedBaseName: 'file-for-upload-in-form-★星★.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: 'file-for-upload-in-form-☺😂.txt',
- formEncoding: 'x-user-defined',
- expectedEncodedBaseName: 'file-for-upload-in-form-☺😂.txt',
-});
-
-formPostFileUploadTest({
- fileNameSource: 'Unicode',
- fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
- formEncoding: 'x-user-defined',
- expectedEncodedBaseName: `file-for-upload-in-form-${
- kTestFallbackXUserDefined
- }.txt`,
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>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-form-helper.js"></script>
-<script>
-'use strict';
-
-formPostFileUploadTest({
- fileNameSource: 'ASCII',
- fileBaseName: 'file-for-upload-in-form.txt',
- formEncoding: 'UTF-8',
- expectedEncodedBaseName: 'file-for-upload-in-form.txt',
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+
+PASS Upload file-for-upload-in-form-NUL-[\0].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-BS-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-VT-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LF-[
+].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LF-CR-[
+\r].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-CR-[\r].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-CR-LF-[\r
+].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-HT-[ ].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-FF-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-DEL-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-ESC-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-SPACE-[ ].txt (ASCII) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolstentativehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+// META: title=FormData: FormData: Upload files named using controls
+// META: script=../support/send-file-formdata-helper.js
+ "use strict";
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-NUL-[\0].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-BS-[\b].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-VT-[\v].txt",
+ });
+
+ // These have characters that undergo processing in name=,
+ // filename=, and/or value; formDataPostFileUploadTest postprocesses
+ // expectedEncodedBaseName for these internally.
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LF-[\n].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LF-CR-[\n\r].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-CR-[\r].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-CR-LF-[\r\n].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-HT-[\t].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-FF-[\f].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-DEL-[\x7F].txt",
+ });
+
+ // The rest should be passed through unmodified:
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-ESC-[\x1B].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-SPACE-[ ].txt",
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+
+PASS Upload file-for-upload-in-form-NUL-[\0].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-BS-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-VT-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LF-[
+].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LF-CR-[
+\r].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-CR-[\r].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-CR-LF-[\r
+].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-HT-[ ].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-FF-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-DEL-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-ESC-[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-SPACE-[ ].txt (ASCII) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolsanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolstentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,113 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form-NUL-[\0].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-BS-[].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-VT-[].txt (ASCII) in fetch with FormData
-FAIL Upload file-for-upload-in-form-LF-[
-].txt (ASCII) in fetch with FormData assert_true: Unexpected multipart-shaped form data received:
-------WebKitFormBoundaryaENOOGISYDFoQQnB\r
-Content-Disposition: form-data; name="filename"\r
-\r
-file-for-upload-in-form-LF-[\r
-].txt\r
-------WebKitFormBoundaryaENOOGISYDFoQQnB\r
-Content-Disposition: form-data; name="file-for-upload-in-form-LF-[%0D%0A].txt"\r
-\r
-filename\r
-------WebKitFormBoundaryaENOOGISYDFoQQnB\r
-Content-Disposition: form-data; name="file"; filename="file-for-upload-in-form-LF-[%0A].txt"\r
-Content-Type: text/plain\r
-\r
-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ\r
-------WebKitFormBoundaryaENOOGISYDFoQQnB--\r
-
-Expected:
-------WebKitFormBoundaryaENOOGISYDFoQQnB\r
-Content-Disposition: form-data; name="filename"\r
-\r
-file-for-upload-in-form-LF-[
-].txt\r
-------WebKitFormBoundaryaENOOGISYDFoQQnB\r
-Content-Disposition: form-data; name="file-for-upload-in-form-LF-[%0A].txt"\r
-\r
-filename\r
-------WebKitFormBoundaryaENOOGISYDFoQQnB\r
-Content-Disposition: form-data; name="file"; filename="file-for-upload-in-form-LF-[%0A].txt"\r
-Content-Type: text/plain\r
-\r
-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ\r
-------WebKitFormBoundaryaENOOGISYDFoQQnB-- expected true got false
-FAIL Upload file-for-upload-in-form-LF-CR-[
-\r].txt (ASCII) in fetch with FormData assert_true: Unexpected multipart-shaped form data received:
-------WebKitFormBoundarySBj6CVNc0V8O02He\r
-Content-Disposition: form-data; name="filename"\r
-\r
-file-for-upload-in-form-LF-CR-[\r
-\r
-].txt\r
-------WebKitFormBoundarySBj6CVNc0V8O02He\r
-Content-Disposition: form-data; name="file-for-upload-in-form-LF-CR-[%0D%0A%0D%0A].txt"\r
-\r
-filename\r
-------WebKitFormBoundarySBj6CVNc0V8O02He\r
-Content-Disposition: form-data; name="file"; filename="file-for-upload-in-form-LF-CR-[%0A%0D].txt"\r
-Content-Type: text/plain\r
-\r
-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ\r
-------WebKitFormBoundarySBj6CVNc0V8O02He--\r
-
-Expected:
-------WebKitFormBoundarySBj6CVNc0V8O02He\r
-Content-Disposition: form-data; name="filename"\r
-\r
-file-for-upload-in-form-LF-CR-[
-\r].txt\r
-------WebKitFormBoundarySBj6CVNc0V8O02He\r
-Content-Disposition: form-data; name="file-for-upload-in-form-LF-CR-[%0A%0D].txt"\r
-\r
-filename\r
-------WebKitFormBoundarySBj6CVNc0V8O02He\r
-Content-Disposition: form-data; name="file"; filename="file-for-upload-in-form-LF-CR-[%0A%0D].txt"\r
-Content-Type: text/plain\r
-\r
-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ\r
-------WebKitFormBoundarySBj6CVNc0V8O02He-- expected true got false
-FAIL Upload file-for-upload-in-form-CR-[\r].txt (ASCII) in fetch with FormData assert_true: Unexpected multipart-shaped form data received:
-------WebKitFormBoundary4RtU1kIZIKOZW4LA\r
-Content-Disposition: form-data; name="filename"\r
-\r
-file-for-upload-in-form-CR-[\r
-].txt\r
-------WebKitFormBoundary4RtU1kIZIKOZW4LA\r
-Content-Disposition: form-data; name="file-for-upload-in-form-CR-[%0D%0A].txt"\r
-\r
-filename\r
-------WebKitFormBoundary4RtU1kIZIKOZW4LA\r
-Content-Disposition: form-data; name="file"; filename="file-for-upload-in-form-CR-[%0D].txt"\r
-Content-Type: text/plain\r
-\r
-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ\r
-------WebKitFormBoundary4RtU1kIZIKOZW4LA--\r
-
-Expected:
-------WebKitFormBoundary4RtU1kIZIKOZW4LA\r
-Content-Disposition: form-data; name="filename"\r
-\r
-file-for-upload-in-form-CR-[\r].txt\r
-------WebKitFormBoundary4RtU1kIZIKOZW4LA\r
-Content-Disposition: form-data; name="file-for-upload-in-form-CR-[%0D].txt"\r
-\r
-filename\r
-------WebKitFormBoundary4RtU1kIZIKOZW4LA\r
-Content-Disposition: form-data; name="file"; filename="file-for-upload-in-form-CR-[%0D].txt"\r
-Content-Type: text/plain\r
-\r
-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ\r
-------WebKitFormBoundary4RtU1kIZIKOZW4LA-- expected true got false
-PASS Upload file-for-upload-in-form-CR-LF-[\r
-].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-HT-[ ].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-FF-[].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-DEL-[].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-ESC-[].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-SPACE-[ ].txt (ASCII) in fetch with FormData
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatacontrolstentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,93 +0,0 @@
</span><del>-<!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>
- "use strict";
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-NUL-[\0].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-BS-[\b].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-VT-[\v].txt",
- });
-
- // These have characters that undergo processing in name=,
- // filename=, and/or value; formDataPostFileUploadTest postprocesses
- // expectedEncodedBaseName for these internally.
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LF-[\n].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LF-CR-[\n\r].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-CR-[\r].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-CR-LF-[\r\n].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-HT-[\t].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-FF-[\f].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-DEL-[\x7F].txt",
- });
-
- // The rest should be passed through unmodified:
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-ESC-[\x1B].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-SPACE-[ ].txt",
- });
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyexpectedtxtfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any-expected.txt (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative-expected.txt) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+
+PASS Upload file-for-upload-in-form-QUOTATION-MARK-["].txt (ASCII) in fetch with FormData
+PASS Upload "file-for-upload-in-form-double-quoted.txt" (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-REVERSE-SOLIDUS-[\].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-EXCLAMATION-MARK-[!].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-DOLLAR-SIGN-[$].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-PERCENT-SIGN-[%].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-AMPERSAND-[&].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-APOSTROPHE-['].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-ASTERISK-[*].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-PLUS-SIGN-[+].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-COMMA-[,].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-FULL-STOP-[.].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-SOLIDUS-[/].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-COLON-[:].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-SEMICOLON-[;].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-EQUALS-SIGN-[=].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-QUESTION-MARK-[?].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-VERTICAL-LINE-[|].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-TILDE-[~].txt (ASCII) in fetch with FormData
+PASS Upload 'file-for-upload-in-form-single-quoted.txt' (ASCII) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,144 @@
</span><ins>+// 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=,
+ // filename=, and/or value; formDataPostFileUploadTest postprocesses
+ // expectedEncodedBaseName for these internally.
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-QUOTATION-MARK-[\x22].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: '"file-for-upload-in-form-double-quoted.txt"',
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt",
+ });
+
+ // The rest should be passed through unmodified:
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-ASTERISK-[*].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-COMMA-[,].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-COLON-[:].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form-TILDE-[~].txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "'file-for-upload-in-form-single-quoted.txt'",
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyworkerexpectedtxtfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker-expected.txt (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative-expected.txt) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+
+PASS Upload file-for-upload-in-form-QUOTATION-MARK-["].txt (ASCII) in fetch with FormData
+PASS Upload "file-for-upload-in-form-double-quoted.txt" (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-REVERSE-SOLIDUS-[\].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-EXCLAMATION-MARK-[!].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-DOLLAR-SIGN-[$].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-PERCENT-SIGN-[%].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-AMPERSAND-[&].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-APOSTROPHE-['].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-ASTERISK-[*].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-PLUS-SIGN-[+].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-COMMA-[,].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-FULL-STOP-[.].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-SOLIDUS-[/].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-COLON-[:].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-SEMICOLON-[;].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-EQUALS-SIGN-[=].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-QUESTION-MARK-[?].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-VERTICAL-LINE-[|].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-TILDE-[~].txt (ASCII) in fetch with FormData
+PASS Upload 'file-for-upload-in-form-single-quoted.txt' (ASCII) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative-expected.txt (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative-expected.txt 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-
-PASS Upload file-for-upload-in-form-QUOTATION-MARK-["].txt (ASCII) in fetch with FormData
-PASS Upload "file-for-upload-in-form-double-quoted.txt" (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-REVERSE-SOLIDUS-[\].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-EXCLAMATION-MARK-[!].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-DOLLAR-SIGN-[$].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-PERCENT-SIGN-[%].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-AMPERSAND-[&].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-APOSTROPHE-['].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-ASTERISK-[*].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-PLUS-SIGN-[+].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-COMMA-[,].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-FULL-STOP-[.].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-SOLIDUS-[/].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-COLON-[:].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-SEMICOLON-[;].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-EQUALS-SIGN-[=].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-QUESTION-MARK-[?].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-VERTICAL-LINE-[|].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt (ASCII) in fetch with FormData
-PASS Upload file-for-upload-in-form-TILDE-[~].txt (ASCII) in fetch with FormData
-PASS Upload 'file-for-upload-in-form-single-quoted.txt' (ASCII) in fetch with FormData
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatapunctuationtentativehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,168 +0,0 @@
</span><del>-<!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>
- "use strict";
-
- // These have characters that undergo processing in name=,
- // filename=, and/or value; formDataPostFileUploadTest postprocesses
- // expectedEncodedBaseName for these internally.
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-QUOTATION-MARK-[\x22].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: '"file-for-upload-in-form-double-quoted.txt"',
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt",
- });
-
- // The rest should be passed through unmodified:
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-ASTERISK-[*].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-COMMA-[,].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-COLON-[:].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form-TILDE-[~].txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "'file-for-upload-in-form-single-quoted.txt'",
- });
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyexpectedtxtfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformxuserdefinedtentativeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any-expected.txt (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS Upload file-for-upload-in-form.txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-.txt (x-user-defined) in fetch with FormData
+PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in fetch with FormData
+PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in fetch with FormData
+PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in fetch with FormData
+PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+// META: title=FormData: FormData: Upload files in UTF-8 fetch()
+// META: script=../support/send-file-formdata-helper.js
+ "use strict";
+
+ formDataPostFileUploadTest({
+ fileNameSource: "ASCII",
+ fileBaseName: "file-for-upload-in-form.txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "x-user-defined",
+ fileBaseName: "file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "windows-1252",
+ fileBaseName: "file-for-upload-in-form-☺😂.txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "JIS X 0201 and JIS X 0208",
+ fileBaseName: "file-for-upload-in-form-★星★.txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "Unicode",
+ fileBaseName: "file-for-upload-in-form-☺😂.txt",
+ });
+
+ formDataPostFileUploadTest({
+ fileNameSource: "Unicode",
+ fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyworkerexpectedtxtfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformutf8expectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker-expected.txt (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS Upload file-for-upload-in-form.txt (ASCII) in fetch with FormData
+PASS Upload file-for-upload-in-form-.txt (x-user-defined) in fetch with FormData
+PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in fetch with FormData
+PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in fetch with FormData
+PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in fetch with FormData
+PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8anyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatautf8html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-<!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>
- "use strict";
-
- formDataPostFileUploadTest({
- fileNameSource: "ASCII",
- fileBaseName: "file-for-upload-in-form.txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "x-user-defined",
- fileBaseName: "file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "windows-1252",
- fileBaseName: "file-for-upload-in-form-☺😂.txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "JIS X 0201 and JIS X 0208",
- fileBaseName: "file-for-upload-in-form-★星★.txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "Unicode",
- fileBaseName: "file-for-upload-in-form-☺😂.txt",
- });
-
- formDataPostFileUploadTest({
- fileNameSource: "Unicode",
- fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`,
- });
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Upload file-for-upload-in-form.txt (ASCII) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.js (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+// 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",
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Upload file-for-upload-in-form.txt (ASCII) in fetch with FormData
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdataanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilesendfileformdatahtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-<!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>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfilew3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/w3c-import.log (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/w3c-import.log 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/w3c-import.log 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -15,16 +15,16 @@
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor-endings.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.any.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/Worker-read-file-constructor.worker.js
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.tentative.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-controls.html
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.html
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-punctuation.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.html
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.tentative.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-controls.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-punctuation.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata-utf-8.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-formdata.any.js
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+PASS FileReader interface object
+PASS no-argument FileReader constructor
+PASS FileReader States -- abort
+PASS FileReader States -- events
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.js (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+// META: title=FileReader States
+
+'use strict';
+
+test(function () {
+ assert_true(
+ "FileReader" in globalThis,
+ "globalThis should have a FileReader property.",
+ );
+}, "FileReader interface object");
+
+test(function () {
+ var fileReader = new FileReader();
+ assert_true(fileReader instanceof FileReader);
+}, "no-argument FileReader constructor");
+
+var t_abort = async_test("FileReader States -- abort");
+t_abort.step(function () {
+ var fileReader = new FileReader();
+ assert_equals(fileReader.readyState, 0);
+ assert_equals(fileReader.readyState, FileReader.EMPTY);
+
+ var blob = new Blob();
+ fileReader.readAsArrayBuffer(blob);
+ assert_equals(fileReader.readyState, 1);
+ assert_equals(fileReader.readyState, FileReader.LOADING);
+
+ fileReader.onabort = this.step_func(function (e) {
+ assert_equals(fileReader.readyState, 2);
+ assert_equals(fileReader.readyState, FileReader.DONE);
+ t_abort.done();
+ });
+ fileReader.abort();
+ fileReader.onabort = this.unreached_func("abort event should fire sync");
+});
+
+var t_event = async_test("FileReader States -- events");
+t_event.step(function () {
+ var fileReader = new FileReader();
+
+ var blob = new Blob();
+ fileReader.readAsArrayBuffer(blob);
+
+ fileReader.onloadstart = this.step_func(function (e) {
+ assert_equals(fileReader.readyState, 1);
+ assert_equals(fileReader.readyState, FileReader.LOADING);
+ });
+
+ fileReader.onprogress = this.step_func(function (e) {
+ assert_equals(fileReader.readyState, 1);
+ assert_equals(fileReader.readyState, FileReader.LOADING);
+ });
+
+ fileReader.onloadend = this.step_func(function (e) {
+ assert_equals(fileReader.readyState, 2);
+ assert_equals(fileReader.readyState, FileReader.DONE);
+ t_event.done();
+ });
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+PASS FileReader interface object
+PASS no-argument FileReader constructor
+PASS FileReader States -- abort
+PASS FileReader States -- events
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIfileReaderhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,67 +0,0 @@
</span><del>-<!doctype html>
-<html>
- <head>
- <title>FileReader States</title>
- <link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#dfn-filereader">
- <link rel=author title="Lenient" href="mailto:lenient315@gmail.com">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
- <script>
- test(function() {
- assert_true("FileReader" in window, "window should have a FileReader property.");
- }, "FileReader interface object");
-
- test(function(){
- var fileReader = new FileReader();
- assert_true(fileReader instanceof FileReader);
- }, "no-argument FileReader constructor");
-
- var t_abort = async_test("FileReader States -- abort");
- t_abort.step(function(){
- var fileReader = new FileReader();
- assert_equals(fileReader.readyState, 0);
- assert_equals(fileReader.readyState, FileReader.EMPTY);
-
- var blob = new Blob();
- fileReader.readAsArrayBuffer(blob);
- assert_equals(fileReader.readyState, 1);
- assert_equals(fileReader.readyState, FileReader.LOADING);
-
- fileReader.onabort = this.step_func(function(e) {
- assert_equals(fileReader.readyState, 2);
- assert_equals(fileReader.readyState, FileReader.DONE);
- t_abort.done();
- });
- fileReader.abort();
- fileReader.onabort = this.unreached_func("abort event should fire sync")
- });
-
- var t_event = async_test("FileReader States -- events");
- t_event.step(function(){
- var fileReader = new FileReader();
-
- var blob = new Blob();
- fileReader.readAsArrayBuffer(blob);
-
- fileReader.onloadstart = this.step_func(function(e) {
- assert_equals(fileReader.readyState, 1);
- assert_equals(fileReader.readyState, FileReader.LOADING);
- });
-
- fileReader.onprogress = this.step_func(function(e) {
- assert_equals(fileReader.readyState, 1);
- assert_equals(fileReader.readyState, FileReader.LOADING);
- });
-
- fileReader.onloadend = this.step_func(function(e) {
- assert_equals(fileReader.readyState, 2);
- assert_equals(fileReader.readyState, FileReader.DONE);
- t_event.done();
- });
- });
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS Blob Determing Encoding with encoding argument
+PASS Blob Determing Encoding with type attribute
+PASS Blob Determing Encoding with UTF-8 BOM
+PASS Blob Determing Encoding without anything implying charset.
+PASS Blob Determing Encoding with UTF-16BE BOM
+PASS Blob Determing Encoding with UTF-16LE BOM
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinghtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+// META: title=FileAPI Test: Blob Determining Encoding
+
+var t = async_test("Blob Determing Encoding with encoding argument");
+t.step(function() {
+ // string 'hello'
+ var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
+ var blob = new Blob([new Uint8Array(data)]);
+ var reader = new FileReader();
+
+ reader.onloadend = t.step_func_done (function(event) {
+ assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16BE.")
+ }, reader);
+
+ reader.readAsText(blob, "UTF-16BE");
+});
+
+var t = async_test("Blob Determing Encoding with type attribute");
+t.step(function() {
+ var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
+ var blob = new Blob([new Uint8Array(data)], {type:"text/plain;charset=UTF-16BE"});
+ var reader = new FileReader();
+
+ reader.onloadend = t.step_func_done (function(event) {
+ assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16BE.")
+ }, reader);
+
+ reader.readAsText(blob);
+});
+
+
+var t = async_test("Blob Determing Encoding with UTF-8 BOM");
+t.step(function() {
+ var data = [0xEF,0xBB,0xBF,0x68,0x65,0x6C,0x6C,0xC3,0xB6];
+ var blob = new Blob([new Uint8Array(data)]);
+ var reader = new FileReader();
+
+ reader.onloadend = t.step_func_done (function(event) {
+ assert_equals(this.result, "hellö", "The FileReader should read the blob with UTF-8.");
+ }, reader);
+
+ reader.readAsText(blob);
+});
+
+var t = async_test("Blob Determing Encoding without anything implying charset.");
+t.step(function() {
+ var data = [0x68,0x65,0x6C,0x6C,0xC3,0xB6];
+ var blob = new Blob([new Uint8Array(data)]);
+ var reader = new FileReader();
+
+ reader.onloadend = t.step_func_done (function(event) {
+ assert_equals(this.result, "hellö", "The FileReader should read the blob by default with UTF-8.");
+ }, reader);
+
+ reader.readAsText(blob);
+});
+
+var t = async_test("Blob Determing Encoding with UTF-16BE BOM");
+t.step(function() {
+ var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
+ var blob = new Blob([new Uint8Array(data)]);
+ var reader = new FileReader();
+
+ reader.onloadend = t.step_func_done (function(event) {
+ assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16BE.");
+ }, reader);
+
+ reader.readAsText(blob);
+});
+
+var t = async_test("Blob Determing Encoding with UTF-16LE BOM");
+t.step(function() {
+ var data = [0xFF,0xFE,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F,0x00];
+ var blob = new Blob([new Uint8Array(data)]);
+ var reader = new FileReader();
+
+ reader.onloadend = t.step_func_done (function(event) {
+ assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16LE.");
+ }, reader);
+
+ reader.readAsText(blob);
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS Blob Determing Encoding with encoding argument
+PASS Blob Determing Encoding with type attribute
+PASS Blob Determing Encoding with UTF-8 BOM
+PASS Blob Determing Encoding without anything implying charset.
+PASS Blob Determing Encoding with UTF-16BE BOM
+PASS Blob Determing Encoding with UTF-16LE BOM
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinganyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionDeterminingEncodinghtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,91 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>FileAPI Test: Blob Determining Encoding</title>
-<link ref="author" title="march1993" href="mailto:march511@gmail.com">
-<link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#enctype">
-<link rel=help href="http://encoding.spec.whatwg.org/#decode">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-var t = async_test("Blob Determing Encoding with encoding argument");
-t.step(function() {
- // string 'hello'
- var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
- var blob = new Blob([new Uint8Array(data)]);
- var reader = new FileReader();
-
- reader.onloadend = t.step_func_done (function(event) {
- assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16BE.")
- }, reader);
-
- reader.readAsText(blob, "UTF-16BE");
-});
-
-var t = async_test("Blob Determing Encoding with type attribute");
-t.step(function() {
- var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
- var blob = new Blob([new Uint8Array(data)], {type:"text/plain;charset=UTF-16BE"});
- var reader = new FileReader();
-
- reader.onloadend = t.step_func_done (function(event) {
- assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16BE.")
- }, reader);
-
- reader.readAsText(blob);
-});
-
-
-var t = async_test("Blob Determing Encoding with UTF-8 BOM");
-t.step(function() {
- var data = [0xEF,0xBB,0xBF,0x68,0x65,0x6C,0x6C,0xC3,0xB6];
- var blob = new Blob([new Uint8Array(data)]);
- var reader = new FileReader();
-
- reader.onloadend = t.step_func_done (function(event) {
- assert_equals(this.result, "hellö", "The FileReader should read the blob with UTF-8.");
- }, reader);
-
- reader.readAsText(blob);
-});
-
-var t = async_test("Blob Determing Encoding without anything implying charset.");
-t.step(function() {
- var data = [0x68,0x65,0x6C,0x6C,0xC3,0xB6];
- var blob = new Blob([new Uint8Array(data)]);
- var reader = new FileReader();
-
- reader.onloadend = t.step_func_done (function(event) {
- assert_equals(this.result, "hellö", "The FileReader should read the blob by default with UTF-8.");
- }, reader);
-
- reader.readAsText(blob);
-});
-
-var t = async_test("Blob Determing Encoding with UTF-16BE BOM");
-t.step(function() {
- var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
- var blob = new Blob([new Uint8Array(data)]);
- var reader = new FileReader();
-
- reader.onloadend = t.step_func_done (function(event) {
- assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16BE.");
- }, reader);
-
- reader.readAsText(blob);
-});
-
-var t = async_test("Blob Determing Encoding with UTF-16LE BOM");
-t.step(function() {
- var data = [0xFF,0xFE,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F,0x00];
- var blob = new Blob([new Uint8Array(data)]);
- var reader = new FileReader();
-
- reader.onloadend = t.step_func_done (function(event) {
- assert_equals(this.result, "hello", "The FileReader should read the ArrayBuffer through UTF-16LE.");
- }, reader);
-
- reader.readAsText(blob);
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS FileReader.onloadstart: initial value
+PASS FileReader.onprogress: initial value
+PASS FileReader.onload: initial value
+PASS FileReader.onabort: initial value
+PASS FileReader.onerror: initial value
+PASS FileReader.onloadend: initial value
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributeshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+// META: title=FileReader event handler attributes
+
+var attributes = [
+ "onloadstart",
+ "onprogress",
+ "onload",
+ "onabort",
+ "onerror",
+ "onloadend",
+];
+attributes.forEach(function(a) {
+ test(function() {
+ var reader = new FileReader();
+ assert_equals(reader[a], null,
+ "event handler attribute should initially be null");
+ }, "FileReader." + a + ": initial value");
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS FileReader.onloadstart: initial value
+PASS FileReader.onprogress: initial value
+PASS FileReader.onload: initial value
+PASS FileReader.onabort: initial value
+PASS FileReader.onerror: initial value
+PASS FileReader.onloadend: initial value
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributesanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadereventhandlerattributeshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-<!doctype html>
-<meta charset="utf-8">
-<title>FileReader event handler attributes</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id=log></div>
-<script>
-var attributes = [
- "onloadstart",
- "onprogress",
- "onload",
- "onabort",
- "onerror",
- "onloadend",
-];
-attributes.forEach(function(a) {
- test(function() {
- var reader = new FileReader();
- assert_equals(reader[a], null,
- "event handler attribute should initially be null");
- }, "FileReader." + a + ": initial value");
-});
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS test FileReader InvalidStateError exception for readAsText
+PASS test FileReader InvalidStateError exception for readAsDataURL
+PASS test FileReader InvalidStateError exception for readAsArrayBuffer
+PASS test FileReader InvalidStateError exception in onloadstart event for readAsArrayBuffer
+PASS test FileReader no InvalidStateError exception in loadend event handler for readAsArrayBuffer
+PASS test abort and restart in onloadstart event for readAsText
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+// META: title=FileReader: starting new reads while one is in progress
+
+test(function() {
+ var blob_1 = new Blob(['TEST000000001'])
+ var blob_2 = new Blob(['TEST000000002'])
+ var reader = new FileReader();
+ reader.readAsText(blob_1)
+ assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
+ assert_throws_dom("InvalidStateError", function () {
+ reader.readAsText(blob_2)
+ })
+}, 'test FileReader InvalidStateError exception for readAsText');
+
+test(function() {
+ var blob_1 = new Blob(['TEST000000001'])
+ var blob_2 = new Blob(['TEST000000002'])
+ var reader = new FileReader();
+ reader.readAsDataURL(blob_1)
+ assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
+ assert_throws_dom("InvalidStateError", function () {
+ reader.readAsDataURL(blob_2)
+ })
+}, 'test FileReader InvalidStateError exception for readAsDataURL');
+
+test(function() {
+ var blob_1 = new Blob(['TEST000000001'])
+ var blob_2 = new Blob(['TEST000000002'])
+ var reader = new FileReader();
+ reader.readAsArrayBuffer(blob_1)
+ assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
+ assert_throws_dom("InvalidStateError", function () {
+ reader.readAsArrayBuffer(blob_2)
+ })
+}, 'test FileReader InvalidStateError exception for readAsArrayBuffer');
+
+async_test(function() {
+ var blob_1 = new Blob(['TEST000000001'])
+ var blob_2 = new Blob(['TEST000000002'])
+ var reader = new FileReader();
+ var triggered = false;
+ reader.onloadstart = this.step_func_done(function() {
+ assert_false(triggered, "Only one loadstart event should be dispatched");
+ triggered = true;
+ assert_equals(reader.readyState, FileReader.LOADING,
+ "readyState must be LOADING")
+ assert_throws_dom("InvalidStateError", function () {
+ reader.readAsArrayBuffer(blob_2)
+ })
+ });
+ reader.readAsArrayBuffer(blob_1)
+ assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
+}, 'test FileReader InvalidStateError exception in onloadstart event for readAsArrayBuffer');
+
+async_test(function() {
+ var blob_1 = new Blob(['TEST000000001'])
+ var blob_2 = new Blob(['TEST000000002'])
+ var reader = new FileReader();
+ reader.onloadend = this.step_func_done(function() {
+ assert_equals(reader.readyState, FileReader.DONE,
+ "readyState must be DONE")
+ reader.readAsArrayBuffer(blob_2)
+ assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
+ });
+ reader.readAsArrayBuffer(blob_1)
+ assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
+}, 'test FileReader no InvalidStateError exception in loadend event handler for readAsArrayBuffer');
+
+async_test(function() {
+ var blob_1 = new Blob([new Uint8Array(0x414141)]);
+ var blob_2 = new Blob(['TEST000000002']);
+ var reader = new FileReader();
+ reader.onloadstart = this.step_func(function() {
+ reader.abort();
+ reader.onloadstart = null;
+ reader.onloadend = this.step_func_done(function() {
+ assert_equals('TEST000000002', reader.result);
+ });
+ reader.readAsText(blob_2);
+ });
+ reader.readAsText(blob_1);
+}, 'test abort and restart in onloadstart event for readAsText');
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS test FileReader InvalidStateError exception for readAsText
+PASS test FileReader InvalidStateError exception for readAsDataURL
+PASS test FileReader InvalidStateError exception for readAsArrayBuffer
+PASS test FileReader InvalidStateError exception in onloadstart event for readAsArrayBuffer
+PASS test FileReader no InvalidStateError exception in loadend event handler for readAsArrayBuffer
+PASS test abort and restart in onloadstart event for readAsText
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadsanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionFileReadermultiplereadshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,89 +0,0 @@
</span><del>-<!DOCTYPE html>
-<title>FileReader: starting new reads while one is in progress</title>
-<link rel="author" title="Yinkan Li" href="mailto:liyinkan.biz@gmail.com">
-<link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#MultipleReads">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
- var blob_1 = new Blob(['TEST000000001'])
- var blob_2 = new Blob(['TEST000000002'])
- var reader = new FileReader();
- reader.readAsText(blob_1)
- assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
- assert_throws_dom("InvalidStateError", function () {
- reader.readAsText(blob_2)
- })
-}, 'test FileReader InvalidStateError exception for readAsText');
-
-test(function() {
- var blob_1 = new Blob(['TEST000000001'])
- var blob_2 = new Blob(['TEST000000002'])
- var reader = new FileReader();
- reader.readAsDataURL(blob_1)
- assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
- assert_throws_dom("InvalidStateError", function () {
- reader.readAsDataURL(blob_2)
- })
-}, 'test FileReader InvalidStateError exception for readAsDataURL');
-
-test(function() {
- var blob_1 = new Blob(['TEST000000001'])
- var blob_2 = new Blob(['TEST000000002'])
- var reader = new FileReader();
- reader.readAsArrayBuffer(blob_1)
- assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
- assert_throws_dom("InvalidStateError", function () {
- reader.readAsArrayBuffer(blob_2)
- })
-}, 'test FileReader InvalidStateError exception for readAsArrayBuffer');
-
-async_test(function() {
- var blob_1 = new Blob(['TEST000000001'])
- var blob_2 = new Blob(['TEST000000002'])
- var reader = new FileReader();
- var triggered = false;
- reader.onloadstart = this.step_func_done(function() {
- assert_false(triggered, "Only one loadstart event should be dispatched");
- triggered = true;
- assert_equals(reader.readyState, FileReader.LOADING,
- "readyState must be LOADING")
- assert_throws_dom("InvalidStateError", function () {
- reader.readAsArrayBuffer(blob_2)
- })
- });
- reader.readAsArrayBuffer(blob_1)
- assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
-}, 'test FileReader InvalidStateError exception in onloadstart event for readAsArrayBuffer');
-
-async_test(function() {
- var blob_1 = new Blob(['TEST000000001'])
- var blob_2 = new Blob(['TEST000000002'])
- var reader = new FileReader();
- reader.onloadend = this.step_func_done(function() {
- assert_equals(reader.readyState, FileReader.DONE,
- "readyState must be DONE")
- reader.readAsArrayBuffer(blob_2)
- assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
- });
- reader.readAsArrayBuffer(blob_1)
- assert_equals(reader.readyState, FileReader.LOADING, "readyState Must be LOADING")
-}, 'test FileReader no InvalidStateError exception in loadend event handler for readAsArrayBuffer');
-
-async_test(function() {
- var blob_1 = new Blob([new Uint8Array(0x414141)]);
- var blob_2 = new Blob(['TEST000000002']);
- var reader = new FileReader();
- reader.onloadstart = this.step_func(function() {
- reader.abort();
- reader.onloadstart = null;
- reader.onloadend = this.step_func_done(function() {
- assert_equals('TEST000000002', reader.result);
- });
- reader.readAsText(blob_2);
- });
- reader.readAsText(blob_1);
-}, 'test abort and restart in onloadstart event for readAsText');
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Aborting before read
+PASS Aborting after read
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_aborthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+// META: title=FileAPI Test: filereader_abort
+
+ test(function() {
+ var readerNoRead = new FileReader();
+ readerNoRead.abort();
+ assert_equals(readerNoRead.readyState, readerNoRead.EMPTY);
+ assert_equals(readerNoRead.result, null);
+ }, "Aborting before read");
+
+ promise_test(t => {
+ var blob = new Blob(["TEST THE ABORT METHOD"]);
+ var readerAbort = new FileReader();
+
+ var eventWatcher = new EventWatcher(t, readerAbort,
+ ['abort', 'loadstart', 'loadend', 'error', 'load']);
+
+ // EventWatcher doesn't let us inspect the state after the abort event,
+ // so add an extra event handler for that.
+ readerAbort.addEventListener('abort', t.step_func(e => {
+ assert_equals(readerAbort.readyState, readerAbort.DONE);
+ }));
+
+ readerAbort.readAsText(blob);
+ return eventWatcher.wait_for('loadstart')
+ .then(() => {
+ assert_equals(readerAbort.readyState, readerAbort.LOADING);
+ // 'abort' and 'loadend' events are dispatched synchronously, so
+ // call wait_for before calling abort.
+ var nextEvent = eventWatcher.wait_for(['abort', 'loadend']);
+ readerAbort.abort();
+ return nextEvent;
+ })
+ .then(() => {
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=24401
+ assert_equals(readerAbort.result, null);
+ assert_equals(readerAbort.readyState, readerAbort.DONE);
+ });
+ }, "Aborting after read");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Aborting before read
+PASS Aborting after read
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_abortanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_aborthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>FileAPI Test: filereader_abort</title>
- <link rel="author" title="Intel" href="http://www.intel.com">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#abort">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
-
- <script>
- test(function() {
- var readerNoRead = new FileReader();
- readerNoRead.abort();
- assert_equals(readerNoRead.readyState, readerNoRead.EMPTY);
- assert_equals(readerNoRead.result, null);
- }, "Aborting before read");
-
- promise_test(t => {
- var blob = new Blob(["TEST THE ABORT METHOD"]);
- var readerAbort = new FileReader();
-
- var eventWatcher = new EventWatcher(t, readerAbort,
- ['abort', 'loadstart', 'loadend', 'error', 'load']);
-
- // EventWatcher doesn't let us inspect the state after the abort event,
- // so add an extra event handler for that.
- readerAbort.addEventListener('abort', t.step_func(e => {
- assert_equals(readerAbort.readyState, readerAbort.DONE);
- }));
-
- readerAbort.readAsText(blob);
- return eventWatcher.wait_for('loadstart')
- .then(() => {
- assert_equals(readerAbort.readyState, readerAbort.LOADING);
- // 'abort' and 'loadend' events are dispatched synchronously, so
- // call wait_for before calling abort.
- var nextEvent = eventWatcher.wait_for(['abort', 'loadend']);
- readerAbort.abort();
- return nextEvent;
- })
- .then(() => {
- // https://www.w3.org/Bugs/Public/show_bug.cgi?id=24401
- assert_equals(readerAbort.result, null);
- assert_equals(readerAbort.readyState, readerAbort.DONE);
- });
- }, "Aborting after read");
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_error
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_errorhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+// META: title=FileAPI Test: filereader_error
+
+ async_test(function() {
+ var blob = new Blob(["TEST THE ERROR ATTRIBUTE AND ERROR EVENT"]);
+ var reader = new FileReader();
+ assert_equals(reader.error, null, "The error is null when no error occurred");
+
+ reader.onload = this.step_func(function(evt) {
+ assert_unreached("Should not dispatch the load event");
+ });
+
+ reader.onloadend = this.step_func(function(evt) {
+ assert_equals(reader.result, null, "The result is null");
+ this.done();
+ });
+
+ reader.readAsText(blob);
+ reader.abort();
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_error
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_erroranyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_errorhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>FileAPI Test: filereader_error</title>
- <link rel="author" title="Intel" href="http://www.intel.com">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#dfn-domerror">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#abort">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
-
- <script>
- async_test(function() {
- var blob = new Blob(["TEST THE ERROR ATTRIBUTE AND ERROR EVENT"]);
- var reader = new FileReader();
- assert_equals(reader.error, null, "The error is null when no error occurred");
-
- reader.onload = this.step_func(function(evt) {
- assert_unreached("Should not dispatch the load event");
- });
-
- reader.onloadend = this.step_func(function(evt) {
- assert_equals(reader.result, null, "The result is null");
- this.done();
- });
-
- reader.readAsText(blob);
- reader.abort();
- });
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_readAsArrayBuffer
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+// META: title=FileAPI Test: filereader_readAsArrayBuffer
+
+ async_test(function() {
+ var blob = new Blob(["TEST"]);
+ var reader = new FileReader();
+
+ reader.onload = this.step_func(function(evt) {
+ assert_equals(reader.result.byteLength, 4, "The byteLength is 4");
+ assert_true(reader.result instanceof ArrayBuffer, "The result is instanceof ArrayBuffer");
+ assert_equals(reader.readyState, reader.DONE);
+ this.done();
+ });
+
+ reader.onloadstart = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.onprogress = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.readAsArrayBuffer(blob);
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_readAsArrayBuffer
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsArrayBufferhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>FileAPI Test: filereader_readAsArrayBuffer</title>
- <link rel="author" title="Intel" href="http://www.intel.com">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#readAsArrayBuffer">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
-
- <script>
- async_test(function() {
- var blob = new Blob(["TEST"]);
- var reader = new FileReader();
-
- reader.onload = this.step_func(function(evt) {
- assert_equals(reader.result.byteLength, 4, "The byteLength is 4");
- assert_true(reader.result instanceof ArrayBuffer, "The result is instanceof ArrayBuffer");
- assert_equals(reader.readyState, reader.DONE);
- this.done();
- });
-
- reader.onloadstart = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.onprogress = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.readAsArrayBuffer(blob);
- });
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_readAsBinaryString
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+// META: title=FileAPI Test: filereader_readAsBinaryString
+
+async_test(t => {
+ const blob = new Blob(["σ"]);
+ const reader = new FileReader();
+
+ reader.onload = t.step_func_done(() => {
+ assert_equals(typeof reader.result, "string", "The result is string");
+ assert_equals(reader.result.length, 2, "The result length is 2");
+ assert_equals(reader.result, "\xcf\x83", "The result is \xcf\x83");
+ assert_equals(reader.readyState, reader.DONE);
+ });
+
+ reader.onloadstart = t.step_func(() => {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.onprogress = t.step_func(() => {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.readAsBinaryString(blob);
+});
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_readAsBinaryString
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsBinaryStringhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>FileAPI Test: filereader_readAsBinaryString</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="help" href="https://w3c.github.io/FileAPI/#readAsBinaryString">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-
-async_test(t => {
- const blob = new Blob(["σ"]);
- const reader = new FileReader();
-
- reader.onload = t.step_func_done(() => {
- assert_equals(typeof reader.result, "string", "The result is string");
- assert_equals(reader.result.length, 2, "The result length is 2");
- assert_equals(reader.result, "\xcf\x83", "The result is \xcf\x83");
- assert_equals(reader.readyState, reader.DONE);
- });
-
- reader.onloadstart = t.step_func(() => {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.onprogress = t.step_func(() => {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.readAsBinaryString(blob);
-});
-
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+PASS FileReader readyState during readAsDataURL
+PASS readAsDataURL result for Blob with specified MIME type
+PASS readAsDataURL result for Blob with unspecified MIME type
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+// META: title=FileAPI Test: FileReader.readAsDataURL
+
+async_test(function(testCase) {
+ var blob = new Blob(["TEST"]);
+ var reader = new FileReader();
+
+ reader.onload = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.DONE);
+ testCase.done();
+ });
+ reader.onloadstart = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+ reader.onprogress = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.readAsDataURL(blob);
+}, 'FileReader readyState during readAsDataURL');
+
+async_test(function(testCase) {
+ var blob = new Blob(["TEST"], { type: 'text/plain' });
+ var reader = new FileReader();
+
+ reader.onload = this.step_func(function() {
+ assert_equals(reader.result, "data:text/plain;base64,VEVTVA==");
+ testCase.done();
+ });
+ reader.readAsDataURL(blob);
+}, 'readAsDataURL result for Blob with specified MIME type');
+
+async_test(function(testCase) {
+ var blob = new Blob(["TEST"]);
+ var reader = new FileReader();
+
+ reader.onload = this.step_func(function() {
+ assert_equals(reader.result,
+ "data:application/octet-stream;base64,VEVTVA==");
+ testCase.done();
+ });
+ reader.readAsDataURL(blob);
+}, 'readAsDataURL result for Blob with unspecified MIME type');
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+PASS FileReader readyState during readAsDataURL
+PASS readAsDataURL result for Blob with specified MIME type
+PASS readAsDataURL result for Blob with unspecified MIME type
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsDataURLhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-<!doctype html>
-<meta charset="utf-8">
-<title>FileAPI Test: FileReader.readAsDataURL</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="help" href="https://w3c.github.io/FileAPI/#readAsDataURL">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<script>
-async_test(function(testCase) {
- var blob = new Blob(["TEST"]);
- var reader = new FileReader();
-
- reader.onload = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.DONE);
- testCase.done();
- });
- reader.onloadstart = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING);
- });
- reader.onprogress = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.readAsDataURL(blob);
-}, 'FileReader readyState during readAsDataURL');
-
-async_test(function(testCase) {
- var blob = new Blob(["TEST"], { type: 'text/plain' });
- var reader = new FileReader();
-
- reader.onload = this.step_func(function() {
- assert_equals(reader.result, "data:text/plain;base64,VEVTVA==");
- testCase.done();
- });
- reader.readAsDataURL(blob);
-}, 'readAsDataURL result for Blob with specified MIME type');
-
-async_test(function(testCase) {
- var blob = new Blob(["TEST"]);
- var reader = new FileReader();
-
- reader.onload = this.step_func(function() {
- assert_equals(reader.result,
- "data:application/octet-stream;base64,VEVTVA==");
- testCase.done();
- });
- reader.readAsDataURL(blob);
-}, 'readAsDataURL result for Blob with unspecified MIME type');
-
-</script>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS readAsText should correctly read UTF-8.
+PASS readAsText should correctly read UTF-16.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTexthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+// META: title=FileAPI Test: filereader_readAsText
+
+ async_test(function() {
+ var blob = new Blob(["TEST"]);
+ var reader = new FileReader();
+
+ reader.onload = this.step_func(function(evt) {
+ assert_equals(typeof reader.result, "string", "The result is typeof string");
+ assert_equals(reader.result, "TEST", "The result is TEST");
+ this.done();
+ });
+
+ reader.onloadstart = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING, "The readyState");
+ });
+
+ reader.onprogress = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.readAsText(blob);
+ }, "readAsText should correctly read UTF-8.");
+
+ async_test(function() {
+ var blob = new Blob(["TEST"]);
+ var reader = new FileReader();
+ var reader_UTF16 = new FileReader();
+ reader_UTF16.onload = this.step_func(function(evt) {
+ // "TEST" in UTF-8 is 0x54 0x45 0x53 0x54.
+ // Decoded as utf-16 (little-endian), we get 0x4554 0x5453.
+ assert_equals(reader_UTF16.readyState, reader.DONE, "The readyState");
+ assert_equals(reader_UTF16.result, "\u4554\u5453", "The result is not TEST");
+ this.done();
+ });
+ reader_UTF16.readAsText(blob, "UTF-16");
+ }, "readAsText should correctly read UTF-16.");
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS readAsText should correctly read UTF-8.
+PASS readAsText should correctly read UTF-16.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTextanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readAsTexthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>FileAPI Test: filereader_readAsText</title>
- <link rel="author" title="Intel" href="http://www.intel.com">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#readAsDataText">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
-
- <script>
- async_test(function() {
- var blob = new Blob(["TEST"]);
- var reader = new FileReader();
-
- reader.onload = this.step_func(function(evt) {
- assert_equals(typeof reader.result, "string", "The result is typeof string");
- assert_equals(reader.result, "TEST", "The result is TEST");
- this.done();
- });
-
- reader.onloadstart = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING, "The readyState");
- });
-
- reader.onprogress = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.readAsText(blob);
- }, "readAsText should correctly read UTF-8.");
-
- async_test(function() {
- var blob = new Blob(["TEST"]);
- var reader = new FileReader();
- var reader_UTF16 = new FileReader();
- reader_UTF16.onload = this.step_func(function(evt) {
- // "TEST" in UTF-8 is 0x54 0x45 0x53 0x54.
- // Decoded as utf-16 (little-endian), we get 0x4554 0x5453.
- assert_equals(reader_UTF16.readyState, reader.DONE, "The readyState");
- assert_equals(reader_UTF16.result, "\u4554\u5453", "The result is not TEST");
- this.done();
- });
- reader_UTF16.readAsText(blob, "UTF-16");
- }, "readAsText should correctly read UTF-16.");
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_readystate
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystatehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+// META: title=FileAPI Test: filereader_readystate
+
+ async_test(function() {
+ var blob = new Blob(["THIS TEST THE READYSTATE WHEN READ BLOB"]);
+ var reader = new FileReader();
+
+ assert_equals(reader.readyState, reader.EMPTY);
+
+ reader.onloadstart = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.LOADING);
+ });
+
+ reader.onloadend = this.step_func(function(evt) {
+ assert_equals(reader.readyState, reader.DONE);
+ this.done();
+ });
+
+ reader.readAsDataURL(blob);
+ });
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS FileAPI Test: filereader_readystate
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystateanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_readystatehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,34 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>FileAPI Test: filereader_readystate</title>
- <link rel="author" title="Intel" href="http://www.intel.com">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#blobreader-state">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
-
- <script>
- async_test(function() {
- var blob = new Blob(["THIS TEST THE READYSTATE WHEN READ BLOB"]);
- var reader = new FileReader();
-
- assert_equals(reader.readyState, reader.EMPTY);
-
- reader.onloadstart = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.LOADING);
- });
-
- reader.onloadend = this.step_func(function(evt) {
- assert_equals(reader.readyState, reader.DONE);
- this.done();
- });
-
- reader.readAsDataURL(blob);
- });
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+
+PASS readAsText
+PASS readAsDataURL
+PASS readAsArrayBuffer
+PASS readAsBinaryString
+PASS result is null during "loadstart" event for readAsText
+PASS result is null during "loadstart" event for readAsDataURL
+PASS result is null during "loadstart" event for readAsArrayBuffer
+PASS result is null during "loadstart" event for readAsBinaryString
+PASS result is null during "progress" event for readAsText
+PASS result is null during "progress" event for readAsDataURL
+PASS result is null during "progress" event for readAsArrayBuffer
+PASS result is null during "progress" event for readAsBinaryString
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyjsfromrev278961trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resulthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.js (from rev 278961, trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.html) (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+// META: title=FileAPI Test: filereader_result
+
+ var blob, blob2;
+ setup(function() {
+ blob = new Blob(["This test the result attribute"]);
+ blob2 = new Blob(["This is a second blob"]);
+ });
+
+ async_test(function() {
+ var readText = new FileReader();
+ assert_equals(readText.result, null);
+
+ readText.onloadend = this.step_func(function(evt) {
+ assert_equals(typeof readText.result, "string", "The result type is string");
+ assert_equals(readText.result, "This test the result attribute", "The result is correct");
+ this.done();
+ });
+
+ readText.readAsText(blob);
+ }, "readAsText");
+
+ async_test(function() {
+ var readDataURL = new FileReader();
+ assert_equals(readDataURL.result, null);
+
+ readDataURL.onloadend = this.step_func(function(evt) {
+ assert_equals(typeof readDataURL.result, "string", "The result type is string");
+ assert_true(readDataURL.result.indexOf("VGhpcyB0ZXN0IHRoZSByZXN1bHQgYXR0cmlidXRl") != -1, "return the right base64 string");
+ this.done();
+ });
+
+ readDataURL.readAsDataURL(blob);
+ }, "readAsDataURL");
+
+ async_test(function() {
+ var readArrayBuffer = new FileReader();
+ assert_equals(readArrayBuffer.result, null);
+
+ readArrayBuffer.onloadend = this.step_func(function(evt) {
+ assert_true(readArrayBuffer.result instanceof ArrayBuffer, "The result is instanceof ArrayBuffer");
+ this.done();
+ });
+
+ readArrayBuffer.readAsArrayBuffer(blob);
+ }, "readAsArrayBuffer");
+
+ async_test(function() {
+ var readBinaryString = new FileReader();
+ assert_equals(readBinaryString.result, null);
+
+ readBinaryString.onloadend = this.step_func(function(evt) {
+ assert_equals(typeof readBinaryString.result, "string", "The result type is string");
+ assert_equals(readBinaryString.result, "This test the result attribute", "The result is correct");
+ this.done();
+ });
+
+ readBinaryString.readAsBinaryString(blob);
+ }, "readAsBinaryString");
+
+
+ for (let event of ['loadstart', 'progress']) {
+ for (let method of ['readAsText', 'readAsDataURL', 'readAsArrayBuffer', 'readAsBinaryString']) {
+ promise_test(async function(t) {
+ var reader = new FileReader();
+ assert_equals(reader.result, null, 'result is null before read');
+
+ var eventWatcher = new EventWatcher(t, reader,
+ [event, 'loadend']);
+
+ reader[method](blob);
+ assert_equals(reader.result, null, 'result is null after first read call');
+ await eventWatcher.wait_for(event);
+ assert_equals(reader.result, null, 'result is null during event');
+ await eventWatcher.wait_for('loadend');
+ assert_not_equals(reader.result, null);
+ reader[method](blob);
+ assert_equals(reader.result, null, 'result is null after second read call');
+ await eventWatcher.wait_for(event);
+ assert_equals(reader.result, null, 'result is null during second read event');
+ }, 'result is null during "' + event + '" event for ' + method);
+ }
+ }
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker-expected.txt (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker-expected.txt 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+
+PASS readAsText
+PASS readAsDataURL
+PASS readAsArrayBuffer
+PASS readAsBinaryString
+PASS result is null during "loadstart" event for readAsText
+PASS result is null during "loadstart" event for readAsDataURL
+PASS result is null during "loadstart" event for readAsArrayBuffer
+PASS result is null during "loadstart" event for readAsBinaryString
+PASS result is null during "progress" event for readAsText
+PASS result is null during "progress" event for readAsDataURL
+PASS result is null during "progress" event for readAsArrayBuffer
+PASS result is null during "progress" event for readAsBinaryString
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resultanyworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker.html (0 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.worker.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionfilereader_resulthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.html (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.html 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.html 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -1,97 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>FileAPI Test: filereader_result</title>
- <link rel="author" title="Intel" href="http://www.intel.com">
- <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#filedata-attr">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <div id="log"></div>
-
- <script>
- var blob, blob2;
- setup(function() {
- blob = new Blob(["This test the result attribute"]);
- blob2 = new Blob(["This is a second blob"]);
- });
-
- async_test(function() {
- var readText = new FileReader();
- assert_equals(readText.result, null);
-
- readText.onloadend = this.step_func(function(evt) {
- assert_equals(typeof readText.result, "string", "The result type is string");
- assert_equals(readText.result, "This test the result attribute", "The result is correct");
- this.done();
- });
-
- readText.readAsText(blob);
- }, "readAsText");
-
- async_test(function() {
- var readDataURL = new FileReader();
- assert_equals(readDataURL.result, null);
-
- readDataURL.onloadend = this.step_func(function(evt) {
- assert_equals(typeof readDataURL.result, "string", "The result type is string");
- assert_true(readDataURL.result.indexOf("VGhpcyB0ZXN0IHRoZSByZXN1bHQgYXR0cmlidXRl") != -1, "return the right base64 string");
- this.done();
- });
-
- readDataURL.readAsDataURL(blob);
- }, "readAsDataURL");
-
- async_test(function() {
- var readArrayBuffer = new FileReader();
- assert_equals(readArrayBuffer.result, null);
-
- readArrayBuffer.onloadend = this.step_func(function(evt) {
- assert_true(readArrayBuffer.result instanceof ArrayBuffer, "The result is instanceof ArrayBuffer");
- this.done();
- });
-
- readArrayBuffer.readAsArrayBuffer(blob);
- }, "readAsArrayBuffer");
-
- async_test(function() {
- var readBinaryString = new FileReader();
- assert_equals(readBinaryString.result, null);
-
- readBinaryString.onloadend = this.step_func(function(evt) {
- assert_equals(typeof readBinaryString.result, "string", "The result type is string");
- assert_equals(readBinaryString.result, "This test the result attribute", "The result is correct");
- this.done();
- });
-
- readBinaryString.readAsBinaryString(blob);
- }, "readAsBinaryString");
-
-
- for (let event of ['loadstart', 'progress']) {
- for (let method of ['readAsText', 'readAsDataURL', 'readAsArrayBuffer', 'readAsBinaryString']) {
- promise_test(async function(t) {
- var reader = new FileReader();
- assert_equals(reader.result, null, 'result is null before read');
-
- var eventWatcher = new EventWatcher(t, reader,
- [event, 'loadend']);
-
- reader[method](blob);
- assert_equals(reader.result, null, 'result is null after first read call');
- await eventWatcher.wait_for(event);
- assert_equals(reader.result, null, 'result is null during event');
- await eventWatcher.wait_for('loadend');
- assert_not_equals(reader.result, null);
- reader[method](blob);
- assert_equals(reader.result, null, 'result is null after second read call');
- await eventWatcher.wait_for(event);
- assert_equals(reader.result, null, 'result is null during second read event');
- }, 'result is null during "' + event + '" event for ' + method);
- }
- }
- </script>
- </body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIreadingdatasectionw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/w3c-import.log (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/w3c-import.log 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/w3c-import.log 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -14,15 +14,15 @@
</span><span class="cx"> None
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/Determining-Encoding.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-event-handler-attributes.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/FileReader-multiple-reads.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_error.any.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_events.any.js
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.html
-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsArrayBuffer.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsDataURL.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readAsText.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_readystate.any.js
+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_result.any.js
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIsupportsendfileformdatahelperjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/support/send-file-formdata-helper.js (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/support/send-file-formdata-helper.js 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/support/send-file-formdata-helper.js 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -70,12 +70,14 @@
</span><span class="cx"> }`,
</span><span class="cx"> );
</span><span class="cx">
</span><del>- const asName = fileBaseName.replace(/[\r\n"]/g, encodeURIComponent);
</del><ins>+ const asValue = fileBaseName.replace(/\r\n?|\n/g, "\r\n");
+ const asName = asValue.replace(/[\r\n"]/g, encodeURIComponent);
+ const asFilename = fileBaseName.replace(/[\r\n"]/g, encodeURIComponent);
</ins><span class="cx"> const expectedText = [
</span><span class="cx"> boundary,
</span><span class="cx"> 'Content-Disposition: form-data; name="filename"',
</span><span class="cx"> "",
</span><del>- fileBaseName,
</del><ins>+ asValue,
</ins><span class="cx"> boundary,
</span><span class="cx"> `Content-Disposition: form-data; name="${asName}"`,
</span><span class="cx"> "",
</span><span class="lines">@@ -82,7 +84,7 @@
</span><span class="cx"> "filename",
</span><span class="cx"> boundary,
</span><span class="cx"> `Content-Disposition: form-data; name="file"; ` +
</span><del>- `filename="${asName}"`,
</del><ins>+ `filename="${asFilename}"`,
</ins><span class="cx"> "Content-Type: text/plain",
</span><span class="cx"> "",
</span><span class="cx"> kTestChars,
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsFileAPIw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/w3c-import.log (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/w3c-import.log 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/w3c-import.log 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReaderSync.worker.js
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/META.yml
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/FileAPI/fileReader.any.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/idlharness.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/FileAPI/idlharness.worker.js
</span></span></pre></div>
<a id="trunkLayoutTeststestsoptionsjson"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/tests-options.json (278961 => 278962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/tests-options.json 2021-06-16 22:37:01 UTC (rev 278961)
+++ trunk/LayoutTests/tests-options.json 2021-06-16 22:39:29 UTC (rev 278962)
</span><span class="lines">@@ -146,6 +146,9 @@
</span><span class="cx"> "imported/w3c/web-animations/timing-model/timelines/update-and-send-events.html": [
</span><span class="cx"> "slow"
</span><span class="cx"> ],
</span><ins>+ "imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.html": [
+ "slow"
+ ],
</ins><span class="cx"> "imported/w3c/web-platform-tests/FileAPI/url/sandboxed-iframe.html": [
</span><span class="cx"> "slow"
</span><span class="cx"> ],
</span></span></pre>
</div>
</div>
</body>
</html>