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

Unified Diff: LayoutTests/fast/images/exif-orientation-height-image-document-title.html

Issue 174073006: Add a layout test for ImageDocument document.title (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/images/exif-orientation-height-image-document-title-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/images/exif-orientation-height-image-document-title-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698