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

Unified Diff: ui/file_manager/file_manager/foreground/js/thumbnail_loader_unittest.js

Issue 2691933007: Rotate an image bitmap in ImageLoader extension when loading detached. (Closed)
Patch Set: Fix test failure in FileManagerJsTest.ThumbnailLoader. Created 3 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
Index: ui/file_manager/file_manager/foreground/js/thumbnail_loader_unittest.js
diff --git a/ui/file_manager/file_manager/foreground/js/thumbnail_loader_unittest.js b/ui/file_manager/file_manager/foreground/js/thumbnail_loader_unittest.js
index f972dd1b12c70dd8436d3b4aabd1d4d326d91e09..509a4b069598f9292894bc80cfd8907674692c0d 100644
--- a/ui/file_manager/file_manager/foreground/js/thumbnail_loader_unittest.js
+++ b/ui/file_manager/file_manager/foreground/js/thumbnail_loader_unittest.js
@@ -169,13 +169,15 @@ function testLoadAsDataUrlFromExternal(callback) {
}), callback);
}
-function testLoadDetachedFromExifInCavnasModeThumbnailRotate(callback) {
+function testLoadDetachedFromExifInCavnasModeThumbnailDoesNotRotate(callback) {
ImageLoaderClient.getInstance = function() {
return {
load: function(url, callback, opt_option) {
// Assert that data url is passed.
assertTrue(/^data:/i.test(url));
- callback({status: 'success', data: url, width: 64, height: 32});
+ // ImageLoader returns rotated image.
+ callback({status: 'success', data: generateSampleImageDataUrl(32, 64),
+ width: 32, height: 64});
}
};
};
@@ -201,6 +203,7 @@ function testLoadDetachedFromExifInCavnasModeThumbnailRotate(callback) {
thumbnailLoader.loadDetachedImage(resolve);
}).then(function() {
var image = thumbnailLoader.getImage();
+ // No need to rotate by loadDetachedImage() as it's already done.
assertEquals(32, image.width);
assertEquals(64, image.height);
}), callback);
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/thumbnail_loader.js ('k') | ui/file_manager/image_loader/image_loader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698