diff --git a/entry/src/main/ets/MainAbility/pages/basicTestMediaImage.ets b/entry/src/main/ets/MainAbility/pages/basicTestMediaImage.ets index 105926a..06128a6 100644 --- a/entry/src/main/ets/MainAbility/pages/basicTestMediaImage.ets +++ b/entry/src/main/ets/MainAbility/pages/basicTestMediaImage.ets @@ -92,7 +92,7 @@ struct BasicTestMediaImage { .onClick(()=>{ resourceManager.getResourceManager() .then(result => { - result.getMedia($r('app.media.webpSample').id) + result.getMedia($r('app.media.jpgSample').id) .then(data => { let arrayBuffer = this.typedArrayToBuffer(data); let parseImageUtil = new ParseImageUtil(); diff --git a/entry/src/main/ets/MainAbility/pages/testAllTypeImageKnifeComponentPage.ets b/entry/src/main/ets/MainAbility/pages/testAllTypeImageKnifeComponentPage.ets index 5df34e3..3a8eb84 100644 --- a/entry/src/main/ets/MainAbility/pages/testAllTypeImageKnifeComponentPage.ets +++ b/entry/src/main/ets/MainAbility/pages/testAllTypeImageKnifeComponentPage.ets @@ -44,7 +44,7 @@ struct TestAllTypeImageKnifeComponentPage { }; @State imageKnifeOption3: ImageKnifeOption = { - loadSrc: $r('app.media.webpSample'), + loadSrc: $r('app.media.jpgSample'), size: { width: 300, height: 300 }, placeholderSrc: $r('app.media.Tomato'), errorholderSrc: $r('app.media.picture1'), diff --git a/entry/src/main/ets/MainAbility/pages/testAllTypeNativeImagePage.ets b/entry/src/main/ets/MainAbility/pages/testAllTypeNativeImagePage.ets index a946d49..b6188a7 100644 --- a/entry/src/main/ets/MainAbility/pages/testAllTypeNativeImagePage.ets +++ b/entry/src/main/ets/MainAbility/pages/testAllTypeNativeImagePage.ets @@ -28,7 +28,7 @@ struct TestAllTypeNativeImagePage { Image($r('app.media.pngSample')) .width(300) .height(300) - Image($r('app.media.webpSample')) + Image($r('app.media.jpgSample')) .width(300) .height(300) Image($r('app.media.svgSample')) diff --git a/entry/src/main/ets/MainAbility/pages/testImageKnifeOptionChangedPage.ets b/entry/src/main/ets/MainAbility/pages/testImageKnifeOptionChangedPage.ets index 7ed0f20..df15dcf 100644 --- a/entry/src/main/ets/MainAbility/pages/testImageKnifeOptionChangedPage.ets +++ b/entry/src/main/ets/MainAbility/pages/testImageKnifeOptionChangedPage.ets @@ -69,7 +69,7 @@ struct TestImageKnifeOptionChangedPage { Button('本地资源webp') .onClick(()=>{ this.imageKnifeOption1 = { - loadSrc: $r('app.media.webpSample'), + loadSrc: $r('app.media.jpgSample'), size: { width: 300, height: 300 }, placeholderSrc: $r('app.media.icon_loading'), errorholderSrc: $r('app.media.icon_failed'), diff --git a/entry/src/main/ets/MainAbility/pages/testPreloadPage.ets b/entry/src/main/ets/MainAbility/pages/testPreloadPage.ets index c7edc86..99e9bdc 100644 --- a/entry/src/main/ets/MainAbility/pages/testPreloadPage.ets +++ b/entry/src/main/ets/MainAbility/pages/testPreloadPage.ets @@ -63,7 +63,7 @@ struct TestPreloadPage { }; @State imageKnifeOption6: ImageKnifeOption = { - loadSrc: $r('app.media.webpSample'), + loadSrc: $r('app.media.jpgSample'), size: { width: 300, height: 300 }, placeholderSrc: $r('app.media.icon_loading'), errorholderSrc: $r('app.media.icon_failed'), @@ -301,7 +301,7 @@ struct TestPreloadPage { Button('预加载本地资源webp') .onClick(() => { let request = new RequestOption(); - request.load($r('app.media.webpSample')) + request.load($r('app.media.jpgSample')) .setImageViewSize({ width: 300, height: 300 }) .addListener((err, data) => { if (err && err.length > 0) { @@ -320,7 +320,7 @@ struct TestPreloadPage { Button('本地资源webp') .onClick(() => { this.imageKnifeOption3 = { - loadSrc: $r('app.media.webpSample'), + loadSrc: $r('app.media.jpgSample'), size: { width: 300, height: 300 }, placeholderSrc: $r('app.media.icon_loading'), errorholderSrc: $r('app.media.icon_failed'), diff --git a/entry/src/main/resources/base/media/webpSample.webp b/entry/src/main/resources/base/media/webpSample.webp deleted file mode 100644 index bcf109c..0000000 Binary files a/entry/src/main/resources/base/media/webpSample.webp and /dev/null differ diff --git a/entry/src/ohosTest/ets/TestAbility/app.ets b/entry/src/ohosTest/ets/TestAbility/app.ets index 4db82cf..bc4d7e2 100644 --- a/entry/src/ohosTest/ets/TestAbility/app.ets +++ b/entry/src/ohosTest/ets/TestAbility/app.ets @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' import { Hypium } from 'hypium/index' import testsuite from '../test/List.test' diff --git a/entry/src/ohosTest/ets/TestAbility/pages/index.ets b/entry/src/ohosTest/ets/TestAbility/pages/index.ets index 539eb9a..df4ccb0 100644 --- a/entry/src/ohosTest/ets/TestAbility/pages/index.ets +++ b/entry/src/ohosTest/ets/TestAbility/pages/index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import router from '@system.router'; @Entry diff --git a/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts b/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts index ed3ba0d..d1fb5ea 100644 --- a/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts +++ b/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import TestRunner from '@ohos.application.testRunner' import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' diff --git a/entry/src/ohosTest/ets/test/Ability.test.ets b/entry/src/ohosTest/ets/test/Ability.test.ets index 1236e0c..eb9e0b6 100644 --- a/entry/src/ohosTest/ets/test/Ability.test.ets +++ b/entry/src/ohosTest/ets/test/Ability.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index' export default function abilityTest() { diff --git a/entry/src/ohosTest/ets/test/List.test.ets b/entry/src/ohosTest/ets/test/List.test.ets index d766fe2..760f2aa 100644 --- a/entry/src/ohosTest/ets/test/List.test.ets +++ b/entry/src/ohosTest/ets/test/List.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import abilityTest from './Ability.test' export default function testsuite() {