11cb0ef41Sopenharmony_ci<!DOCTYPE html> 21cb0ef41Sopenharmony_ci<meta charset="utf-8"> 31cb0ef41Sopenharmony_ci<meta name=timeout content=long> 41cb0ef41Sopenharmony_ci<title>Upload files in ISO-2022-JP form (tentative)</title> 51cb0ef41Sopenharmony_ci<!-- 61cb0ef41Sopenharmony_ci NOTE: This test is tentative because encoding for filename 71cb0ef41Sopenharmony_ci characters unrepresentable in the form charset is not yet 81cb0ef41Sopenharmony_ci standardized. 91cb0ef41Sopenharmony_ci --> 101cb0ef41Sopenharmony_ci<link rel="help" 111cb0ef41Sopenharmony_ci href="https://github.com/whatwg/html/issues/3223"> 121cb0ef41Sopenharmony_ci<link rel="help" 131cb0ef41Sopenharmony_ci href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"> 141cb0ef41Sopenharmony_ci<link rel="help" 151cb0ef41Sopenharmony_ci href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist"> 161cb0ef41Sopenharmony_ci<link rel="help" 171cb0ef41Sopenharmony_ci href="https://w3c.github.io/FileAPI/#file-constructor"> 181cb0ef41Sopenharmony_ci<link rel="author" title="Benjamin C. Wiley Sittler" 191cb0ef41Sopenharmony_ci href="mailto:bsittler@chromium.org"> 201cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script> 211cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script> 221cb0ef41Sopenharmony_ci<script src="../support/send-file-form-helper.js"></script> 231cb0ef41Sopenharmony_ci<script> 241cb0ef41Sopenharmony_ci'use strict'; 251cb0ef41Sopenharmony_ci 261cb0ef41Sopenharmony_ciformPostFileUploadTest({ 271cb0ef41Sopenharmony_ci fileNameSource: 'ASCII', 281cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form.txt', 291cb0ef41Sopenharmony_ci formEncoding: 'ISO-2022-JP', 301cb0ef41Sopenharmony_ci expectedEncodedBaseName: 'file-for-upload-in-form.txt', 311cb0ef41Sopenharmony_ci}); 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ciformPostFileUploadTest({ 341cb0ef41Sopenharmony_ci fileNameSource: 'x-user-defined', 351cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt', 361cb0ef41Sopenharmony_ci formEncoding: 'ISO-2022-JP', 371cb0ef41Sopenharmony_ci expectedEncodedBaseName: ( 381cb0ef41Sopenharmony_ci 'file-for-upload-in-form-.txt'), 391cb0ef41Sopenharmony_ci}); 401cb0ef41Sopenharmony_ci 411cb0ef41Sopenharmony_ciformPostFileUploadTest({ 421cb0ef41Sopenharmony_ci fileNameSource: 'windows-1252', 431cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-☺😂.txt', 441cb0ef41Sopenharmony_ci formEncoding: 'ISO-2022-JP', 451cb0ef41Sopenharmony_ci expectedEncodedBaseName: ( 461cb0ef41Sopenharmony_ci 'file-for-upload-in-form-☺😂.txt'), 471cb0ef41Sopenharmony_ci}); 481cb0ef41Sopenharmony_ci 491cb0ef41Sopenharmony_ciformPostFileUploadTest({ 501cb0ef41Sopenharmony_ci fileNameSource: 'JIS X 0201 and JIS X 0208', 511cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-★星★.txt', 521cb0ef41Sopenharmony_ci formEncoding: 'ISO-2022-JP', 531cb0ef41Sopenharmony_ci expectedEncodedBaseName: 'file-for-upload-in-form-\x1B$B!z@1!z\x1B(B.txt', 541cb0ef41Sopenharmony_ci}); 551cb0ef41Sopenharmony_ci 561cb0ef41Sopenharmony_ciformPostFileUploadTest({ 571cb0ef41Sopenharmony_ci fileNameSource: 'Unicode', 581cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-☺.txt', 591cb0ef41Sopenharmony_ci formEncoding: 'ISO-2022-JP', 601cb0ef41Sopenharmony_ci expectedEncodedBaseName: 'file-for-upload-in-form-☺😂.txt', 611cb0ef41Sopenharmony_ci}); 621cb0ef41Sopenharmony_ci 631cb0ef41Sopenharmony_ciformPostFileUploadTest({ 641cb0ef41Sopenharmony_ci fileNameSource: 'Unicode', 651cb0ef41Sopenharmony_ci fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`, 661cb0ef41Sopenharmony_ci formEncoding: 'ISO-2022-JP', 671cb0ef41Sopenharmony_ci expectedEncodedBaseName: `file-for-upload-in-form-${ 681cb0ef41Sopenharmony_ci kTestFallbackIso2022jp 691cb0ef41Sopenharmony_ci }.txt`, 701cb0ef41Sopenharmony_ci}); 711cb0ef41Sopenharmony_ci 721cb0ef41Sopenharmony_ci</script> 73