WebKit/LayoutTests/http/tests/download/default-encoding.html does not work as it should |
|||||||
Issue description
There is no logic trying to verify the downloaded filename is what it is expected to be.
As a result, you can change this line:
testRunner.overridePreference("WebKitDefaultTextEncodingName", "koi8-r");
to
testRunner.overridePreference("WebKitDefaultTextEncodingName", "utf-8");
or any other encoding, and the test will still pass.
The git history shows that this change seems to be the culprit:
https://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/download/default-encoding-expected.txt?r1=149692&r2=149691&pathrev=149692
To be specific, this removed line is supposed to verify the file name of the downloaded attachment from php.
Policy delegate: resource is an attachment, suggested file name 'SUССЕSS.txt'
,
Oct 21 2016
,
Mar 7 2017
,
Mar 7 2017
,
Apr 12 2017
Looks like we don't have a "suggested file name" printer in Chromium codebase anymore. +toyoshim and other nav experts for further triage
,
Apr 12 2017
,
Apr 12 2017
default-encoding-expected.txt contains the filename as the expectation of encoding conversion. Character codes of "CCE" of "SUCCESS.txt" in the expectation are \u0421, \u0421, \u0415. And what the test actually verifies is the filename provided by the php should not be affected by default encoding, or requester page encoding, but should respect the download page content charset. So, it should be fine even if it passes after changing default encoding. But it will fail if you add BOM or some other charset declaration to resources/literal-koi8-r.php. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ojan@chromium.org
, Mar 17 2016