Commit 743b8633 authored by thakis@chromium.org's avatar thakis@chromium.org

Add a test for reading exif orientation off image documents

https://bugs.webkit.org/show_bug.cgi?id=100698

Reviewed by Eric Seidel.

fast/images/exif-orientation.html tests <img> elements, but image documents were untested previously.

* fast/images/exif-orientation-image-document.html: Added.
* platform/chromium/TestExpectations:
* platform/chromium/fast/images/exif-orientation-image-document-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3764e56e
2012-10-30 Nico Weber <thakis@chromium.org>
Add a test for reading exif orientation off image documents
https://bugs.webkit.org/show_bug.cgi?id=100698
Reviewed by Eric Seidel.
fast/images/exif-orientation.html tests <img> elements, but image documents were untested previously.
* fast/images/exif-orientation-image-document.html: Added.
* platform/chromium/TestExpectations:
* platform/chromium/fast/images/exif-orientation-image-document-expected.txt: Added.
2012-10-29 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out r132819.
<html>
<head>
<script>
if (window.testRunner) {
// Note that this test only passes in DRT. In browsers, the cross-iframe dom inspection usually causes a security exception.
testRunner.dumpAsText(true);
}
function log(str) {
var li = document.createElement("li");
li.appendChild(document.createTextNode(str));
var console = document.getElementById("console");
console.appendChild(li);
}
function imageSize(id) {
var img = window.frames[id].document.querySelector('img');
return [img.offsetWidth, img.offsetHeight];
}
function load() {
var expected = [
[100, 50], [100, 50], [100, 50], [100, 50],
[50, 100], [50, 100], [50, 100], [50, 100],
[100, 50],
];
var success = true;
for(var i = 1; i <= 9; i++) {
var s = imageSize("img" + i);
if (s[0] !== expected[i - 1][0] || s[1] !== expected[i - 1][1])
success = false;
}
log(success ? "PASS" : "FAIL");
}
</script>
<style>
iframe { display: inline-block; margin-right: 20px; margin-bottom: 10px; width: 120px; height: 110px; vertical-align: top; border: 1px solid black; }
</style>
</head>
<body onload="load()">
<b>The images should be rotated respecting their EXIF orientation. In image documents, this happens independent of WebKitShouldRespectImageOrientation.</b><br><br>
<iframe id="img1" src="resources/exif-orientation-1-ul.jpg" frameborder=0></iframe>
<iframe id="img2" src="resources/exif-orientation-2-ur.jpg" frameborder=0></iframe>
<iframe id="img3" src="resources/exif-orientation-3-lr.jpg" frameborder=0></iframe>
<iframe id="img4" src="resources/exif-orientation-4-lol.jpg" frameborder=0></iframe>
<br>
<iframe id="img5" src="resources/exif-orientation-5-lu.jpg" frameborder=0></iframe>
<iframe id="img6" src="resources/exif-orientation-6-ru.jpg" frameborder=0></iframe>
<iframe id="img7" src="resources/exif-orientation-7-rl.jpg" frameborder=0></iframe>
<iframe id="img8" src="resources/exif-orientation-8-llo.jpg" frameborder=0></iframe>
<br>
<iframe id="img9" src="resources/exif-orientation-9-u.jpg" frameborder=0></iframe>
<br>
<ul id="console"></ul>
</body>
</html>
......@@ -3821,6 +3821,9 @@ webkit.org/b/96227 fast/js/function-dot-arguments-identity.html [ Skip ]
webkit.org/b/96835 canvas/philip/tests/2d.text.draw.fontface.notinpage.html [ Failure Pass ]
webkit.org/b/96835 platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.draw.fontface.notinpage.html [ Failure Pass ]
# needs baselines
Bug(thakis) fast/images/exif-orientation-image-document.html [ ImageOnlyFailure ]
webkit.org/b/96834 platform/chromium/virtual/threaded/compositing/visibility/visibility-image-layers.html [ ImageOnlyFailure Pass ]
webkit.org/b/98086 platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html [ ImageOnlyFailure Pass ]
webkit.org/b/98086 platform/chromium/virtual/threaded/compositing/visibility/visibility-simple-video-layer.html [ ImageOnlyFailure Pass ]
......@@ -4060,6 +4063,7 @@ webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/animated-gif-r
webkit.org/b/94240 [ Linux Win ] platform/chromium/virtual/deferred/fast/images/color-jpeg-with-color-profile.html [ ImageOnlyFailure ]
webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/embed-image.html [ Failure ]
webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/exif-orientation-css.html [ ImageOnlyFailure ]
webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/exif-orientation-image-document.html [ Failure ImageOnlyFailure ]
webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/exif-orientation.html [ Failure ImageOnlyFailure ]
webkit.org/b/94240 [ Linux Win SnowLeopard ] platform/chromium/virtual/deferred/fast/images/favicon-as-image.html [ Failure ]
webkit.org/b/94240 [ Linux Win SnowLeopard MountainLion ] platform/chromium/virtual/deferred/fast/images/gif-large-checkerboard.html [ ImageOnlyFailure ]
......
The images should be rotated respecting their EXIF orientation. In image documents, this happens independent of WebKitShouldRespectImageOrientation.
PASS
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