Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Side by Side Diff: LayoutTests/fast/images/exif-orientation-image-document.html

Issue 196523007: Revert of id of iframe incorrectly sets window name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) { 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. 5 // Note that this test only passes in DRT. In browsers, the cross-iframe dom inspection usually causes a security exception.
6 testRunner.dumpAsTextWithPixelResults(); 6 testRunner.dumpAsTextWithPixelResults();
7 } 7 }
8 8
9 function log(str) { 9 function log(str) {
10 var li = document.createElement("li"); 10 var li = document.createElement("li");
11 li.appendChild(document.createTextNode(str)); 11 li.appendChild(document.createTextNode(str));
12 var console = document.getElementById("console"); 12 var console = document.getElementById("console");
13 console.appendChild(li); 13 console.appendChild(li);
14 } 14 }
15 15
16 function imageSize(name) { 16 function imageSize(id) {
17 var img = window.frames[name].document.querySelector('img'); 17 var img = window.frames[id].document.querySelector('img');
18 return [img.offsetWidth, img.offsetHeight]; 18 return [img.offsetWidth, img.offsetHeight];
19 } 19 }
20 20
21 21
22 function load() { 22 function load() {
23 var expected = [ 23 var expected = [
24 [100, 50], [100, 50], [100, 50], [100, 50], 24 [100, 50], [100, 50], [100, 50], [100, 50],
25 [50, 100], [50, 100], [50, 100], [50, 100], 25 [50, 100], [50, 100], [50, 100], [50, 100],
26 [100, 50], 26 [100, 50],
27 ]; 27 ];
28 var success = true; 28 var success = true;
29 for(var i = 1; i <= 9; i++) { 29 for(var i = 1; i <= 9; i++) {
30 var s = imageSize("img" + i); 30 var s = imageSize("img" + i);
31 if (s[0] !== expected[i - 1][0] || s[1] !== expected[i - 1][1]) 31 if (s[0] !== expected[i - 1][0] || s[1] !== expected[i - 1][1])
32 success = false; 32 success = false;
33 } 33 }
34 log(success ? "PASS" : "FAIL"); 34 log(success ? "PASS" : "FAIL");
35 } 35 }
36 36
37 </script> 37 </script>
38 <style> 38 <style>
39 iframe { display: inline-block; margin-right: 20px; margin-bottom: 10px; width: 120px; height: 110px; vertical-align: top; border: 1px solid black; } 39 iframe { display: inline-block; margin-right: 20px; margin-bottom: 10px; width: 120px; height: 110px; vertical-align: top; border: 1px solid black; }
40 </style> 40 </style>
41 </head> 41 </head>
42 <body onload="load()"> 42 <body onload="load()">
43 <b>The images should be rotated respecting their EXIF orientation. In image docu ments, this happens independent of WebKitShouldRespectImageOrientation.</b><br>< br> 43 <b>The images should be rotated respecting their EXIF orientation. In image docu ments, this happens independent of WebKitShouldRespectImageOrientation.</b><br>< br>
44 <iframe name="img1" src="resources/exif-orientation-1-ul.jpg" frameborder=0></if rame> 44 <iframe id="img1" src="resources/exif-orientation-1-ul.jpg" frameborder=0></ifra me>
45 <iframe name="img2" src="resources/exif-orientation-2-ur.jpg" frameborder=0></if rame> 45 <iframe id="img2" src="resources/exif-orientation-2-ur.jpg" frameborder=0></ifra me>
46 <iframe name="img3" src="resources/exif-orientation-3-lr.jpg" frameborder=0></if rame> 46 <iframe id="img3" src="resources/exif-orientation-3-lr.jpg" frameborder=0></ifra me>
47 <iframe name="img4" src="resources/exif-orientation-4-lol.jpg" frameborder=0></i frame> 47 <iframe id="img4" src="resources/exif-orientation-4-lol.jpg" frameborder=0></ifr ame>
48 <br> 48 <br>
49 <iframe name="img5" src="resources/exif-orientation-5-lu.jpg" frameborder=0></if rame> 49 <iframe id="img5" src="resources/exif-orientation-5-lu.jpg" frameborder=0></ifra me>
50 <iframe name="img6" src="resources/exif-orientation-6-ru.jpg" frameborder=0></if rame> 50 <iframe id="img6" src="resources/exif-orientation-6-ru.jpg" frameborder=0></ifra me>
51 <iframe name="img7" src="resources/exif-orientation-7-rl.jpg" frameborder=0></if rame> 51 <iframe id="img7" src="resources/exif-orientation-7-rl.jpg" frameborder=0></ifra me>
52 <iframe name="img8" src="resources/exif-orientation-8-llo.jpg" frameborder=0></i frame> 52 <iframe id="img8" src="resources/exif-orientation-8-llo.jpg" frameborder=0></ifr ame>
53 <br> 53 <br>
54 <iframe name="img9" src="resources/exif-orientation-9-u.jpg" frameborder=0></ifr ame> 54 <iframe id="img9" src="resources/exif-orientation-9-u.jpg" frameborder=0></ifram e>
55 <br> 55 <br>
56 <ul id="console"></ul> 56 <ul id="console"></ul>
57 </body> 57 </body>
58 </html> 58 </html>
59 59
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698