Index: chrome/test/data/extensions/api_test/media_galleries/read_access/test.js |
diff --git a/chrome/test/data/extensions/api_test/media_galleries/read_access/test.js b/chrome/test/data/extensions/api_test/media_galleries/read_access/test.js |
index 9e5909d0093b7f3e9050e4dc11fd2d2acd38fea4..561677ab829b07c0740fce8162f5d9ce1388fa80 100644 |
--- a/chrome/test/data/extensions/api_test/media_galleries/read_access/test.js |
+++ b/chrome/test/data/extensions/api_test/media_galleries/read_access/test.js |
@@ -42,6 +42,28 @@ function ReadFileToBytesTest() { |
TestFirstFilesystem(verifyFilesystem); |
} |
+function GetMetadataTest() { |
+ function verifyFilesystem(filesystem) { |
+ filesystem.root.getFile("test.jpg", {create: false}, verifyFileEntry, |
+ chrome.test.fail); |
+ } |
+ |
+ function verifyFileEntry(fileEntry) { |
+ fileEntry.file(verifyFile, chrome.test.fail) |
+ } |
+ |
+ function verifyFile(file) { |
+ mediaGalleries.getMetadata(file, {}, verifyMetadata); |
+ } |
+ |
+ function verifyMetadata(metadata) { |
+ chrome.test.assertEq("image/jpeg", metadata.mimeType); |
+ chrome.test.succeed(); |
+ } |
+ |
+ TestFirstFilesystem(verifyFilesystem); |
+} |
+ |
function GetMediaFileSystemMetadataTest() { |
function verifyFilesystem(filesystem) { |
var metadata = mediaGalleries.getMediaFileSystemMetadata(filesystem); |
@@ -61,6 +83,7 @@ chrome.test.getConfig(function(config) { |
chrome.test.runTests([ |
ReadDirectoryTest, |
ReadFileToBytesTest, |
+ GetMetadataTest, |
GetMediaFileSystemMetadataTest, |
]); |
}) |