Chromium Code Reviews| Index: ui/file_manager/gallery/js/image_editor/exif_encoder_unittest.js |
| diff --git a/ui/file_manager/gallery/js/image_editor/exif_encoder_unittest.js b/ui/file_manager/gallery/js/image_editor/exif_encoder_unittest.js |
| index 3caff18640f561251d80774f5843a76e145c85f2..ed02b74d46774385230a1cc7f683141843205058 100644 |
| --- a/ui/file_manager/gallery/js/image_editor/exif_encoder_unittest.js |
| +++ b/ui/file_manager/gallery/js/image_editor/exif_encoder_unittest.js |
| @@ -11,56 +11,53 @@ function testExifEncodeAndDecode() { |
| var data = canvas.toDataURL('image/jpeg'); |
| var metadata = { |
| - media: { |
| - mimeType: 'image/jpeg', |
| - ifd: { |
| - image: { |
| - // Manufacture |
| - 271: { |
| - id: 0x10f, |
| - format: 2, |
| - componentCount: 12, |
| - value: 'Manufacture\0' |
| - }, |
| - // Device model |
| - 272: { |
| - id: 0x110, |
| - format: 2, |
| - componentCount: 12, |
| - value: 'DeviceModel\0' |
| - }, |
| - // GPS Pointer |
| - 34853: { |
| - id: 0x8825, |
| - format: 4, |
| - componentCount: 1, |
| - value: 0 // The value is set by the encoder. |
| - } |
| + mediaMimeType: 'image/jpeg', |
| + ifd: { |
| + image: { |
| + // Manufacture |
| + 271: { |
| + id: 0x10f, |
| + format: 2, |
| + componentCount: 12, |
| + value: 'Manufacture\0' |
| }, |
| - exif: { |
| - // Lens model |
| - 42036: { |
| - id: 0xa434, |
| - format: 2, |
| - componentCount: 10, |
| - value: 'LensModel\0' |
| - } |
| + // Device model |
| + 272: { |
| + id: 0x110, |
| + format: 2, |
| + componentCount: 12, |
| + value: 'DeviceModel\0' |
| }, |
| - gps: { |
| - // GPS latitude ref |
| - 1: { |
| - id: 0x1, |
| - format: 2, |
| - componentCount: 2, |
| - value: 'N\0' |
| - } |
| + // GPS Pointer |
| + 34853: { |
| + id: 0x8825, |
| + format: 4, |
| + componentCount: 1, |
| + value: 0 // The value is set by the encoder. |
| + } |
| + }, |
| + exif: { |
| + // Lens model |
| + 42036: { |
| + id: 0xa434, |
| + format: 2, |
| + componentCount: 10, |
| + value: 'LensModel\0' |
| + } |
| + }, |
| + gps: { |
| + // GPS latitude ref |
| + 1: { |
| + id: 0x1, |
| + format: 2, |
| + componentCount: 2, |
| + value: 'N\0' |
| } |
| } |
| } |
| }; |
| - var encoder = ImageEncoder.encodeMetadata(metadata, canvas, 1, |
| - new Date(2015, 0, 7, 15, 30, 6)); |
| + var encoder = ImageEncoder.encodeMetadata(metadata, canvas, 1); |
| // Assert that ExifEncoder is returned. |
| assertTrue(encoder instanceof ExifEncoder); |
| @@ -104,9 +101,9 @@ function testExifEncodeAndDecode() { |
| parsedMetadata.ifd.image[0x131].value); |
| // Datetime should be updated. |
| - assertEquals('2015:01:07 15:30:06\0', parsedMetadata.ifd.image[0x132].value); |
| + assertTrue(!!parsedMetadata.ifd.image[0x132].value); |
|
yawano
2015/02/25 09:19:10
Could you check that this value is valid as exif d
hirono
2015/02/25 13:28:37
I re-thought about it and changed so that the enco
|
| // Thumbnail image |
| - assert(parsedMetadata.thumbnailTransform); |
| - assert(parsedMetadata.thumbnailURL); |
| + assertTrue(!!parsedMetadata.thumbnailTransform); |
| + assertTrue(!!parsedMetadata.thumbnailURL); |
| } |