4 if (window
.testRunner
) {
5 // Note that this test only passes in DRT. In browsers, the cross-iframe dom inspection usually causes a security exception.
6 testRunner
.dumpAsTextWithPixelResults();
10 var li
= document
.createElement("li");
11 li
.appendChild(document
.createTextNode(str
));
12 var console
= document
.getElementById("console");
13 console
.appendChild(li
);
16 function imageSize(name
) {
17 var img
= window
.frames
[name
].document
.querySelector('img');
18 return [img
.offsetWidth
, img
.offsetHeight
];
24 [100, 50], [100, 50], [100, 50], [100, 50],
25 [50, 100], [50, 100], [50, 100], [50, 100],
29 for(var i
= 1; i
<= 9; i
++) {
30 var s
= imageSize("img" + i
);
31 if (s
[0] !== expected
[i
- 1][0] || s
[1] !== expected
[i
- 1][1])
34 log(success
? "PASS" : "FAIL");
39 iframe { display: inline-block; margin-right:
20px; margin-bottom:
10px; width:
120px; height:
110px; vertical-align: top; border:
1px solid black; }
42 <body onload=
"load()">
43 <b>The images should be rotated respecting their EXIF orientation. In image documents, this happens independent of WebKitShouldRespectImageOrientation.
</b><br><br>
44 <iframe name=
"img1" src=
"resources/exif-orientation-1-ul.jpg" frameborder=
0></iframe>
45 <iframe name=
"img2" src=
"resources/exif-orientation-2-ur.jpg" frameborder=
0></iframe>
46 <iframe name=
"img3" src=
"resources/exif-orientation-3-lr.jpg" frameborder=
0></iframe>
47 <iframe name=
"img4" src=
"resources/exif-orientation-4-lol.jpg" frameborder=
0></iframe>
49 <iframe name=
"img5" src=
"resources/exif-orientation-5-lu.jpg" frameborder=
0></iframe>
50 <iframe name=
"img6" src=
"resources/exif-orientation-6-ru.jpg" frameborder=
0></iframe>
51 <iframe name=
"img7" src=
"resources/exif-orientation-7-rl.jpg" frameborder=
0></iframe>
52 <iframe name=
"img8" src=
"resources/exif-orientation-8-llo.jpg" frameborder=
0></iframe>
54 <iframe name=
"img9" src=
"resources/exif-orientation-9-u.jpg" frameborder=
0></iframe>
56 <ul id=
"console"></ul>