Chromium Code Reviews| Index: LayoutTests/fast/images/exif-orientation-height-image-document-title.html |
| diff --git a/LayoutTests/fast/images/exif-orientation-height-image-document-title.html b/LayoutTests/fast/images/exif-orientation-height-image-document-title.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..148a6ea8d1d4b2014c3e1799db1ed37d222be67c |
| --- /dev/null |
| +++ b/LayoutTests/fast/images/exif-orientation-height-image-document-title.html |
| @@ -0,0 +1,41 @@ |
| +<script> |
| +var newwindow; |
| +if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.setCanOpenWindows(); |
| + testRunner.setPopupBlockingEnabled(false); |
| + testRunner.setCloseRemainingWindowsWhenComplete(true); |
| + testRunner.waitUntilDone(); |
| +} |
| + |
| +function loadImageInNewWindow() |
| +{ |
| + newwindow = window.open('resources/jpeg-height-exif-orientation.jpg'); |
| + if (window.testRunner) |
| + testRunner.useUnfortunateSynchronousResizeMode(); |
| + |
| + newwindow.onload = function() { |
| + newwindow.onresize = function() { |
| + var image = newwindow.document.querySelector('img'); |
| + if (image.clientWidth == 0) { |
| + // On GTK+, sometimes the resize callback fires before the GTK |
| + // window has finished resizing. If that happens, try to resize |
| + // again. |
| + setTimeout(function() { |
| + newwindow.resizeTo(360, 360); |
| + }, 0); |
| + return; |
| + } else { |
| + newwindow.location.reload(); |
| + setTimeout(function() { |
| + document.write(newwindow.document.title); |
|
Noel Gordon
2014/02/21 05:26:45
Can you think of a way to write this test that avo
|
| + testRunner.notifyDone(); |
| + }, 1000); |
| + } |
| + }; |
| + newwindow.resizeTo(360, 360); |
| + }; |
| +} |
| + |
| +loadImageInNewWindow(); |
| +</script> |