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

Unified Diff: ui/file_manager/file_manager/background/js/test_util_base.js

Issue 1608143002: support animated GIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add assert to pass closure compiler Created 4 years, 11 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 | ui/file_manager/gallery/css/gallery.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/test_util_base.js
diff --git a/ui/file_manager/file_manager/background/js/test_util_base.js b/ui/file_manager/file_manager/background/js/test_util_base.js
index 772e48d5f0334ad310c095d863cf89e3ec1e5f8e..cb90d3c9c28b360dde40f44d6a5cadad6238ce42 100644
--- a/ui/file_manager/file_manager/background/js/test_util_base.js
+++ b/ui/file_manager/file_manager/background/js/test_util_base.js
@@ -31,6 +31,7 @@ function extractElementInfo(element, contentWindow, opt_styleNames) {
styles[styleNames[i]] = computedStyles[styleNames[i]];
}
var text = element.textContent;
+ var size = element.getBoundingClientRect();
return {
attributes: attributes,
text: text,
@@ -38,7 +39,13 @@ function extractElementInfo(element, contentWindow, opt_styleNames) {
styles: styles,
// The hidden attribute is not in the element.attributes even if
// element.hasAttribute('hidden') is true.
- hidden: !!element.hidden
+ hidden: !!element.hidden,
+ // These attributes are set when element is img or canvas.
+ imageWidth: Number(element.width),
+ imageHeight: Number(element.height),
+ // These attributes are set in any element.
+ renderedWidth: size.width,
+ renderedHeight: size.height
};
}
« no previous file with comments | « no previous file | ui/file_manager/gallery/css/gallery.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698