未验证 提交 28a484c4 编写于 作者: O openharmony_ci 提交者: Gitee

!7902 fix xts failed by mimetype

Merge pull request !7902 from chenshuteng/master
...@@ -130,7 +130,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -130,7 +130,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
const props = { const props = {
image: { image: {
mimeType: "image/*", mimeType: "image/jpeg",
displayName: "01.jpg", displayName: "01.jpg",
relativePath: "Pictures/Static/", relativePath: "Pictures/Static/",
size: 348113, size: 348113,
...@@ -165,8 +165,8 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -165,8 +165,8 @@ export default function mediaLibraryTestCallback(abilityContext) {
orientation: 0, orientation: 0,
duration: "219600", duration: "219600",
}, },
file: { application: {
mimeType: "file/*", mimeType: "application/octet-stream",
displayName: "01.dat", displayName: "01.dat",
relativePath: "Documents/Static/", relativePath: "Documents/Static/",
size: 10, size: 10,
...@@ -421,7 +421,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -421,7 +421,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
it("SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_004", 0, async function (done) { it("SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_004", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_004"; let testNum = "SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_004";
let currentFetchOps = fetchOps(testNum, "Documents/Static/", FILE_TYPE); let currentFetchOps = fetchOps(testNum, "Documents/Static/", FILE_TYPE);
let type = "file"; let type = "application";
let count = 1; let count = 1;
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, null); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, null);
}); });
...@@ -439,7 +439,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -439,7 +439,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
let currentFetchOps = imageAndVideofetchOp; let currentFetchOps = imageAndVideofetchOp;
let type = "video"; let type = "video";
let count = 2; let count = 2;
let typesArr = ["image/*", "video/mp4"]; let typesArr = ["image/jpeg", "video/mp4"];
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr);
}); });
...@@ -454,9 +454,9 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -454,9 +454,9 @@ export default function mediaLibraryTestCallback(abilityContext) {
it("SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006", 0, async function (done) { it("SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006"; let testNum = "SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006";
let currentFetchOps = imageAndVideoAndfilefetchOp; let currentFetchOps = imageAndVideoAndfilefetchOp;
let type = "file"; let type = "application";
let count = 3; let count = 3;
let typesArr = ["image/*", "video/mp4", "file/*"]; let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream"];
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr);
}); });
...@@ -473,7 +473,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -473,7 +473,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp; let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp;
let type = "audio"; let type = "audio";
let count = 4; let count = 4;
let typesArr = ["image/*", "video/mp4", "file/*", "audio/mpeg"]; let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream", "audio/mpeg"];
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr);
}); });
......
...@@ -162,8 +162,8 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -162,8 +162,8 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
orientation: 0, orientation: 0,
duration: "219600", duration: "219600",
}, },
file: { application: {
mimeType: "file/*", mimeType: "application/octet-stream",
displayName: "01.dat", displayName: "01.dat",
relativePath: "Documents/Static/", relativePath: "Documents/Static/",
size: 10, size: 10,
...@@ -393,7 +393,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -393,7 +393,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
it("SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_004", 0, async function (done) { it("SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_004", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_004"; let testNum = "SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_004";
let currentFetchOps = fetchOps(testNum, "Documents/Static/", FILE_TYPE); let currentFetchOps = fetchOps(testNum, "Documents/Static/", FILE_TYPE);
let type = "file"; let type = "application";
let count = 1; let count = 1;
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, null); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, null);
}); });
...@@ -411,7 +411,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -411,7 +411,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
let currentFetchOps = imageAndVideofetchOp; let currentFetchOps = imageAndVideofetchOp;
let type = "video"; let type = "video";
let count = 2; let count = 2;
let typesArr = ["image/*", "video/mp4"]; let typesArr = ["image/jpeg", "video/mp4"];
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr);
}); });
...@@ -426,9 +426,9 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -426,9 +426,9 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
it("SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006", 0, async function (done) { it("SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006"; let testNum = "SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006";
let currentFetchOps = imageAndVideoAndfilefetchOp; let currentFetchOps = imageAndVideoAndfilefetchOp;
let type = "file"; let type = "application";
let count = 3; let count = 3;
let typesArr = ["image/*", "video/mp4", "file/*"]; let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream"];
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr);
}); });
...@@ -445,7 +445,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -445,7 +445,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp; let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp;
let type = "audio"; let type = "audio";
let count = 4; let count = 4;
let typesArr = ["image/*", "video/mp4", "file/*", "audio/mpeg"]; let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream", "audio/mpeg"];
await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr);
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册