Add fileManagerPrivate getContentMimeType getContentMetadata tests
Test files come from //media/test/data. Change apitest C++ to copy the files to the 'testing' Volume before starting tests. id3_png_test.mp3: audio file with embedded album artwork image 90rotation.mp4: h264 video, with 90 degree rotation, no images Add test JS helpers to read the files from the 'testing' volume / file system and convert them to Blobs before starting the tests. Add fileManagerPrivate.getContentMimeType mime sniffing tests: testGetContentMimeTypeEmpty - input is an empty blob, returns undefined mimeType result testGetContentMimeTypeImage - input is an image file blob, sniff image/gif testGetContentMimeTypeAudio - input is an audio file blob, sniff audio/mpeg testGetContentMimeTypeVideo - input is a video file blob, sniff video/mp4 testGetContentMimeTypeUnknownMimeTypeError - net::mime_sniffer fails, sets chrome.runtime.LastError Add fileManagerPrivate.getContentMetadata metadata extraction tests: testGetContentMetadataEmpty - input is an empty blob, returns undefined MediaMetadata testGetContentMetadataAudioTags - extract tags only into the MediaMetadata result - vet result with JS verifyExpectedAudioMetadata() helper testGetContentMetadataAudioTagsImages - extract tags and images into the MediaMetadata result - vet result with JS verifyExpectedAudioMetadata() helper testGetContentMetadataVideoTagsImages - extract tags and images into the MediaMetadata result - vet result with verifyExpectedVideoMetadata() helper testGetContentMetadataRetainsInputMimeType - input mime type is copied through to MediaMetadata.mimeType testGetContentMetadataVideoResetsAudioMime - audio mime is changed to video if there is width and height testGetContentMetadataUnsupportedMimetypeError - input mime not video or audio, sets chrome.runtime.LastError Bug: 1114622 Change-Id: Ic96ce7faa409ae25d6b3c956666bbfd7db362f25 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2345936 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:Naoki Fukino <fukino@chromium.org> Cr-Commit-Position: refs/heads/master@{#797078}
Showing
Please register or sign in to comment