LayoutTest Case for png images served with "image/x-png" mime type

The image/x-png is a non-standard mimetype, now replaced by image/png.
Adding support to be backward compatible and also match the behavior
of other browsers like Firefox. The patch adds the Layout TestCases.

BUG=25293

Review URL: https://codereview.chromium.org/270473002

git-svn-id: svn://svn.chromium.org/blink/trunk@173730 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8179fe41
......@@ -14,6 +14,7 @@ crbug.com/364267 [ Win Mac ] http/tests/security/webgl-remote-read-remote-image-
crbug.com/289002 http/tests/security/frame-loading-via-document-write.html [ Pass Failure ]
crbug.com/25293 [ Win Mac Linux ] http/tests/mime/png-image-with-x-png-mime-type.html [ NeedsRebaseline ]
# -----------------------------------------------------------------
# Inspector tests
# -----------------------------------------------------------------
......
<!DOCTYPE html>
<html>
<body>
<iframe scrolling=no width=300 height=300></iframe>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpResourceResponseMIMETypes();
testRunner.dumpAsTextWithPixelResults();
}
function loadImage()
{
return "http://127.0.0.1:8000/resources/load-and-stall.php";
}
function xPngImage()
{
return "?name=../../../fast/images/resources/lenna.png&mimeType=" + encodeURIComponent("image/x-png");
}
function testDone()
{
window.testRunner && testRunner.notifyDone();
}
function runTests()
{
var _newLoc = loadImage() + xPngImage();
document.querySelector('iframe').src = _newLoc;
setTimeout(testDone, 500);
}
setTimeout(function(){runTests();},0);
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment