diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/appear.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/appear.ets index 3378116eef4643f343d7532e36c39de9954fea94..84ca4d588ad6a5dcd9234ad33f28d54dcdc09658 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/appear.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/appear.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; import prompt from '@system.prompt' @Entry @@ -31,9 +31,9 @@ struct AppearExample { console.info('[appear] page show called'); var stateChangeEvent = { eventId: 58, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { @@ -68,10 +68,10 @@ struct AppearExample { } var backEvent = { eventId: 59, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("appearFlag start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch { console.info("appearFlag emit action state err: " + JSON.stringify(err.message)) } @@ -89,10 +89,10 @@ struct AppearExample { } var backEvent = { eventId: 60, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("disAppearFlag start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch { console.info("disAppearFlag emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/areaChange.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/areaChange.ets index e0dcb731a6fdd540d3e6a7461956613def614dbe..12626e86b9c3fbece80e2e3cba319f25ce85d04d 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/areaChange.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/areaChange.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -40,10 +40,10 @@ struct AreaExample { } var backEvent = { eventId: 61, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onClick start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onClick emit action state err: " + JSON.stringify(err.message)) } @@ -61,10 +61,10 @@ struct AreaExample { } var backEvent = { eventId: 62, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onAreaChange start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onAreaChange emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/column.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/column.ets index 4d77369946723ffe63b4d5903fccc69fc847441f..b89d57514137864070435f64d6093dce1d2240b7 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/column.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/column.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -25,9 +25,9 @@ struct ColumnExample { console.info('[column] page show called'); var stateChangeEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets index 61439d7b5a66afc15778e5269842c494c4c6e90a..67a5173c34c5aa59c57298ca04a2bd4fb04ed8c7 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -26,21 +26,21 @@ struct EllipseExample { console.info('[ellipse] page show called'); var stateChangeEvent = { eventId: 92, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 907, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack); + emitter.on(stateChangeEventTwo, this.stateChangCallBack); var stateChangeEventThree = { eventId: 908, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack); + emitter.on(stateChangeEventThree, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/enable.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/enable.ets index 9108c895f5f008a88a8a61a7e1fe60a1132e962d..ba96ee50bf4353121648527515729f14860d3bb5 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/enable.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/enable.ets @@ -15,7 +15,7 @@ */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -27,15 +27,15 @@ struct EnabledExample { console.info('[enabled] page show called '); var stateChangeEvent = { eventId: 93, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 1111, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/flex.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/flex.ets index 28a34c76c26d4db6e6527fa9021e31ca9a0b0721..59173742cfbc7b037a2607b9307afd63790ac1ce 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/flex.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/flex.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -69,9 +69,9 @@ struct FlexExample { console.info('flex page show called'); var stateChangeEvent = { eventId: 8, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gauge.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gauge.ets index b7845838561112e569aad0ae8713a1b0dcfb50f4..f21a676f319fdbd0d190c32fd53ae7f67b19bff5 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gauge.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gauge.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -49,33 +49,33 @@ struct GaugeExample { console.info('gauge page show called'); var stateChangeEvent = { eventId: 102, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 103, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack); + emitter.on(stateChangeEventTwo, this.stateChangCallBack); var stateChangeEvent3 = { eventId: 904, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent3, this.stateChangCallBack); + emitter.on(stateChangeEvent3, this.stateChangCallBack); var stateChangeEvent4 = { eventId: 905, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent4, this.stateChangCallBack); + emitter.on(stateChangeEvent4, this.stateChangCallBack); var stateChangeEvent5 = { eventId: 906, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent5, this.stateChangCallBack); + emitter.on(stateChangeEvent5, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridContainer.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridContainer.ets index 99ba9e26ad1a8c21b56c6c4d12f54ae81fba4acb..387d94c51cf6a39f909e880e9a900ba86f670e06 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridContainer.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridContainer.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -49,9 +49,9 @@ struct GridContainerExample { console.info('gridContainer page show called'); var stateChangeEvent = { eventId: 109, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridSettings.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridSettings.ets index 9e990d41b9b9af48ce999017febc4a0ab3b8440e..3af98ed88f19ca37f0565a2ae646b39037daac1f 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridSettings.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/gridSettings.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -64,19 +64,19 @@ struct GridSetting { onPageShow() { let smChangeEvent = { eventId: 9, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(smChangeEvent, this.stateChangCallBack); + emitter.on(smChangeEvent, this.stateChangCallBack); let offsetChangeEvent = { eventId: 10, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(offsetChangeEvent, this.stateChangCallBack); + emitter.on(offsetChangeEvent, this.stateChangCallBack); let spanChangeEvent = { eventId: 11, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(spanChangeEvent, this.stateChangCallBack); + emitter.on(spanChangeEvent, this.stateChangCallBack); } stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/imageEffects.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/imageEffects.ets index 3b474f93fde7d515a812b2cadd63f0bd0cf1b577..7f16d55a54f84936c59d4e8d796a3528999343c5 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/imageEffects.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/imageEffects.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -62,51 +62,51 @@ struct ImageEffectsExample { console.info('imageEffects page show called'); var stateChangeEvent = { eventId: 12, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 13, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); var stateChangeEvent3 = { eventId: 14, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent3, this.stateChangCallBack); + emitter.on(stateChangeEvent3, this.stateChangCallBack); var stateChangeEvent4 = { eventId: 15, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent4, this.stateChangCallBack); + emitter.on(stateChangeEvent4, this.stateChangCallBack); var stateChangeEvent5 = { eventId: 16, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent5, this.stateChangCallBack); + emitter.on(stateChangeEvent5, this.stateChangCallBack); var stateChangeEvent6 = { eventId: 17, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent6, this.stateChangCallBack); + emitter.on(stateChangeEvent6, this.stateChangCallBack); var stateChangeEvent7 = { eventId: 18, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent7, this.stateChangCallBack); + emitter.on(stateChangeEvent7, this.stateChangCallBack); var stateChangeEvent8 = { eventId: 19, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent8, this.stateChangCallBack); + emitter.on(stateChangeEvent8, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/layoutConstraints.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/layoutConstraints.ets index 99cad5462c33753c502d6729e943a8da55168ed2..c2b57547127b1473b8fa093793b13fe9552ad061 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/layoutConstraints.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/layoutConstraints.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; class ContainerInfo { label: string = '' @@ -111,21 +111,21 @@ struct LayoutConstraints { onPageShow() { let aspectRatioChangeEvent = { eventId: 20, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(aspectRatioChangeEvent, this.stateChangCallBack); + emitter.on(aspectRatioChangeEvent, this.stateChangCallBack); let priorityChangeEvent = { eventId: 21, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(priorityChangeEvent, this.stateChangCallBack); + emitter.on(priorityChangeEvent, this.stateChangCallBack); let priorityChangeEvent2 = { eventId: 1112, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(priorityChangeEvent2, this.stateChangCallBack); + emitter.on(priorityChangeEvent2, this.stateChangCallBack); } stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/list.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/list.ets index 9636cb7f60375e032978a7ead54669ab4c223f0a..d121c54913e0147ab972af26d9aa89577ceb0be4 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/list.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/list.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -33,33 +33,33 @@ struct ListExample { console.info('[list] page show called'); var stateChangeEvent = { eventId: 124, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo); + emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo); var stateChangeEvent3 = { eventId: 901, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent3, this.stateChangCallBackTwo); + emitter.on(stateChangeEvent3, this.stateChangCallBackTwo); var stateChangeEvent4 = { eventId: 902, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent4, this.stateChangCallBackTwo); + emitter.on(stateChangeEvent4, this.stateChangCallBackTwo); var stateChangeEvent5 = { eventId: 903, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent5, this.stateChangCallBackTwo); + emitter.on(stateChangeEvent5, this.stateChangCallBackTwo); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/marquee.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/marquee.ets index 17db402b7b887564815dc383ab52179666552ad1..001f773d55d84f94bc48d2ce8887b439f44446dc 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/marquee.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/marquee.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -56,10 +56,10 @@ struct MarqueeExample { } var backEvent = { eventId: 127, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("Onstart start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("Onstart emit action state err: " + JSON.stringify(err.message)) } @@ -75,10 +75,10 @@ struct MarqueeExample { } var backEvent = { eventId: 128, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("Onbounce start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("Onbounce emit action state err: " + JSON.stringify(err.message)) } @@ -95,10 +95,10 @@ struct MarqueeExample { } var backEvent = { eventId: 129, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("Onfinish start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("Onfinish emit action state err: " + JSON.stringify(err.message)) } @@ -115,10 +115,10 @@ struct MarqueeExample { } var backEvent = { eventId: 130, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/overlay.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/overlay.ets index a57b30816b8dea38ce57284fb2473d839f4cfac9..87bc51e61b18ef45ae473c6db35d3e84e189b443 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/overlay.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/overlay.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -28,15 +28,15 @@ struct OverlayExample { console.info('[overlay] page show called '); var stateChangeEvent = { eventId: 143, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 1110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/stepper.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/stepper.ets index dc8b5d8367f6921813f1e27de05805dede8dae27..a978556146f9976541203e7a360374cb895a9275 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/stepper.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/stepper.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -103,21 +103,21 @@ struct StepperExample { console.info('stepper page show called'); var stateChangeEvent = { eventId: 202, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 909, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack); + emitter.on(stateChangeEventTwo, this.stateChangCallBack); var stateChangeEventThree = { eventId: 910, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack); + emitter.on(stateChangeEventThree, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/swiper.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/swiper.ets index 3c86e68e9ee0486012fbda6d409b97c20499b248..3e774f52f23e4535876971755f1a836e4626f927 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/swiper.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/swiper.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; class MyDataSource implements IDataSource { private list: number[] = [] @@ -106,10 +106,10 @@ struct SwiperExample { } var backEvent = { eventId: 204, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onChange start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onChange emit action state err: " + JSON.stringify(err.message)) } @@ -130,10 +130,10 @@ struct SwiperExample { } var backEvent = { eventId: 205, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 emit action state err: " + JSON.stringify(err.message)) } @@ -152,10 +152,10 @@ struct SwiperExample { } var backEvent = { eventId: 206, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -168,27 +168,27 @@ struct SwiperExample { console.info('swiper page show called'); var stateChangeEvent = { eventId: 207, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 208, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 209, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 210, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/textStyle.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/textStyle.ets index 1c416aec4dde052afac7c532a9f202426a44d3b9..1f782aa40231edb884a226789510d82dfaab5fbf 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/textStyle.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/textStyle.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -74,29 +74,29 @@ struct TextStyle { onPageShow() { let fontColorChangeEvent = { eventId: 37, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(fontColorChangeEvent, this.textStyleChangCallBack); + emitter.on(fontColorChangeEvent, this.textStyleChangCallBack); let fontSizeChangeEvent = { eventId: 38, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(fontSizeChangeEvent, this.textStyleChangCallBack); + emitter.on(fontSizeChangeEvent, this.textStyleChangCallBack); let fontStyleChangeEvent = { eventId: 39, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(fontStyleChangeEvent, this.textStyleChangCallBack); + emitter.on(fontStyleChangeEvent, this.textStyleChangCallBack); let fontWeightChangeEvent = { eventId: 40, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(fontWeightChangeEvent, this.textStyleChangCallBack); + emitter.on(fontWeightChangeEvent, this.textStyleChangCallBack); let fontFamilyChangeEvent = { eventId: 41, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(fontFamilyChangeEvent, this.textStyleChangCallBack); + emitter.on(fontFamilyChangeEvent, this.textStyleChangCallBack); } textStyleChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touch.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touch.ets index d2f0963e4fb7260766976f1ca8993ae9ea87d4f2..f7a3c900f133f4044eee38d17b0c527c486be113 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touch.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touch.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Preview @@ -28,9 +28,9 @@ struct TouchExample { console.info('[touch] page show called'); var stateChangeEvent = { eventId: 42, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { @@ -97,11 +97,11 @@ struct TouchExample { console.log('fang--->C') var backEvent = { eventId: 43, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.log('fang--->D') console.info("touchFlag start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch { console.info("touchFlag emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touchAble.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touchAble.ets index 98909027fca647f2a32cca575d425c65f5890617..1af21eb1d007d21c50efd46e2bf89d89577d816b 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touchAble.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/touchAble.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -37,9 +37,9 @@ struct TouchAbleExample { console.info('[TouchAble] page show called'); var stateChangeEvent = { eventId: 44, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { @@ -69,10 +69,10 @@ struct TouchAbleExample { } var backEvent = { eventId: 237, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[TouchAble] start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("[TouchAble] emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/visibility.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/visibility.ets index e3d6ebcfab7ad2b167f68d7cdcce72ffb1cda99b..7ff8ea3906584a59eadec7025259fbba9be65c1f 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/visibility.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/visibility.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -24,21 +24,21 @@ struct VisibilityExample { onPageShow() { let hiddenChangeEvent = { eventId: 47, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(hiddenChangeEvent, this.hiddenChangCallBack) + emitter.on(hiddenChangeEvent, this.hiddenChangCallBack) let noneChangeEvent = { eventId: 48, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(noneChangeEvent, this.noneChangCallBack) + emitter.on(noneChangeEvent, this.noneChangCallBack) var stateChangeEvent2 = { eventId: 1116, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); } private hiddenChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/zIndex.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/zIndex.ets index d88271c8cda7b7858b5ed5c127b395c6f8b30a6a..a9fe4de66cd63e37e3aceadef5f561520d0b7f39 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/zIndex.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/zIndex.ets @@ -15,7 +15,7 @@ */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -26,15 +26,15 @@ struct zIndexExample { console.info('[zIndex] page show called '); var stateChangeEvent = { eventId: 236, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 1113, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AppearJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AppearJsunit.test.ets index d42a71b5f688f2ecb7fd1c31d47c48b31b89aca9..40374bbb58834a49f68d327437ca6637f4a246da 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AppearJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AppearJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function appearJsunit() { @@ -57,9 +57,9 @@ export default function appearJsunit() { } var appearEvent = { eventId: 58, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(appearEvent, callBackAppear); + emitter.on(appearEvent, callBackAppear); } catch (err) { console.info("testAppear01 on appearEvent err : " + JSON.stringify(err)); } @@ -78,9 +78,9 @@ export default function appearJsunit() { } var appearEvent = { eventId: 59, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(appearEvent, callBackAppear); + emitter.on(appearEvent, callBackAppear); } catch (err) { console.info("testAppear02 on appearEvent err : " + JSON.stringify(err)); } @@ -93,9 +93,9 @@ export default function appearJsunit() { } var disAppearEvent = { eventId: 60, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(disAppearEvent, callBackDisAppear); + emitter.on(disAppearEvent, callBackDisAppear); } catch (err) { console.info("testAppear02 on disAppearEvent err : " + JSON.stringify(err)); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AreaChangeJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AreaChangeJsunit.test.ets index a42c9be93362971159f25694ec9cb0c22cfab930..8788188fe078e88d608dba81b070b86a766ec41d 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AreaChangeJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/AreaChangeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function areaChangeJsunit() { @@ -54,17 +54,17 @@ export default function areaChangeJsunit() { } let indexEvent = { eventId: 61, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("areaChangeTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("areaChangeTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("areaChangeTest_0300 click result is: " + JSON.stringify(sendEventByKey('text1', 10, ""))); var innerEventOne = { eventId: 62, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } await Utils.sleep(1500); var callback1 = (eventData) => { @@ -72,9 +72,9 @@ export default function areaChangeJsunit() { expect(eventData.data.ACTION).assertEqual(true); } try { - events_emitter.on(innerEventOne, callback1); + emitter.on(innerEventOne, callback1); } catch (err) { - console.info("areaChangeTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("areaChangeTest_0300 on emitter err : " + JSON.stringify(err)); } console.info('areaChangeTest_0300 END'); done(); @@ -89,12 +89,12 @@ export default function areaChangeJsunit() { } let indexEvent = { eventId: 62, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("areaChangeTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("areaChangeTest_0400 on emitter err : " + JSON.stringify(err)); } console.info("areaChangeTest_0400 click result is: " + JSON.stringify(sendEventByKey('text1', 10, ""))); console.info('areaChangeTest_0400 END'); diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ColumnJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ColumnJsunit.test.ets index dd8675c3dabb65ae91aa17b6beff80f3ff889ff7..5dfe0656ca3fad862f108bdf2a67f25c86285604 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ColumnJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ColumnJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function columnJsunit() { @@ -67,10 +67,10 @@ export default function columnJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testColumn02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testColumn02] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets index 1b8e388fb01387d4f8a07184bcbae35366f1521a..4f23b9973a9376a8b0899031d30a479ae178bc18 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function ellipseJsunit() { @@ -68,10 +68,10 @@ export default function ellipseJsunit() { } var innerEvent = { eventId: 92, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEllipse02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEllipse02] change component data error: " + err.message); } @@ -94,10 +94,10 @@ export default function ellipseJsunit() { } var innerEvent = { eventId: 92, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEllipse03] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEllipse03] change component data error: " + err.message); } @@ -120,10 +120,10 @@ export default function ellipseJsunit() { } var innerEvent = { eventId: 907, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEllipse04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEllipse04] change component data error: " + err.message); } @@ -146,10 +146,10 @@ export default function ellipseJsunit() { } var innerEvent = { eventId: 907, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEllipse05] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEllipse05] change component data error: " + err.message); } @@ -172,10 +172,10 @@ export default function ellipseJsunit() { } var innerEvent = { eventId: 908, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEllipse06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEllipse06] change component data error: " + err.message); } @@ -198,10 +198,10 @@ export default function ellipseJsunit() { } var innerEvent = { eventId: 908, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEllipse07] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEllipse07] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EnableJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EnableJsunit.test.ets index ffc8a1aaaa3651d2682fc23fa3402a71598422fa..d4df66831b96d48ff16e7ccd995b2868fe72023f 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EnableJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/EnableJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function enableJsunit() { describe('enableTest', function () { @@ -67,10 +67,10 @@ export default function enableJsunit() { } var innerEvent = { eventId: 93, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEnable02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEnable02] change component data error: " + err.message); } @@ -93,10 +93,10 @@ export default function enableJsunit() { } var innerEvent = { eventId: 1111, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testEnable03] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testEnable03] change component data error: " + err.message); } @@ -119,10 +119,10 @@ export default function enableJsunit() { } let indexEvent = { eventId: 1111, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testEnable04 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testEnable04 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GaugeJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GaugeJsunit.test.ets index 2ea828a384c790e67a360c9a670a2e4ea2800846..9dc759ca49b83b4b4b49499d20b5bed39232be5e 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GaugeJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GaugeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function gaugeJsunit() { describe('gaugeTest', function () { @@ -69,10 +69,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 102, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge002] change component data error: " + err.message); } @@ -95,10 +95,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 102, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge003] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge003] change component data error: " + err.message); } @@ -121,10 +121,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 102, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge004] change component data error: " + err.message); } @@ -147,10 +147,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 102, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge005] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge005] change component data error: " + err.message); } @@ -173,10 +173,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 103, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge006] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge006] change component data error: " + err.message); } @@ -194,10 +194,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 904, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge007] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge007] change component data error: " + err.message); } @@ -220,10 +220,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 904, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge008] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge008] change component data error: " + err.message); } @@ -246,10 +246,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 904, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge009] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge009] change component data error: " + err.message); } @@ -272,10 +272,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 905, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge010] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge010] change component data error: " + err.message); } @@ -298,10 +298,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 905, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge011] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge011] change component data error: " + err.message); } @@ -324,10 +324,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 906, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge012] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge012] change component data error: " + err.message); } @@ -350,10 +350,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 906, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge013] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge013] change component data error: " + err.message); } @@ -376,10 +376,10 @@ export default function gaugeJsunit() { } var innerEvent = { eventId: 905, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGauge014] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGauge014] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridContainerJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridContainerJsunit.test.ets index 2caedbb807ed8bc4377f1407b030599cd65436ef..2d2f4ec20fca5af6988f7f4d1e54470f79dfd985 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridContainerJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridContainerJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function girdContainerJsunit() { @@ -72,10 +72,10 @@ export default function girdContainerJsunit() { } var innerEvent = { eventId: 109, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGirdContainer02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testGirdContainer02] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridSettingsJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridSettingsJsunit.test.ets index e07b5e133173ac9431f05fde4a13457669cbc79f..95d0d9467cd5ee91f8f4bde8cad54959c64e1d2f 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridSettingsJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/GridSettingsJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function gridSettingsJsunit() { @@ -77,10 +77,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 9, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings002] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings002] change component data error: " + err.message); } @@ -105,10 +105,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 9, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings003] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings003] change component data error: " + err.message); } @@ -133,10 +133,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 9, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings004] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings004] change component data error: " + err.message); } @@ -161,10 +161,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 9, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings005] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings005] change component data error: " + err.message); } @@ -199,10 +199,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 10, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings007] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings007] change component data error: " + err.message); } @@ -225,10 +225,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 10, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings008] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings008] change component data error: " + err.message); } @@ -251,10 +251,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 10, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings009] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings009] change component data error: " + err.message); } @@ -277,10 +277,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 10, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings010] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings010] change component data error: " + err.message); } @@ -314,10 +314,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 11, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings012] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings012] change component data error: " + err.message); } @@ -340,10 +340,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 11, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings013] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings013] change component data error: " + err.message); } @@ -366,10 +366,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 11, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings014] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings014] change component data error: " + err.message); } @@ -392,10 +392,10 @@ export default function gridSettingsJsunit() { } let indexEvent = { eventId: 11, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testGridSettings015] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testGridSettings015] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ImageEffectsJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ImageEffectsJsunit.test.ets index 2b09785cecf05d2284b59443e281af0252d4eb3b..f5a65d17f6c2702bb17e18e8ae1f3c50d20fd036 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ImageEffectsJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ImageEffectsJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function imageEffectsJsunit() { @@ -67,10 +67,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 12, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects002] change component data error: " + err.message); } @@ -93,10 +93,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 12, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects003] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects003] change component data error: " + err.message); } @@ -119,10 +119,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 12, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects004] change component data error: " + err.message); } @@ -145,10 +145,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 12, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects005] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects005] change component data error: " + err.message); } @@ -187,10 +187,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 13, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects007] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects007] change component data error: " + err.message); } @@ -217,10 +217,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 13, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects008] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects008] change component data error: " + err.message); } @@ -247,10 +247,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 13, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects009] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects009] change component data error: " + err.message); } @@ -277,10 +277,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 13, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects010] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects010] change component data error: " + err.message); } @@ -316,10 +316,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 15, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects012] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects012] change component data error: " + err.message); } @@ -342,10 +342,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 15, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects013] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects013] change component data error: " + err.message); } @@ -368,10 +368,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 15, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects014] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects014] change component data error: " + err.message); } @@ -394,10 +394,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 15, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects015] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects015] change component data error: " + err.message); } @@ -431,10 +431,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 16, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects017] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects017] change component data error: " + err.message); } @@ -457,10 +457,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 16, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects018] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects018] change component data error: " + err.message); } @@ -483,10 +483,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 16, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects019] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects019] change component data error: " + err.message); } @@ -509,10 +509,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 16, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects020] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects020] change component data error: " + err.message); } @@ -545,10 +545,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 17, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects022] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects022] change component data error: " + err.message); } @@ -571,10 +571,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 17, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects023] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects023] change component data error: " + err.message); } @@ -597,10 +597,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 17, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects024] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects024] change component data error: " + err.message); } @@ -623,10 +623,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 17, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects025] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects025] change component data error: " + err.message); } @@ -659,10 +659,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 18, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects027] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects027] change component data error: " + err.message); } @@ -685,10 +685,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 18, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects028] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects028] change component data error: " + err.message); } @@ -711,10 +711,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 18, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects029] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects029] change component data error: " + err.message); } @@ -737,10 +737,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 18, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects030] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects030] change component data error: " + err.message); } @@ -774,10 +774,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 19, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects032] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects032] change component data error: " + err.message); } @@ -800,10 +800,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 19, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects033] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects033] change component data error: " + err.message); } @@ -826,10 +826,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 19, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects034] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects034] change component data error: " + err.message); } @@ -852,10 +852,10 @@ export default function imageEffectsJsunit() { } var innerEvent = { eventId: 19, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testImageEffects035] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testImageEffects035] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/LayoutConstraintsJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/LayoutConstraintsJsunit.test.ets index cc8c91f2653d1134a15903683a2ed54b7434c014..6f5dc35220073601d4b62c5714cf8ff21329a0df 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/LayoutConstraintsJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/LayoutConstraintsJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function layoutConstraintsJsunit() { @@ -67,10 +67,10 @@ export default function layoutConstraintsJsunit() { } let indexEvent = { eventId: 20, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testLayoutConstraints002] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testLayoutConstraints002] change component data error: " + err.message); } @@ -104,10 +104,10 @@ export default function layoutConstraintsJsunit() { } let indexEvent = { eventId: 21, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testLayoutConstraints004] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testLayoutConstraints004] change component data error: " + err.message); } @@ -130,10 +130,10 @@ export default function layoutConstraintsJsunit() { } let indexEvent = { eventId: 1112, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testLayoutConstraints005] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testLayoutConstraints005] change component data error: " + err.message); } @@ -156,10 +156,10 @@ export default function layoutConstraintsJsunit() { } let indexEvent = { eventId: 1112, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testLayoutConstraints006] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testLayoutConstraints006] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ListJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ListJsunit.test.ets index 91545233b89e7feddff94759e75a19842b3b8360..c09eb3cc5bcca6f38f07ee62ccd360239f62f6b2 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ListJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ListJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function listJsunit() { describe('listTest', function () { @@ -73,10 +73,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 124, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList02] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList02] change component data error: " + err.message); } @@ -99,10 +99,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 124, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList03] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList03] change component data error: " + err.message); } @@ -125,10 +125,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 124, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList04] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList04] change component data error: " + err.message); } @@ -151,10 +151,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 124, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList05] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList05] change component data error: " + err.message); } @@ -177,10 +177,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList06] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList06] change component data error: " + err.message); } @@ -203,10 +203,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList07] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList07] change component data error: " + err.message); } @@ -229,10 +229,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList08] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList08] change component data error: " + err.message); } @@ -255,10 +255,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList09] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList09] change component data error: " + err.message); } @@ -281,10 +281,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 901, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList10] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList10] change component data error: " + err.message); } @@ -307,10 +307,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 902, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList11] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList11] change component data error: " + err.message); } @@ -333,10 +333,10 @@ export default function listJsunit() { } var innerEvent = { eventId: 903, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testList12] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testList12] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/MarqueeJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/MarqueeJsunit.test.ets index eca8b6662a14e5e391f521562d28e02be2e08ff8..2f472e623dc5d39a67f492c2014ff9d4fda9937c 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/MarqueeJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/MarqueeJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils.ets'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function marqueeJsunit() { describe('marqueeTest', function () { @@ -55,12 +55,12 @@ export default function marqueeJsunit() { } let indexEvent = { eventId: 130, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testMarquee_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("testMarquee_0100 on emitter err : " + JSON.stringify(err)); } console.info("testMarquee_0100 click result is: " + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000); @@ -70,12 +70,12 @@ export default function marqueeJsunit() { } var innerEventOne = { eventId: 127, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventOne, callback1); + emitter.on(innerEventOne, callback1); } catch (err) { - console.info("testMarquee_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("testMarquee_0100 on emitter err : " + JSON.stringify(err)); } console.info('testMarquee_0100 END'); done(); @@ -90,12 +90,12 @@ export default function marqueeJsunit() { } let indexEvent = { eventId: 130, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testMarquee_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("testMarquee_0200 on emitter err : " + JSON.stringify(err)); } console.info("testMarquee_0200 click result is: " + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000); @@ -105,12 +105,12 @@ export default function marqueeJsunit() { } var innerEventOne = { eventId: 128, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventOne, callback1) + emitter.on(innerEventOne, callback1) } catch (err) { - console.info("testMarquee_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("testMarquee_0200 on emitter err : " + JSON.stringify(err)); } console.info('testMarquee_0200 END'); done(); @@ -125,12 +125,12 @@ export default function marqueeJsunit() { } let indexEvent = { eventId: 130, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testMarquee_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("testMarquee_0300 on emitter err : " + JSON.stringify(err)); } console.info("testMarquee_0300 click result is: " + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000); @@ -140,12 +140,12 @@ export default function marqueeJsunit() { } var innerEventOne = { eventId: 129, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventOne, callback1) + emitter.on(innerEventOne, callback1) } catch (err) { - console.info("testMarquee_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("testMarquee_0300 on emitter err : " + JSON.stringify(err)); } console.info('testMarquee_0300 END'); done(); diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/OverlayJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/OverlayJsunit.test.ets index 196304fe9556128fb2a6f2db134b04521b3d597a..7177fde9fc493a06b9b837216b6eae3be88b9eb4 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/OverlayJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/OverlayJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function overLayJsunit() { @@ -70,10 +70,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 143, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay02] change component data error: " + err.message); } @@ -98,10 +98,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 143, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay03] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay03] change component data error: " + err.message); } @@ -127,10 +127,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 143, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay04] change component data error: " + err.message); } @@ -153,10 +153,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 1110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay05] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay05] change component data error: " + err.message); } @@ -180,10 +180,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 1110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay06] change component data error: " + err.message); } @@ -207,10 +207,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 1110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay07] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay07] change component data error: " + err.message); } @@ -233,10 +233,10 @@ export default function overLayJsunit() { } var innerEvent = { eventId: 1110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testOverlay08] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testOverlay08] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/StepperJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/StepperJsunit.test.ets index 8811e32a81d5303c5d45d5f2c29f57bb1375cfa1..c957076945a07e853e0d828374651d15f7d72f89 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/StepperJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/StepperJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils.ets'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function stepperJsunit() { describe('stepperTest', function () { @@ -72,10 +72,10 @@ export default function stepperJsunit() { } let indexEvent = { eventId: 202, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("stepperTest_0200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("stepperTest_0200 change component data error: " + err.message); } @@ -102,10 +102,10 @@ export default function stepperJsunit() { } let indexEvent = { eventId: 909, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("stepperTest_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("stepperTest_0300 change component data error: " + err.message); } @@ -132,10 +132,10 @@ export default function stepperJsunit() { } let indexEvent = { eventId: 909, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("stepperTest_0400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("stepperTest_0400 change component data error: " + err.message); } @@ -158,10 +158,10 @@ export default function stepperJsunit() { } var innerEvent = { eventId: 910, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[stepperTest_0500] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[stepperTest_0500] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/SwiperJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/SwiperJsunit.test.ets index 16d7ddf5c0a3480cc8949117f77c4961d8666591..91af9c1759d2b365c50f32016315f1dc38897a97 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/SwiperJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/SwiperJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils.ets'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function swiperJsunit() { describe('swiperTest', function () { @@ -116,10 +116,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 207, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_0600 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_0600 change component data error: " + err.message); } @@ -142,10 +142,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 207, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_0700 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_0700 change component data error: " + err.message); } @@ -167,12 +167,12 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 205, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("swiperTest_0800 on events_emitter err : " + JSON.stringify(err)); + console.info("swiperTest_0800 on emitter err : " + JSON.stringify(err)); } console.info("swiperTest_0800 click result is: " + JSON.stringify(sendEventByKey('button1', 10, ""))); await Utils.sleep(1000); @@ -189,12 +189,12 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 206, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("swiperTest_0900 on events_emitter err : " + JSON.stringify(err)); + console.info("swiperTest_0900 on emitter err : " + JSON.stringify(err)); } console.info("swiperTest_0900 click result is: " + JSON.stringify(sendEventByKey('button2', 10, ""))); await Utils.sleep(1000); @@ -211,12 +211,12 @@ export default function swiperJsunit() { } let indexEventOne = { eventId: 206, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callbackOne); + emitter.on(indexEventOne, callbackOne); } catch (err) { - console.info("swiperTest_1000 on events_emitter err : " + JSON.stringify(err)); + console.info("swiperTest_1000 on emitter err : " + JSON.stringify(err)); } console.info("swiperTest_1000 click result is: " + JSON.stringify(sendEventByKey('button2', 10, ""))); await Utils.sleep(1500); @@ -226,12 +226,12 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 204, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("swiperTest_1000 on events_emitter err : " + JSON.stringify(err)); + console.info("swiperTest_1000 on emitter err : " + JSON.stringify(err)); } console.info('swiperTest_1000 END'); done(); @@ -247,10 +247,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 208, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1100 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1100 change component data error: " + err.message); } @@ -273,10 +273,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 208, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1200 change component data error: " + err.message); } @@ -299,10 +299,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 209, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1300 change component data error: " + err.message); } @@ -325,10 +325,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 209, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1400 change component data error: " + err.message); } @@ -351,10 +351,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 210, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1500 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1500 change component data error: " + err.message); } @@ -377,10 +377,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 210, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1600 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1600 change component data error: " + err.message); } @@ -403,10 +403,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 208, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1700 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1700 change component data error: " + err.message); } @@ -429,10 +429,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 207, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1800 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1800 change component data error: " + err.message); } @@ -455,10 +455,10 @@ export default function swiperJsunit() { } let indexEvent = { eventId: 210, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("swiperTest_1900 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("swiperTest_1900 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TextStyleJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TextStyleJsunit.test.ets index 8f852f4861d6220d03b3562b07c12c9b27d44a61..b34d57935e43a30fab1b94ff6f5c1881153bc8a0 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TextStyleJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TextStyleJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function textStyleJsunit() { @@ -66,10 +66,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 37, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle002] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle002] change component data error: " + err.message); } @@ -92,10 +92,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 37, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle003] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle003] change component data error: " + err.message); } @@ -118,10 +118,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 37, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle004] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle004] change component data error: " + err.message); } @@ -144,10 +144,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 37, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle005] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle005] change component data error: " + err.message); } @@ -181,10 +181,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 38, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle007] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle007] change component data error: " + err.message); } @@ -207,10 +207,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 38, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle008] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle008] change component data error: " + err.message); } @@ -233,10 +233,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 38, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle009] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle009] change component data error: " + err.message); } @@ -259,10 +259,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 38, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle010] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle010] change component data error: " + err.message); } @@ -296,10 +296,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 39, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle012] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle012] change component data error: " + err.message); } @@ -322,10 +322,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 39, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle013] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle013] change component data error: " + err.message); } @@ -348,10 +348,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 39, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle014] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle014] change component data error: " + err.message); } @@ -374,10 +374,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 39, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle015] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle015] change component data error: " + err.message); } @@ -411,10 +411,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 40, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle017] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle017] change component data error: " + err.message); } @@ -437,10 +437,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 40, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle018] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle018] change component data error: " + err.message); } @@ -463,10 +463,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 40, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle019] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle019] change component data error: " + err.message); } @@ -489,10 +489,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 40, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle020] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle020] change component data error: " + err.message); } @@ -526,10 +526,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 41, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle022] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle022] change component data error: " + err.message); } @@ -552,10 +552,10 @@ export default function textStyleJsunit() { } let indexEvent = { eventId: 41, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTextStyle023] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testTextStyle023] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets index 6a602a82c9fb75af23aa64843663af4f5229afe3..78d1022c55df427cb0b62d7f2e50e62544d08e4e 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils.ets'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function touchAbleJsunit() { describe('touchAbleTest', function () { @@ -63,12 +63,12 @@ export default function touchAbleJsunit() { } var innerEventTwo = { eventId: 237, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventTwo, callbackTwo) + emitter.on(innerEventTwo, callbackTwo) } catch (err) { - console.info("[testTouchAble002] on events_emitter err : " + JSON.stringify(err)); + console.info("[testTouchAble002] on emitter err : " + JSON.stringify(err)); } console.info('[testClickEvent001] sendEventByKey ' + JSON.stringify(sendEventByKey('ellipse', 10, ""))); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchJsunit.test.ets index 4d4cb30f0f565f8cfba3260381402a5bdc2666e5..f62ceec9a03b2bea14778dad2bf5d58640fc7f2b 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function touchJsunit() { @@ -58,9 +58,9 @@ export default function touchJsunit() { } var backEvent = { eventId: 43, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(backEvent, callBackTouch); + emitter.on(backEvent, callBackTouch); } catch (err) { console.info("testTouch01 on touchEvent err : " + JSON.stringify(err)); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets index 77a867ea988cc2b2a0cb6b03a1555e7e44829a84..15c078459ed902127eec2f5cefff4530ec99b8e5 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function visibilityJsunit() { @@ -67,10 +67,10 @@ export default function visibilityJsunit() { } var innerEvent = { eventId: 47, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVisibility02] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVisibility02] change component data error: " + err.message); } @@ -93,10 +93,10 @@ export default function visibilityJsunit() { } var innerEvent = { eventId: 48, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVisibility03] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVisibility03] change component data error: " + err.message); } @@ -119,10 +119,10 @@ export default function visibilityJsunit() { } var innerEvent = { eventId: 1116, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVisibility04] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVisibility04] change component data error: " + err.message); } @@ -145,10 +145,10 @@ export default function visibilityJsunit() { } var innerEvent = { eventId: 1116, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVisibility05] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVisibility05] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ZIndexJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ZIndexJsunit.test.ets index 756ff704a5a6df7d0a6028111999701670e4372a..3e9505783c6d536968a9b5ad0ddfc8bec6903161 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ZIndexJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/ZIndexJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function zIndexJsunit() { describe('zIndexTest', function () { @@ -66,10 +66,10 @@ export default function zIndexJsunit() { } var innerEvent = { eventId: 236, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testZIndex02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testZIndex02] change component data error: " + err.message); } @@ -92,10 +92,10 @@ export default function zIndexJsunit() { } var innerEvent = { eventId: 236, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testZIndex03] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testZIndex03] change component data error: " + err.message); } @@ -118,10 +118,10 @@ export default function zIndexJsunit() { } var innerEvent = { eventId: 1113, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testZIndex04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testZIndex04] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/backgroundAndSizeSetting.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/backgroundAndSizeSetting.ets index fb44e9241f62a20c37fdfc72688bcb3c282e2228..52f7f36aa55522b787a05b48075a9b5c6b64d721 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/backgroundAndSizeSetting.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/backgroundAndSizeSetting.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -96,33 +96,33 @@ struct BackgroundExample { console.info('background page show called'); var stateChangeEvent = { eventId: 1, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 2, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo); + emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo); let stateChangeEventOne = { eventId: 34, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBackOne) + emitter.on(stateChangeEventOne, this.stateChangCallBackOne) let sizeChangeEvent = { eventId: 35, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(sizeChangeEvent, this.sizeChangCallBack) + emitter.on(sizeChangeEvent, this.sizeChangCallBack) let weightChangeEvent = { eventId: 36, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(weightChangeEvent, this.weightChangCallBack) + emitter.on(weightChangeEvent, this.weightChangCallBack) } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/border.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/border.ets index 28684b485e2a4ce27ef63982131047f75b09a189..0251208fd4c3917ecfc1bf27fb2b91060b7ce85c 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/border.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/border.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -62,9 +62,9 @@ struct BorderExample { console.info('border page show called'); var stateChangeEvent = { eventId: 3, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkbox.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkbox.ets index bc834479c6de7f36076f003dbcfad01fdded2e0e..db014699cffb681c3d90bb995555e4f095f11811 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkbox.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkbox.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -34,9 +34,9 @@ struct CheckboxExample { console.info('Checkbox page show called'); var stateChangeEvent = { eventId: 76, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkboxGroup.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkboxGroup.ets index 1740118fe84f31e787f5f09cc7810f297cd42d10..47670c6d48edb91ca038d9b73f10b8db07725a2c 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkboxGroup.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/checkboxGroup.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -34,9 +34,9 @@ struct CheckboxGroupExample { console.info('checkboxGroup page show called'); var stateChangeEvent = { eventId: 75, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/colorGradient.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/colorGradient.ets index e15d4e01e28d78b2c3b183191905cb15b89befe3..ffeb1a616625a69eb22f72950322a3bb4bc200a5 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/colorGradient.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/colorGradient.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -59,21 +59,21 @@ struct ColorGradientExample { console.info('[ColorGradient] page show called'); var stateChangeEvent = { eventId: 5, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 6, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 7, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/edgeEffect.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/edgeEffect.ets index f21e3e000673ac68f1881ce1944f3415d6cf34de..f928371749f88988c561f5a5dba2ff12ba21b04c 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/edgeEffect.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/edgeEffect.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -64,9 +64,9 @@ struct ListExample { console.info('edgeEffect page show called'); var stateChangeEvent = { eventId: 91, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/fillMode.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/fillMode.ets index bbc6ca90fbbee8f80fa5f7d964cbda7f7171f3a7..f06a9812fc52baa46d5c9dbec0b7c53bd558b68c 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/fillMode.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/fillMode.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -92,10 +92,10 @@ struct fillModeExample { } var backEvent = { eventId: 94, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button emit action state err: " + JSON.stringify(err.message)) } @@ -111,10 +111,10 @@ struct fillModeExample { } var backEvent = { eventId: 95, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 emit action state err: " + JSON.stringify(err.message)) } @@ -130,10 +130,10 @@ struct fillModeExample { } var backEvent = { eventId: 96, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets index ae371962ff70080eeb9745be5f84537b2bb2a487..53920b6aec91de9139ff60a03055449ae038780d 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/ohosMatrix4.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; import Matrix4 from '@ohos.matrix4' import prompt from '@system.prompt' @@ -67,9 +67,9 @@ struct ohosMatrix4 { var stateChangeEvent = { eventId: 140, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { @@ -119,10 +119,10 @@ struct ohosMatrix4 { } var backEvent = { eventId: 141, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/positionSetting.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/positionSetting.ets index e6159117f48b848f28c88389b5a50835c53d45d5..2c2317d26d60c37e991d08a433bae9e7412cc18c 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/positionSetting.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/positionSetting.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -109,33 +109,33 @@ struct PositionSetting { onPageShow() { let stateChangeEvent = { eventId: 25, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); let directionChangeEvent = { eventId: 26, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(directionChangeEvent, this.stateChangCallBack); + emitter.on(directionChangeEvent, this.stateChangCallBack); let positionChangeEvent = { eventId: 27, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(positionChangeEvent, this.stateChangCallBack); + emitter.on(positionChangeEvent, this.stateChangCallBack); let markAnchorChangeEvent = { eventId: 28, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(markAnchorChangeEvent, this.stateChangCallBack); + emitter.on(markAnchorChangeEvent, this.stateChangCallBack); let offsetChangeEvent = { eventId: 29, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(offsetChangeEvent, this.stateChangCallBack); + emitter.on(offsetChangeEvent, this.stateChangCallBack); } stateChangCallBack = (eventData) => { console.info("position page stateChangCallBack" + JSON.stringify(eventData)); diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/select.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/select.ets index 96086f2fcdaa045f7a4441f3b2a0b4333fb66262..efed42573e7a1605a92e895944c933f17b87b9c6 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/select.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/select.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -41,9 +41,9 @@ struct SliderExample { console.info('select page show called'); var stateChangeEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/shapeClipping.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/shapeClipping.ets index c9fe88918fbe0e16d608d3efbdc1dc7fdc701b58..8cec9e0b1809d7f797eaac646dde40410b20ebfb 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/shapeClipping.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/shapeClipping.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -46,15 +46,15 @@ struct ClipAndMaskExample { console.info('shapeClipping page show called'); var stateChangeEvent = { eventId: 32, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var shapeChangeEvent = { eventId: 33, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(shapeChangeEvent, this.shapeChangCallBack); + emitter.on(shapeChangeEvent, this.shapeChangCallBack); } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/slider.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/slider.ets index 1ac6ce6c3ca34ff5c1b2e840c10c2b17223c6d2d..3199f1691eb9faab477f189eee3059c7c53621a6 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/slider.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/slider.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -45,9 +45,9 @@ struct SliderExample { console.info('slider page show called'); var stateChangeEvent = { eventId: 196, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/transForm.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/transForm.ets index 174c99b932458466c61892317573f6289c0a576b..fe7352ead3084a558e99bccf32e2829b8fada7f9 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/transForm.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/transForm.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; import Matrix4 from '@ohos.matrix4' @Entry @@ -48,15 +48,15 @@ struct TransformExample { console.info('transFormExample page show called'); var stateChangeEvent = { eventId: 45, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 46, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/visibility.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/visibility.ets index 3d373657ff6ecb234c87e1a92028e2e9de139197..2a2541b231f0f55ad298fb2274ea51bde9d9beff 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/visibility.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/pages/visibility.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -24,15 +24,15 @@ struct VisibilityExample { onPageShow() { let hiddenChangeEvent = { eventId: 47, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(hiddenChangeEvent, this.hiddenChangCallBack) + emitter.on(hiddenChangeEvent, this.hiddenChangCallBack) let noneChangeEvent = { eventId: 48, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(noneChangeEvent, this.noneChangCallBack) + emitter.on(noneChangeEvent, this.noneChangCallBack) } private hiddenChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BackgroundAndSizeSettingJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BackgroundAndSizeSettingJsunit.test.ets index ee34b2a8e6dbb493ac0369759d306aa597a4ea1a..9c767d297af42842e4a89163d859c7ef14fdd77a 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BackgroundAndSizeSettingJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BackgroundAndSizeSettingJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function backgroundAndSizeSettingJsunit() { @@ -69,10 +69,10 @@ export default function backgroundAndSizeSettingJsunit() { } var innerEvent = { eventId: 2, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testBackgroundAndSizeSetting_0200 start pages"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testBackgroundAndSizeSetting_0200 change component data error: " + err.message); } @@ -136,10 +136,10 @@ export default function backgroundAndSizeSettingJsunit() { } let indexEvent = { eventId: 34, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBackgroundAndSizeSetting_0600] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testBackgroundAndSizeSetting_0600] change component data error: " + err.message); } @@ -167,10 +167,10 @@ export default function backgroundAndSizeSettingJsunit() { } let indexEvent = { eventId: 35, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBackgroundAndSizeSetting_0700] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testBackgroundAndSizeSetting_0700] change component data error: " + err.message); } @@ -206,10 +206,10 @@ export default function backgroundAndSizeSettingJsunit() { } let indexEvent = { eventId: 36, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBackgroundAndSizeSetting_0900] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testBackgroundAndSizeSetting_0900] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BorderJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BorderJsunit.test.ets index 72d8cea9dd90c7a55f3241dc397395dfdfc4d2f6..a407307e6215c8072cc15fa9e37e1f8cda656ed4 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BorderJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/BorderJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function borderJsunit() { @@ -81,10 +81,10 @@ export default function borderJsunit() { } var innerEvent = { eventId: 3, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBorder_0300] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBorder_0300] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ColorGradientJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ColorGradientJsunit.test.ets index 8c743cca44f37d813ff1db99ea87a710e0349362..dc0ca8ac24a2d7fb9ffd13090b08f77c5fa5e1b1 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ColorGradientJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ColorGradientJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function colorGradientJsunit() { @@ -76,10 +76,10 @@ export default function colorGradientJsunit() { } var innerEvent = { eventId: 5, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testColorGradient002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testColorGradient002] change component data error: " + err.message); } @@ -126,10 +126,10 @@ export default function colorGradientJsunit() { } var innerEvent = { eventId: 6, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testColorGradient004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testColorGradient004] change component data error: " + err.message); } @@ -176,10 +176,10 @@ export default function colorGradientJsunit() { } var innerEvent = { eventId: 7, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testColorGradient006] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testColorGradient006] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/EdgeEffectJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/EdgeEffectJsunit.test.ets index 933022caf13c4574ade846618e6ce43b3a21ffc5..5fa8ce1d9bf6854e10e9eb3f9903a1bea1dc010b 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/EdgeEffectJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/EdgeEffectJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function edgeEffectJsunit(){ describe('edgeEffectTest', function (){ @@ -65,10 +65,10 @@ export default function edgeEffectJsunit(){ } let indexEvent = { eventId: 91, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("edgeEffectTest_0200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("edgeEffectTest_0200 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/FillModeJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/FillModeJsunit.test.ets index bed5f09e8656ddf2754bd1feea1ac8fe756d1a9c..1a5e47a8c8dcf92327fa103e51b24e41e3c57381 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/FillModeJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/FillModeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function fillModeJsunit(){ @@ -55,12 +55,12 @@ export default function fillModeJsunit(){ } let indexEvent = { eventId: 94, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("fillModeTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("fillModeTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("fillModeTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1000); @@ -77,12 +77,12 @@ export default function fillModeJsunit(){ } let indexEvent = { eventId: 95, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("fillModeTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("fillModeTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("fillModeTest_0200 click result is: " + JSON.stringify(sendEventByKey('button1',10,""))); await Utils.sleep(1000); @@ -99,12 +99,12 @@ export default function fillModeJsunit(){ } let indexEvent = { eventId: 96, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("fillModeTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("fillModeTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("fillModeTest_0300 click result is: " + JSON.stringify(sendEventByKey('button2',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets index 5c9e49c72bab60dae7e9d3b336a6d1e467443d24..cf060d7e194ba1e39d5b59ee5c7ed8c1903c49b0 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function ohosMatrix4Jsunit() { @@ -102,10 +102,10 @@ export default function ohosMatrix4Jsunit() { } var innerEvent = { eventId: 140, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_OhosMatrix4_004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_OhosMatrix4_004] change component data error: " + err.message); } @@ -126,12 +126,12 @@ export default function ohosMatrix4Jsunit() { } var innerEvent = { eventId: 141, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[test_OhosMatrix4_005] on events_emitter err : " + JSON.stringify(err)); + console.info("[test_OhosMatrix4_005] on emitter err : " + JSON.stringify(err)); } console.info('[test_OhosMatrix4_005] sendEventByKey ' + JSON.stringify(sendEventByKey('rotate5', 10, ""))); await Utils.sleep(1000) @@ -157,10 +157,10 @@ export default function ohosMatrix4Jsunit() { } var innerEvent = { eventId: 140, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_OhosMatrix4_006] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_OhosMatrix4_006] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/PositionSettingJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/PositionSettingJsunit.test.ets index a10bd3ca79d9d113cbf3f21840b52ddfa5afd610..90535049877ed2a3d62b7f2d1619e486d06c13e9 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/PositionSettingJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/PositionSettingJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function positionSettingJsunit() { @@ -80,10 +80,10 @@ export default function positionSettingJsunit() { } let indexEvent = { eventId: 25, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPositionSetting003] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testPositionSetting003] change component data error: " + err.message); } @@ -108,10 +108,10 @@ export default function positionSettingJsunit() { } let indexEvent = { eventId: 26, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPositionSetting004] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testPositionSetting004] change component data error: " + err.message); } @@ -162,10 +162,10 @@ export default function positionSettingJsunit() { } let indexEvent = { eventId: 27, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPositionSetting006] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testPositionSetting006] change component data error: " + err.message); } @@ -212,10 +212,10 @@ export default function positionSettingJsunit() { } let indexEvent = { eventId: 28, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPositionSetting008] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testPositionSetting008] change component data error: " + err.message); } @@ -257,10 +257,10 @@ export default function positionSettingJsunit() { } let indexEvent = { eventId: 29, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPositionSetting010] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testPositionSetting010] change component data error: " + err.message); } @@ -296,10 +296,10 @@ export default function positionSettingJsunit() { } var innerEvent = { eventId: 25, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPositionSetting012] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testPositionSetting012] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SelectJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SelectJsunit.test.ets index 5ed15645e9261580f825cf69b794cf5bac202efc..743eb43ab450f40c96be711c29a1c01663a0c3eb 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SelectJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SelectJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function selectJsunit() { @@ -67,10 +67,10 @@ export default function selectJsunit() { } var innerEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_0200] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[selectTest_0200] change component data error: " + err.message); } @@ -111,10 +111,10 @@ export default function selectJsunit() { } var innerEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_0400] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[selectTest_0400] change component data error: " + err.message); } @@ -152,10 +152,10 @@ export default function selectJsunit() { } let indexEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_0600] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[selectTest_0600] change component data error: " + err.message); } @@ -179,10 +179,10 @@ export default function selectJsunit() { } var innerEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_0700] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[selectTest_0700] change component data error: " + err.message); } @@ -205,10 +205,10 @@ export default function selectJsunit() { } var innerEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_0800] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[selectTest_0800] change component data error: " + err.message); } @@ -231,10 +231,10 @@ export default function selectJsunit() { } var innerEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_0900] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[selectTest_0900] change component data error: " + err.message); } @@ -256,10 +256,10 @@ export default function selectJsunit() { } let indexEvent = { eventId: 191, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[selectTest_1000] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[selectTest_1000] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ShapeClippingJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ShapeClippingJsunit.test.ets index 10f0cccc045e4c75a6b82e0e554aab261ff97aaf..00197dba7bf87ddfb2695521d6aca255842c6af0 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ShapeClippingJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/ShapeClippingJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function shapeClippingJsunit() { @@ -84,10 +84,10 @@ export default function shapeClippingJsunit() { } var innerEvent = { eventId: 32, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testShapeClipping003] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testShapeClipping003] change component data error: " + err.message); } @@ -110,10 +110,10 @@ export default function shapeClippingJsunit() { } var innerEvent = { eventId: 33, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testShapeClipping004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testShapeClipping004] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets index 0b366048986cbcc325970c02dc16e62e3b8d9da4..528c3b5fa644be76dd8500d9bd0c2fcbcf055e7c 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function sliderJsunit() { @@ -66,10 +66,10 @@ export default function sliderJsunit() { } let indexEvent = { eventId: 196, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSlider002] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSlider002] change component data error: " + err.message); } @@ -103,10 +103,10 @@ export default function sliderJsunit() { } var innerEvent = { eventId: 196, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSlider004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testSlider004] change component data error: " + err.message); } @@ -139,10 +139,10 @@ export default function sliderJsunit() { } let indexEvent = { eventId: 196, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testSlider006 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testSlider006 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/TransFormJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/TransFormJsunit.test.ets index 5ca8760bb5805cb58ba50358fc8df08cbb1bd66d..b8ea8acbfac756e55bd724f5f289c4265975f0cf 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/TransFormJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/TransFormJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function transFormJsunit() { describe('appInfoTest', function () { @@ -73,10 +73,10 @@ export default function transFormJsunit() { } var innerEvent = { eventId: 45, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTransForm002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testTransForm002] change component data error: " + err.message); } @@ -116,10 +116,10 @@ export default function transFormJsunit() { } var innerEvent = { eventId: 46, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testTransForm004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testTransForm004] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets index 5fc459189c773573f06ee6b36894babcab62c94c..73f9f7a3a19b3aa90341f660f85e8091480fd1d7 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/VisibilityJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function visibilityJsunit() { describe('appInfoTest', function () { @@ -66,10 +66,10 @@ export default function visibilityJsunit() { } var innerEvent = { eventId: 47, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVisibility02] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVisibility02] change component data error: " + err.message); } @@ -92,10 +92,10 @@ export default function visibilityJsunit() { } var innerEvent = { eventId: 48, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVisibility03] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVisibility03] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/calendar.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/calendar.ets index 04205d8e93619a6e5a62ee900041618d54468407..9e029d2ce34aa23d58b205db4c18f8df39c5f757 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/calendar.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/calendar.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -161,9 +161,9 @@ struct CalendarComponentExample { console.info('Calendar page show called'); var stateChangeEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/customDialogController.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/customDialogController.ets index a5ca16ed83f445923f7aa967de8623196d7258cb..45fb48b88f72cb358150e80bca3fcdf6b4c48e67 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/customDialogController.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/customDialogController.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @CustomDialog struct CustomDialogExample { @@ -62,9 +62,9 @@ struct CustomDialogUser { console.info('checkboxGroup page show called'); var stateChangeEvent = { eventId: 79, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } dialogController: CustomDialogController = new CustomDialogController({ @@ -101,10 +101,10 @@ struct CustomDialogUser { } var backEvent = { eventId: 236, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/dragEvent.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/dragEvent.ets index 050cc56b456f03cec802e5529fe19ac53de2fe8e..d6e16f31a40c721ffb313caf6cc202d7d0f9dbe9 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/dragEvent.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/dragEvent.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -61,10 +61,10 @@ struct DragExample { } var backEvent = { eventId: 86, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("apple start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("apple emit action state err: " + JSON.stringify(err.message)) } @@ -143,10 +143,10 @@ struct DragExample { } var backEvent = { eventId: 87, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onDragEnter start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onDragEnter emit action state err: " + JSON.stringify(err.message)) } @@ -161,10 +161,10 @@ struct DragExample { } var backEvent = { eventId: 88, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onDragMove start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onDragMove emit action state err: " + JSON.stringify(err.message)) } @@ -179,10 +179,10 @@ struct DragExample { } var backEvent = { eventId: 89, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onDragLeave start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onDragLeave emit action state err: " + JSON.stringify(err.message)) } @@ -197,10 +197,10 @@ struct DragExample { } var backEvent = { eventId: 90, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onDrop start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onDrop emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/focus.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/focus.ets index 49ac4d8882bbe9052c6d9b3107c0dafed9f92f86..109a94e820f3c7f8e07aace4142098a3a5d040e8 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/focus.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/focus.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -74,9 +74,9 @@ struct FocusableExample { console.info('focus page show called'); var stateChangeEvent = { eventId: 101, - priority:events_emitter.EventPriority.LOW + priority:emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/geometryTransition.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/geometryTransition.ets index 4693a3d41c138aa39f6c85bb1ed3d3e29d2a8fee..b3fa60a986891adb6752238d0dc9b95276aff840 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/geometryTransition.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/geometryTransition.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -33,10 +33,10 @@ struct geometryTransitionExample { } var backEvent = { eventId: 104, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("geometryTransitionTest_0100 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("geometryTransitionTest_0100 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/ohosPrompt.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/ohosPrompt.ets index 42f3499d2fef17445507ea01ae1a488c86e4ab02..c63fb94e0635e45608b476fc099c62a3aee51c73 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/ohosPrompt.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/ohosPrompt.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; import prompt from '@ohos.prompt' @Entry @@ -34,10 +34,10 @@ struct OhosPrompt { } var backEvent = { eventId: 142, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/panel.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/panel.ets index 22b8e9dad705029b77836d8a2999faaaae830820..b20822d8a3e30224237590c3e172f3f6438e65b6 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/panel.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/panel.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -37,19 +37,19 @@ struct PanelExample { console.info('rating page show called'); var stateChangeEvent = { eventId: 147, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 148, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventThree = { eventId: 149, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets index 72c0a1ec98779efd6680460b0405a97989dfc825..52d433096990922aefaccc953468a0c5aedf092a 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -28,9 +28,9 @@ struct PathExample { console.info('[path] page show called '); var stateChangeEvent = { eventId: 151, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/patternLock.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/patternLock.ets index 7f6039809f4ee4f71518f24d62fd46819e217aea..abe86067160c623d0613b4864d8fedeae9ed9dfb 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/patternLock.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/patternLock.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -33,9 +33,9 @@ struct PatternLockExample { console.info('[PatternLock] page show called'); var stateChangeEvent = { eventId: 152, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } @@ -107,10 +107,10 @@ struct PatternLockExample { } var backEvent = { eventId: 153, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("reset button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("reset button emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/playMode.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/playMode.ets index c8c686a136bf1c165da576ad8a455db72865a8a6..984c7dd016b642160308b729fdbd9efac574ae76 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/playMode.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/playMode.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -34,10 +34,10 @@ struct PlayModeExample { } var backEvent = { eventId: 161, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/refresh.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/refresh.ets index bcb1d152dbdb39cd300af3fef9c6272ba308ad77..6ec173db9423ac3f0df397209ef84b68b40e2edc 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/refresh.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/refresh.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import eventsEmitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/richText.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/richText.ets index dc6f35a2c5f12b6f409069f7fbf26331ae42b7e7..d7206b1754a334eee34af2af6702f8032415e760 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/richText.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/richText.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import eventsEmitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/sideBar.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/sideBar.ets index d5843573cce3d739fe375ba7d10a1dd26bc32923..a652b672712cebffddbe972d62a090070bf44cd9 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/sideBar.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/sideBar.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -49,9 +49,9 @@ struct SideBarExample { console.info('sideBar page show called'); var stateChangeEvent = { eventId: 195, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { SideBarContainer(SideBarContainerType.Embed) diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/systemRouterB.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/systemRouterB.ets index 51e8b0cbd3b2bc93a7d699e1066a0028d0da1959..5d174e8fff4467e97c219cc7f22fab8efc885cd0 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/systemRouterB.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/systemRouterB.ets @@ -15,7 +15,7 @@ */ import router from '@system.router'; -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -43,10 +43,10 @@ struct SystemRouterB { } let paramsEvent = { eventId: 211, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[SystemRouterB] start to emit params"); - events_emitter.emit(paramsEvent, paramsData); + emitter.emit(paramsEvent, paramsData); } catch (err) { console.info("[SystemRouterB] emit params err: " + JSON.stringify(err.message)); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets index f45e3e8a41ff2bd70774e55b9dcbc13a7892dc66..d8ce6ea1dd93d358d2bb566618c7b6dae57a5a29 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -28,28 +28,28 @@ struct TextAreaExample2 { console.info('swiper page show called'); var stateChangeEvent = { eventId: 215, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.log("fang--->B"); - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 216, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 217, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventThree = { eventId: 218, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textClock.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textClock.ets index 412a477e18a1f12262a95f37a0c2939bd6759730..60b5a5203ab1489ef5563a7e5e82d8dfb90f0ccf 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textClock.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textClock.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -29,27 +29,27 @@ struct Second { console.info('swiper page show called'); var stateChangeEvent = { eventId: 219, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 220, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 221, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventThree = { eventId: 222, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { @@ -92,10 +92,10 @@ struct Second { } var backEvent = { eventId: 223, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("onChange start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("onChange emit action state err: " + JSON.stringify(err.message)) } @@ -121,10 +121,10 @@ struct Second { } var backEvent = { eventId: 224, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textInput.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textInput.ets index c6334028f2b0d6af0babcd81cfe275b1acaef44f..9dde867b8c6eeaf747fcb54209bcbc3e8899097c 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textInput.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textInput.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -27,9 +27,9 @@ struct TextAreaExample2 { onPageShow() { var stateChangeEvent = { eventId: 225, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/video.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/video.ets index 511ec54edbf36c3dc1c4dc8f073bfa0ef5ba8f4a..0b7cf73f55fd2257c02ebc243b14a67320e58e9a 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/video.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/video.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import eventsEmitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CalendarJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CalendarJsunit.test.ets index 99c94cb322bb4621cea1bd4541131185a97acddc..266cae08441b8ac28b9e08a198cfa5e310f33076 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CalendarJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CalendarJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function calendarJsunit() { @@ -58,10 +58,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_colSpace] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_colSpace] change component data error: " + err.message); } @@ -79,10 +79,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_dailyFiveRowSpace] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_dailyFiveRowSpace] change component data error: " + err.message); } @@ -101,10 +101,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_dailySixRowSpace] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_dailySixRowSpace] change component data error: " + err.message); } @@ -123,10 +123,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_lunarHeight] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_lunarHeight] change component data error: " + err.message); } @@ -145,10 +145,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_underscoreWidth] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_underscoreWidth] change component data error: " + err.message); } @@ -167,10 +167,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_underscoreLength] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_underscoreLength] change component data error: " + err.message); } @@ -189,10 +189,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_scheduleMarkerRadius] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_scheduleMarkerRadius] change component data error: " + err.message); } @@ -211,10 +211,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CurrentDayStyle_boundaryRowOffset] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CurrentDayStyle_boundaryRowOffset] change component data error: " + err.message); } @@ -232,10 +232,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_WeekStyle_weekAndDayRowSpace] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_WeekStyle_weekAndDayRowSpace] change component data error: " + err.message); } @@ -254,10 +254,10 @@ export default function calendarJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ACE_calendar_CalendarAttribute_direction] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[ACE_calendar_CalendarAttribute_direction] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CustomDialogControllerJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CustomDialogControllerJsunit.test.ets index 262669fd892d04eadd3b716be071109ead8903b8..066de2dcbdf622370f80166f39431145ac1e2fcd 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CustomDialogControllerJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/CustomDialogControllerJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function customDialogControllerJsunit() { describe('customDialogControllerTest', function () { @@ -53,12 +53,12 @@ export default function customDialogControllerJsunit() { } var innerEvent = { eventId: 236, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[testClickEvent001] on events_emitter err : " + JSON.stringify(err)); + console.info("[testClickEvent001] on emitter err : " + JSON.stringify(err)); } console.info('[testClickEvent001] sendEventByKey ' + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/DragEventJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/DragEventJsunit.test.ets index 5f67ce882df99487296c925da27d767165927c32..be9691df1544f0664d33e1424f075da349e47872 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/DragEventJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/DragEventJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function dragEventJsunit(){ describe('dragEventTest', function (){ @@ -62,12 +62,12 @@ export default function dragEventJsunit(){ } let indexEvent = { eventId: 86, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("dragEventTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("dragEventTest_0100 on emitter err : " + JSON.stringify(err)); } console.info('dragEventTest_0100 END'); done(); @@ -91,12 +91,12 @@ export default function dragEventJsunit(){ } let indexEvent = { eventId: 87, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("dragEventTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("dragEventTest_0200 on emitter err : " + JSON.stringify(err)); } console.info('dragEventTest_0200 END'); done(); @@ -119,12 +119,12 @@ export default function dragEventJsunit(){ } let indexEvent = { eventId: 88, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("dragEventTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("dragEventTest_0300 on emitter err : " + JSON.stringify(err)); } console.info('dragEventTest_0300 END'); done(); @@ -147,12 +147,12 @@ export default function dragEventJsunit(){ } let indexEvent = { eventId: 89, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("dragEventTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("dragEventTest_0400 on emitter err : " + JSON.stringify(err)); } console.info('dragEventTest_0400 END'); done(); @@ -175,12 +175,12 @@ export default function dragEventJsunit(){ } let indexEvent = { eventId: 90, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("dragEventTest_0500 on events_emitter err : " + JSON.stringify(err)); + console.info("dragEventTest_0500 on emitter err : " + JSON.stringify(err)); } console.info('dragEventTest_0500 END'); done(); diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/FocusJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/FocusJsunit.test.ets index 70e40610ac46f5a93aa5977a814dd231ace836da..fbb0610296e0e168180bc96fb0d784647abcfee4 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/FocusJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/FocusJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function focusJsunit() { @@ -56,10 +56,10 @@ export default function focusJsunit() { } let indexEventOne = { eventId: 101, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("focusTest_0100 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("focusTest_0100 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/GeometryTransitionJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/GeometryTransitionJsunit.test.ets index 549b647833fbb1deacc10372323d57398612faba..3f8b75d32ceec5a01d094d970c52f7fbce807fb2 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/GeometryTransitionJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/GeometryTransitionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function geometryTransitionJsunit() { @@ -49,7 +49,7 @@ export default function geometryTransitionJsunit() { console.info('geometryTransitionTest_0100 START'); let indexEvent = { eventId: 104, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } await Utils.sleep(1000); let callback = (indexEvent) => { @@ -57,9 +57,9 @@ export default function geometryTransitionJsunit() { expect(indexEvent.data.btn1).assertEqual(false); } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("geometryTransitionTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("geometryTransitionTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("geometryTransitionTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/OhosPromptJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/OhosPromptJsunit.test.ets index bb3b4da860388c6fbc2314215214ce961a44d564..c7d14807504aaf49fe031249b0e23da9ae6e7d77 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/OhosPromptJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/OhosPromptJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function ohosPromptJsunit() { @@ -54,12 +54,12 @@ export default function ohosPromptJsunit() { } var innerEvent = { eventId: 142, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[test_OhosPrompt_001] on events_emitter err : " + JSON.stringify(err)); + console.info("[test_OhosPrompt_001] on emitter err : " + JSON.stringify(err)); } console.info('[test_OhosPrompt_001] sendEventByKey ' + JSON.stringify(sendEventByKey('rotate5', 10, ""))); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PanelJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PanelJsunit.test.ets index 3eda44f7a89d2a2f8357241096ec818610d8f4b3..b2b17ed4dc2401dc47c457404d108c87791d9b4f 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PanelJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PanelJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function panelJsunit() { describe('panelTest', function () { @@ -56,10 +56,10 @@ export default function panelJsunit() { } var innerEvent = { eventId: 147, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testPanel_100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testPanel_100 change component data error: " + err.message); } @@ -84,10 +84,10 @@ export default function panelJsunit() { } var innerEvent = { eventId: 148, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testPanel_200 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testPanel_200 change component data error: " + err.message); } @@ -112,10 +112,10 @@ export default function panelJsunit() { } var innerEvent = { eventId: 149, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testPanel_300 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testPanel_300 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets index 7d60b20b058ef4da987aa110679e3e0b267420b3..3554f91dc15591b8a712e3562f659095fef40d26 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function enableJsunit() { @@ -70,10 +70,10 @@ export default function enableJsunit() { } var innerEvent = { eventId: 151, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPath02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testPath02] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PatternLockJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PatternLockJsunit.test.ets index 7c06d01d34c60d9cc747b4696714d65ae885fa4a..947b49e00e794e2df0140a10b6ccc944985fdd21 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PatternLockJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PatternLockJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function patternLockJsunit() { @@ -56,12 +56,12 @@ export default function patternLockJsunit() { } let indexEvent = { eventId: 153, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testPatternLock_01 on events_emitter err : " + JSON.stringify(err)); + console.info("testPatternLock_01 on emitter err : " + JSON.stringify(err)); } console.info("testPatternLock_01 click result is: " + JSON.stringify(sendEventByKey('button1',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PlayModeJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PlayModeJsunit.test.ets index 28dcf25774c1499d6350a715157a07a94ae9ef10..5c8f0fdf9a6143aaaa4b177bdfcfe01220790e45 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PlayModeJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PlayModeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function playModeJsunit(){ @@ -51,16 +51,16 @@ export default function playModeJsunit(){ await Utils.sleep(1500); let indexEvent = { eventId: 161, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback= (indexEvent) => { console.info("playModeTest_0100 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.playMode).assertEqual(PlayMode.AlternateReverse) } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("playModeTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("playModeTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("playModeTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/SystemRouterJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/SystemRouterJsunit.test.ets index e0e0ba405b1974d84d5f21c44265a3a0c6e65b3f..080e006c93472bd7d55f98c18cca69e44ea62245 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/SystemRouterJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/SystemRouterJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function systemRouterJsunit() { describe('systemRouterTest', function () { @@ -57,12 +57,12 @@ export default function systemRouterJsunit() { } let paramsEvent = { eventId: 211, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(paramsEvent, callback); + emitter.on(paramsEvent, callback); } catch (err) { - console.info("[systemRouterTest002] on events_emitter err : " + JSON.stringify(err)); + console.info("[systemRouterTest002] on emitter err : " + JSON.stringify(err)); } console.info("[systemRouterTest002] click push button result is: " + JSON.stringify(sendEventByKey('pushButtonA', 10, ""))); @@ -134,12 +134,12 @@ export default function systemRouterJsunit() { } let paramsEvent = { eventId: 211, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(paramsEvent, callback); + emitter.on(paramsEvent, callback); } catch (err) { - console.info("[systemRouterTest005] on events_emitter err : " + JSON.stringify(err)); + console.info("[systemRouterTest005] on emitter err : " + JSON.stringify(err)); } console.info("[systemRouterTest005] click replace button result is: " + JSON.stringify(sendEventByKey('ReplaceButtonA', 10, ""))); diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets index 7fbd317bd5173e122b8a80be381c677b8bfa81e0..d8da06f0c8a497fff0bff7391d06bb2735083936 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function textAreaJsunit() { @@ -68,10 +68,10 @@ export default function textAreaJsunit() { } var innerEvent = { eventId: 215, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textAreaTest02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textAreaTest02] change component data error: " + err.message); } @@ -105,10 +105,10 @@ export default function textAreaJsunit() { } var innerEvent = { eventId: 216, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textAreaTest04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textAreaTest04] change component data error: " + err.message); } @@ -142,10 +142,10 @@ export default function textAreaJsunit() { } var innerEvent = { eventId: 217, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textAreaTest06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textAreaTest06] change component data error: " + err.message); } @@ -179,10 +179,10 @@ export default function textAreaJsunit() { } var innerEvent = { eventId: 218, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textAreaTest08] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textAreaTest08] change component data error: " + err.message); } @@ -216,10 +216,10 @@ export default function textAreaJsunit() { } var innerEvent = { eventId: 218, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textAreaTest10] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textAreaTest10] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextClockJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextClockJsunit.test.ets index e0d06156526a983e5b8d4ce32afe74d5c8bad81b..719a8ca0e0bedd9c2afec841884c6c60938ccb0c 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextClockJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextClockJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function textClockJsunit() { @@ -68,10 +68,10 @@ export default function textClockJsunit() { } var innerEvent = { eventId: 219, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textClockTest02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textClockTest02] change component data error: " + err.message); } @@ -104,10 +104,10 @@ export default function textClockJsunit() { } let indexEvent = { eventId: 220, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textClockTest04] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[textClockTest04] change component data error: " + err.message); } @@ -141,10 +141,10 @@ export default function textClockJsunit() { } var innerEvent = { eventId: 221, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textClockTest06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textClockTest06] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets index 69d64f40ca9ea4013751fb58261802096dfc7f15..91e9c05f9ddcf06b4db766ffd6ce18e90733db3d 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function textInputJsunit() { @@ -68,10 +68,10 @@ export default function textInputJsunit() { } var innerEvent = { eventId: 225, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textInputTest02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textInputTest02] change component data error: " + err.message); } @@ -104,10 +104,10 @@ export default function textInputJsunit() { } var innerEvent = { eventId: 225, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textInputTest04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textInputTest04] change component data error: " + err.message); } @@ -140,10 +140,10 @@ export default function textInputJsunit() { } var innerEvent = { eventId: 225, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textInputTest06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textInputTest06] change component data error: " + err.message); } @@ -176,10 +176,10 @@ export default function textInputJsunit() { } var innerEvent = { eventId: 225, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[textInputTest08] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[textInputTest08] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/VideoJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/VideoJsunit.test.ets index 83d6e6e4a884157b2b2b134f5203b13fb38b2ab6..083053c6d0d71ac1d496cbce75af03b5478f4953 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/VideoJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/VideoJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function videoJsunit() { @@ -66,10 +66,10 @@ export default function videoJsunit() { } var innerEvent = { eventId: 235, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVideo02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVideo02] change component data error: " + err.message); } @@ -91,10 +91,10 @@ export default function videoJsunit() { } var innerEvent = { eventId: 235, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVideo03] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVideo03] change component data error: " + err.message); } @@ -116,10 +116,10 @@ export default function videoJsunit() { } var innerEvent = { eventId: 235, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVideo04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVideo04] change component data error: " + err.message); } @@ -141,10 +141,10 @@ export default function videoJsunit() { } var innerEvent = { eventId: 235, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVideo05] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVideo05] change component data error: " + err.message); } @@ -166,10 +166,10 @@ export default function videoJsunit() { } var innerEvent = { eventId: 235, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVideo06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVideo06] change component data error: " + err.message); } @@ -191,10 +191,10 @@ export default function videoJsunit() { } var innerEvent = { eventId: 235, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testVideo07] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testVideo07] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/PanGesture.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/PanGesture.ets index b018dc8fe9e2ba32721689aa091cc92234942533..71bb2392e1d791e9cc8579e10f5b3b293f7ac2ee 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/PanGesture.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/PanGesture.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -26,9 +26,9 @@ struct PanGestureExample { onPageShow() { let ChangeEvent = { eventId: 23, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(ChangeEvent, this.ChangCallBack) + emitter.on(ChangeEvent, this.ChangCallBack) } private ChangCallBack = (eventData) => { @@ -99,10 +99,10 @@ struct PanGestureExample { } var backEvent = { eventId: 24, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[PanGesture] start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("[PanGesture] emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/QrCode.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/QrCode.ets index 1d54fa7f1237080404eeafc710e90b418c959392..a97953cb616630323ffc5279a0685bbd41ba04ce 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/QrCode.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/QrCode.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -55,39 +55,39 @@ struct QrCode { console.info('qrCode page show called'); var stateChangeEvent = { eventId: 170, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 171, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBackTwo); + emitter.on(stateChangeEvent, this.stateChangCallBackTwo); var stateChangeEvent = { eventId: 1023, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 1024, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 1025, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBackTwo); + emitter.on(stateChangeEvent, this.stateChangCallBackTwo); var stateChangeEvent = { eventId: 1026, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBackTwo); + emitter.on(stateChangeEvent, this.stateChangCallBackTwo); } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/ResponseRegion.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/ResponseRegion.ets index b6b89fe423e804c6d5f41f58f066fa3c8468438d..7d4aca99614517c8319b4fd6843a89a71b90088d 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/ResponseRegion.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/ResponseRegion.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -25,9 +25,9 @@ struct ResponseRegionExample { onPageShow() { let ChangeEvent = { eventId: 30, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(ChangeEvent, this.ChangCallBack) + emitter.on(ChangeEvent, this.ChangCallBack) } private ChangCallBack = (eventData) => { @@ -76,10 +76,10 @@ struct ResponseRegionExample { } var backEvent = { eventId: 31, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[ResponseRegion] start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("[ResponseRegion] emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/aboutToDisappear.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/aboutToDisappear.ets index a0d5cabc9dd580fe110be1a31fa4fbb53c3bad3e..fadd9e4e470a6ff67646d2e5fcab7ecd35af12b4 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/aboutToDisappear.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/aboutToDisappear.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -70,10 +70,10 @@ struct TimerComponent { } var backEvent = { eventId: 49, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/animate.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/animate.ets index 600967b934cc34b2ea897d56d6f9c55f437b267c..53e0015e2fc0ef4fc5e5ed90fab1508ce4332a4b 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/animate.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/animate.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -29,69 +29,69 @@ struct AnimationExample { console.info('animate page show called'); var stateChangeEvent = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventa = { eventId: 1011, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventa, this.stateChangCallBack) + emitter.on(stateChangeEventa, this.stateChangCallBack) var stateChangeEventb = { eventId: 1012, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventb, this.stateChangCallBack) + emitter.on(stateChangeEventb, this.stateChangCallBack) var stateChangeEventc = { eventId: 1013, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventc, this.stateChangCallBack) + emitter.on(stateChangeEventc, this.stateChangCallBack) var stateChangeEventd = { eventId: 1014, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventd, this.stateChangCallBack) + emitter.on(stateChangeEventd, this.stateChangCallBack) var stateChangeEvente = { eventId: 1015, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvente, this.stateChangCallBack) + emitter.on(stateChangeEvente, this.stateChangCallBack) var stateChangeEventf = { eventId: 1016, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventf, this.stateChangCallBack) + emitter.on(stateChangeEventf, this.stateChangCallBack) var stateChangeEventg = { eventId: 1017, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventg, this.stateChangCallBack) + emitter.on(stateChangeEventg, this.stateChangCallBack) var stateChangeEventh = { eventId: 1018, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventh, this.stateChangCallBack) + emitter.on(stateChangeEventh, this.stateChangCallBack) var stateChangeEventi = { eventId: 1019, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventi, this.stateChangCallBack) + emitter.on(stateChangeEventi, this.stateChangCallBack) var stateChangeEventj = { eventId: 1020, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventj, this.stateChangCallBack) + emitter.on(stateChangeEventj, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { @@ -132,10 +132,10 @@ struct AnimationExample { } var backEvent = { eventId: 51, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 emit action state err: " + JSON.stringify(err.message)) } @@ -160,10 +160,10 @@ struct AnimationExample { } var backEventOne = { eventId: 52, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEventOne, backDataOne) + emitter.emit(backEventOne, backDataOne) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -188,10 +188,10 @@ struct AnimationExample { } var backEventTwo = { eventId: 53, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button3 start to emit action state") - events_emitter.emit(backEventTwo, backDataTwo) + emitter.emit(backEventTwo, backDataTwo) } catch (err) { console.info("button3 emit action state err: " + JSON.stringify(err.message)) } @@ -216,10 +216,10 @@ struct AnimationExample { } var backEventThree = { eventId: 54, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button4 start to emit action state") - events_emitter.emit(backEventThree, backDataThree) + emitter.emit(backEventThree, backDataThree) } catch (err) { console.info("button4 emit action state err: " + JSON.stringify(err.message)) } @@ -244,10 +244,10 @@ struct AnimationExample { } var backEventFour = { eventId: 55, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button5 start to emit action state") - events_emitter.emit(backEventFour, backDataFour) + emitter.emit(backEventFour, backDataFour) } catch (err) { console.info("button5 emit action state err: " + JSON.stringify(err.message)) } @@ -272,10 +272,10 @@ struct AnimationExample { } var backEvent = { eventId: 1001, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button6 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button6 emit action state err: " + JSON.stringify(err.message)) } @@ -300,10 +300,10 @@ struct AnimationExample { } var backEvent = { eventId: 1002, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button7 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button7 emit action state err: " + JSON.stringify(err.message)) } @@ -328,10 +328,10 @@ struct AnimationExample { } var backEvent = { eventId: 1003, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button8 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button8 emit action state err: " + JSON.stringify(err.message)) } @@ -356,10 +356,10 @@ struct AnimationExample { } var backEvent = { eventId: 1004, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button9 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button9 emit action state err: " + JSON.stringify(err.message)) } @@ -384,10 +384,10 @@ struct AnimationExample { } var backEvent = { eventId: 1005, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button10 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button10 emit action state err: " + JSON.stringify(err.message)) } @@ -412,10 +412,10 @@ struct AnimationExample { } var backEvent = { eventId: 1006, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button11 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button11 emit action state err: " + JSON.stringify(err.message)) } @@ -440,10 +440,10 @@ struct AnimationExample { } var backEvent = { eventId: 1007, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button12 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button12 emit action state err: " + JSON.stringify(err.message)) } @@ -468,10 +468,10 @@ struct AnimationExample { } var backEvent = { eventId: 1008, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button13 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button13 emit action state err: " + JSON.stringify(err.message)) } @@ -496,10 +496,10 @@ struct AnimationExample { } var backEvent = { eventId: 1009, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button14 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button14 emit action state err: " + JSON.stringify(err.message)) } @@ -524,10 +524,10 @@ struct AnimationExample { } var backEvent = { eventId: 1010, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button15 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button15 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/background.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/background.ets index 736cb30e1938088ac1dd520551865799f856f749..329827bbcf1b3dae64d34b4256fc6bc076918f44 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/background.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/background.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -60,15 +60,15 @@ struct BackgroundExample { console.info('background page show called'); var stateChangeEvent = { eventId: 1, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 2, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo); + emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo); } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/badge.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/badge.ets index ef05e8288de65fc7277d99e8433f65a35861d591..2660385fa81c9f25525dc435131172396f7024b2 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/badge.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/badge.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -41,19 +41,19 @@ struct BadgeExample { console.info('Badge page show called'); var stateChangeEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventOne = { eventId: 64, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack); + emitter.on(stateChangeEventOne, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 65, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack); + emitter.on(stateChangeEventTwo, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/blank.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/blank.ets index 6223e9fbb3a4a0eb15a242346bf77e9d77966090..03b3f9ca27226e53e22f7fb925ddf8d275ef6ad4 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/blank.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/blank.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -32,9 +32,9 @@ struct BlankExample { console.info('Blank page1 show called'); var stateChangeEvent = { eventId: 69, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/button.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/button.ets index b9dfec2cf7b0482d57c512c848807376c8fcd53d..ad3e569f0e9e5205aeccb71f0d3bbbf34f8426b3 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/button.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/button.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -42,24 +42,24 @@ struct ButtonExample { console.info('Button page show called'); var stateChangeEvent = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventOne = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack); + emitter.on(stateChangeEventOne, this.stateChangCallBack); var stateChangeEventTwo = { eventId: 75, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack); + emitter.on(stateChangeEventTwo, this.stateChangCallBack); var stateChangeEventThree = { eventId: 76, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack); + emitter.on(stateChangeEventThree, this.stateChangCallBack); } build() { @@ -84,10 +84,10 @@ struct ButtonExample { } var backEvent = { eventId: 71, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -107,10 +107,10 @@ struct ButtonExample { } var backEvent = { eventId: 72, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button3 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button3 emit action state err: " + JSON.stringify(err.message)) } @@ -135,10 +135,10 @@ struct ButtonExample { } var backEvent = { eventId: 4, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/circle.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/circle.ets index e6b8d884608b7e4b7e6f234af1138b3341f36f89..27fb14b1bfc60903115c1b2a7b28162865dcb842 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/circle.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/circle.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -25,10 +25,10 @@ struct CircleExample { console.info('[circle] page show called'); var stateChangeEvent = { eventId: 77, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info('[circle] page show calledA'); - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/gridPage.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/gridPage.ets index f6d26d251d5c374cb16d13dc61e7a9e161a3f592..8f805274418bfb42e24c60a53bbb56b5336b2a45 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/gridPage.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/gridPage.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -94,23 +94,23 @@ struct gridPage { console.info('button page show called'); var stateChangeEvent = { eventId: 110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEvent2 = { eventId: 111, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack) + emitter.on(stateChangeEvent2, this.stateChangCallBack) var stateChangeEvent3 = { eventId: 112, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent3, this.stateChangCallBack) + emitter.on(stateChangeEvent3, this.stateChangCallBack) var stateChangeEvent4 = { eventId: 113, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent4, this.stateChangCallBack) + emitter.on(stateChangeEvent4, this.stateChangCallBack) } } \ No newline at end of file diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/line.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/line.ets index 67dc8cb6be8c9099d9d8b9e7d73bb60f9dbfbf9b..53ed753ca5811c9449120017595ffff19290b06c 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/line.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/line.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -50,8 +50,8 @@ struct LineExample { console.info('line page show called'); var stateChangeEvent = { eventId: 131, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } } \ No newline at end of file diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/longPressGesture.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/longPressGesture.ets index a146e6166f1b46adc912a538e51c12c47c6c228e..7f0b060e401c87caa8f59a851c0728c53744d989 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/longPressGesture.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/longPressGesture.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -44,10 +44,10 @@ struct LongPressGestureExample { } let backEvent = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("start to emit action state"); - events_emitter.emit(backEvent, backData); + emitter.emit(backEvent, backData); } catch (err) { console.info("emit action state err: " + JSON.stringify(err.message)); } @@ -64,10 +64,10 @@ struct LongPressGestureExample { } let backEvent = { eventId: 126, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("start to emit action state"); - events_emitter.emit(backEvent, backData); + emitter.emit(backEvent, backData); } catch (err) { console.info("emit action state err: " + JSON.stringify(err.message)); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/motionPath.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/motionPath.ets index 31162a6a8ee17e9a76d8a06eb0ae2121e4e3c130..7cd9d3e00b794a94fd22f2ecf2fcf2f86d0f18ea 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/motionPath.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/motionPath.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -42,10 +42,10 @@ struct MotionPathExample { } var backEvent = { eventId: 132, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button emit action state err: " + JSON.stringify(err.message)) } @@ -66,10 +66,10 @@ struct MotionPathExample { } var backEvent = { eventId: 133, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 position start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 position emit action state err: " + JSON.stringify(err.message)) } @@ -83,9 +83,9 @@ struct MotionPathExample { console.info('motionPath page show called'); var stateChangeEvent = { eventId: 134, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangeCallBack) + emitter.on(stateChangeEvent, this.stateChangeCallBack) } private stateChangeCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/parallelGesture.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/parallelGesture.ets index a1296b05afcc9bc683323545287e2680bbc107e0..8081a6bac5777005725e6f3d8649f6b7fd2290c1 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/parallelGesture.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/parallelGesture.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -33,10 +33,10 @@ struct GestureSettingsExample { } var backEvent = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/priorityGesture.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/priorityGesture.ets index 914666e70e89d7559eb2517269020e4a5a2f091a..5b29922571c35bae3976bc2a36106da12b2b878f 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/priorityGesture.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/priorityGesture.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -33,10 +33,10 @@ struct GestureSettingsExample { } var backEvent = { eventId: 162, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/progress.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/progress.ets index 862fcc526e324a98427981360f852db49f0f3a82..b4d724620b7a7b894a1fbd59e6757bdceb597f9f 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/progress.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/progress.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -39,49 +39,49 @@ struct ProgressExample { console.info('progress page show called'); var stateChangeEvent = { eventId: 164, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 165, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventThree = { eventId: 166, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) var stateChangeEventFour = { eventId: 167, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventFour, this.stateChangCallBack) + emitter.on(stateChangeEventFour, this.stateChangCallBack) var stateChangeEventFive = { eventId: 168, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventFive, this.stateChangCallBack) + emitter.on(stateChangeEventFive, this.stateChangCallBack) var stateChangeEventSix = { eventId: 169, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSix, this.stateChangCallBack) + emitter.on(stateChangeEventSix, this.stateChangCallBack) var stateChangeEventseven = { eventId: 1021, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventseven, this.stateChangCallBack) + emitter.on(stateChangeEventseven, this.stateChangCallBack) var stateChangeEventeight = { eventId: 1022, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventeight, this.stateChangCallBack) + emitter.on(stateChangeEventeight, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/rating.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/rating.ets index 29a1ce1ff9b02e9a9ec6c22861e1c058ffb32dcd..d823154fa3bbb9080841fbb2c445ebbd9ac476eb 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/rating.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/rating.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -35,51 +35,51 @@ struct RatingExample { console.info('rating page show called'); var stateChangeEvent = { eventId: 173, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 174, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventThree = { eventId: 175, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) var stateChangeEventFour = { eventId: 176, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventFour, this.stateChangCallBack) + emitter.on(stateChangeEventFour, this.stateChangCallBack) var stateChangeEventSix = { eventId: 177, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSix, this.stateChangCallBack) + emitter.on(stateChangeEventSix, this.stateChangCallBack) var stateChangeEventSeven = { eventId: 178, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSeven, this.stateChangCallBack) + emitter.on(stateChangeEventSeven, this.stateChangCallBack) var stateChangeEventSeven = { eventId: 1027, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSeven, this.stateChangCallBack) + emitter.on(stateChangeEventSeven, this.stateChangCallBack) var stateChangeEventSeven = { eventId: 1028, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSeven, this.stateChangCallBack) + emitter.on(stateChangeEventSeven, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/scrollCode.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/scrollCode.ets index 5cdffb7357091db40fd3f646d6c4999048b9ee02..0800a23361c41033f14b6152cbf114ce5b84bc7c 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/scrollCode.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/scrollCode.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -68,27 +68,27 @@ struct scrollCode { console.info('scrollCode page show called'); var stateChangeEvent = { eventId: 185, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 186, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 187, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 188, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { @@ -144,10 +144,10 @@ struct scrollCode { } var backEvent = { eventId: 189, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/shape.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/shape.ets index b8931e5edd8234efd2daf0737d84e5ff196d55f0..a5101e238a2ccfa4744f219e8ed2b813c4a7ead0 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/shape.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/shape.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -71,9 +71,9 @@ struct ShapeExample { console.info('qrCode page show called'); var stateChangeEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/sharedTransition.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/sharedTransition.ets index 13cbfccb4b66efe6cdf34cfae516391b0db03246..7e1b1a0e5b56ca10ada0cbd565387a2f7322e7ca 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/sharedTransition.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/sharedTransition.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -48,10 +48,10 @@ struct SharedTransitionExample { } var backEvent = { eventId: 193, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("SharedTransition start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("SharedTransition emit action state err: " + JSON.stringify(err.message)) } @@ -67,9 +67,9 @@ struct SharedTransitionExample { console.info('sharedTransition page show called'); var stateChangeEvent = { eventId: 194, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/span.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/span.ets index 602bfe151f13370082602858fc5bca751c06343b..a9d824fec0e668c741624b1e9e135842a407b391 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/span.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/span.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -41,45 +41,45 @@ struct SpanExample { console.info('span page show called'); var stateChangeEvent = { eventId: 199, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 200, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); var stateChangeEvent3 = { eventId: 201, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent3, this.stateChangCallBack); + emitter.on(stateChangeEvent3, this.stateChangCallBack); var stateChangeEvent4 = { eventId: 1029, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent4, this.stateChangCallBack); + emitter.on(stateChangeEvent4, this.stateChangCallBack); var stateChangeEvent5 = { eventId: 1030, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent5, this.stateChangCallBack); + emitter.on(stateChangeEvent5, this.stateChangCallBack); var stateChangeEvent6 = { eventId: 1031, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent6, this.stateChangCallBack); + emitter.on(stateChangeEvent6, this.stateChangCallBack); var stateChangeEvent7 = { eventId: 1032, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent7, this.stateChangCallBack); + emitter.on(stateChangeEvent7, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tabs.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tabs.ets index b5624f07c040dc64d57dd039ec41767d34b38424..e3cfdac1a19b2a8a9248338d8c8fa1a9ace6416b 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tabs.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tabs.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -46,10 +46,10 @@ struct TabsExample { } var backEvent = { eventId: 212, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("tabContent1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("tabContent1 emit action state err: " + JSON.stringify(err.message)) } @@ -89,21 +89,21 @@ struct TabsExample { console.info('tabs page show called'); var stateChangeEvent = { eventId: 213, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 214, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 215, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tapGesture.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tapGesture.ets index 88bed063751ee6024efc1f8cb717e59996a11a97..e445cfc6d72801437a4c30bb52d32bac0ccd00fc 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tapGesture.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/tapGesture.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -45,10 +45,10 @@ struct TapGestureExample { } var backEvent = { eventId: 214, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("click to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("click action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/text.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/text.ets index 9dfb0131820d5a0967e82961dc45d9adabe81772..621fde3625d165e1e185b74db624d8c963470ee8 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/text.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/text.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -45,51 +45,51 @@ struct TextExample { console.info('text page show called'); var stateChangeEvent = { eventId: 226, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 227, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) var stateChangeEventTwo = { eventId: 228, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) var stateChangeEventThree = { eventId: 229, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) var stateChangeEventFour = { eventId: 230, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventFour, this.stateChangCallBack) + emitter.on(stateChangeEventFour, this.stateChangCallBack) var stateChangeEventFive = { eventId: 231, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventFive, this.stateChangCallBack) + emitter.on(stateChangeEventFive, this.stateChangCallBack) var stateChangeEventSix = { eventId: 232, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSix, this.stateChangCallBack) + emitter.on(stateChangeEventSix, this.stateChangCallBack) var stateChangeEventSeven = { eventId: 233, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventSeven, this.stateChangCallBack) + emitter.on(stateChangeEventSeven, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/timeStamp.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/timeStamp.ets index 9f9caf26213f59cff18457fcdfbaa49b74ad513a..f954148a5b82380a5a87a073083158e8eda9a82a 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/timeStamp.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/timeStamp.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -35,10 +35,10 @@ struct ClickExample { } var backEvent = { eventId: 230, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/toggle.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/toggle.ets index d2a2b8582a4b19ff74bf939282884657a2cc1152..ba08fae7664e6082ddfed929e86876ac38ac05ef 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/toggle.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/toggle.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -26,39 +26,39 @@ struct ToggleExample { console.info('[toggle] page show called'); var stateChangeEvent = { eventId: 231, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventOne = { eventId: 232, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack); + emitter.on(stateChangeEventOne, this.stateChangCallBack); var stateChangeEventthree = { eventId: 1033, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventthree, this.stateChangCallBack); + emitter.on(stateChangeEventthree, this.stateChangCallBack); var stateChangeEventfour = { eventId: 1034, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventfour, this.stateChangCallBack); + emitter.on(stateChangeEventfour, this.stateChangCallBack); var stateChangeEventfive = { eventId: 1035, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventfive, this.stateChangCallBack); + emitter.on(stateChangeEventfive, this.stateChangCallBack); var stateChangeEventsix = { eventId: 1036, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventsix, this.stateChangCallBack); + emitter.on(stateChangeEventsix, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/transition.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/transition.ets index 280ff33d48e135f4ca21f9a326787ad229ea801b..eb031e013389543e6691fd6021fb32cab428e980 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/transition.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/pages/transition.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -45,10 +45,10 @@ struct TransitionExample { } var backEvent = { eventId: 233, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("transitionTest_0200 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("transitionTest_0200 emit action state err: " + JSON.stringify(err.message)) } @@ -75,9 +75,9 @@ struct TransitionExample { console.info('transition page show called'); var stateChangeEvent = { eventId: 234, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AboutToDisappearJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AboutToDisappearJsunit.test.ets index 1fc45750264dd76007fabf69306dbc48278fbd17..ae6af8a07884f6e35e8ebdf83beecd93fb55f62f 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AboutToDisappearJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AboutToDisappearJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function aboutToDisappearJsunit() { @@ -55,12 +55,12 @@ export default function aboutToDisappearJsunit() { } let indexEvent = { eventId: 49, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("aboutToDisappearTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("aboutToDisappearTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("aboutToDisappearTest_0100 click result is: " + JSON.stringify(sendEventByKey('button1', 10, ""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AnimateJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AnimateJsunit.test.ets index 2c595252f34a6d8c5de4bad102509c8983793f7d..2db02e2cd75472361bfce29f9bb1c69a22326951 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AnimateJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/AnimateJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function animateJsunit() { @@ -51,16 +51,16 @@ export default function animateJsunit() { await Utils.sleep(1500); let indexEvent = { eventId: 51, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0100 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.duration).assertEqual('100') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0100 click result is: " + JSON.stringify(sendEventByKey('button1', 10, ""))); await Utils.sleep(2000); @@ -73,16 +73,16 @@ export default function animateJsunit() { await Utils.sleep(1500); let indexEvent = { eventId: 52, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0500 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.curve).assertEqual('Ease') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0200 click result is: " + JSON.stringify(sendEventByKey('button2', 10, ""))); await Utils.sleep(2000); @@ -95,16 +95,16 @@ export default function animateJsunit() { await Utils.sleep(1500); let indexEvent = { eventId: 53, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0500 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.iteration).assertEqual('1') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0300 click result is: " + JSON.stringify(sendEventByKey('button3', 10, ""))); await Utils.sleep(2000); @@ -117,16 +117,16 @@ export default function animateJsunit() { await Utils.sleep(1500); let indexEvent = { eventId: 54, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0400 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.tempo).assertEqual(1000) } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0400 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0400 click result is: " + JSON.stringify(sendEventByKey('button4', 10, ""))); await Utils.sleep(2000); @@ -139,16 +139,16 @@ export default function animateJsunit() { await Utils.sleep(1500); let indexEvent = { eventId: 55, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0500 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.playmode).assertEqual('normal') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0500 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0500 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0500 click result is: " + JSON.stringify(sendEventByKey('button5', 10, ""))); await Utils.sleep(2000); @@ -166,25 +166,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_0600 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_0600 change component data error: " + err.message); } let indexEvent = { eventId: 51, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0600 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.duration).assertEqual('2000') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0600 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0600 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0600 click result is: " + JSON.stringify(sendEventByKey('button1', 10, ""))); await Utils.sleep(2000); @@ -202,25 +202,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_0700 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_0700 change component data error: " + err.message); } let indexEvent = { eventId: 52, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0700 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.curve).assertEqual('Linear') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0700 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0700 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0700 click result is: " + JSON.stringify(sendEventByKey('button2', 10, ""))); await Utils.sleep(2000); @@ -238,25 +238,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_0800 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_0800 change component data error: " + err.message); } let indexEvent = { eventId: 53, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0800 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.iteration).assertEqual('2') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0800 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0800 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0800 click result is: " + JSON.stringify(sendEventByKey('button3', 10, ""))); await Utils.sleep(2000); @@ -274,25 +274,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_0900 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_0900 change component data error: " + err.message); } let indexEvent = { eventId: 54, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_0900 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.tempo).assertEqual('20000') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_0900 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_0900 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_0900 click result is: " + JSON.stringify(sendEventByKey('button4', 10, ""))); await Utils.sleep(2000); @@ -310,25 +310,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 50, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1000 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1000 change component data error: " + err.message); } let indexEvent = { eventId: 55, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1000 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.playmode).assertEqual('alternate') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1000 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1000 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1000 click result is: " + JSON.stringify(sendEventByKey('button5', 10, ""))); await Utils.sleep(2000); @@ -346,25 +346,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1011, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1100 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1100 change component data error: " + err.message); } let indexEvent = { eventId: 1001, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1100 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.duration).assertEqual('-1000') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1100 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1100 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1100 click result is: " + JSON.stringify(sendEventByKey('button6', 10, ""))); await Utils.sleep(2000); @@ -382,25 +382,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1012, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1200 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1200 change component data error: " + err.message); } let indexEvent = { eventId: 1002, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1200 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.duration).assertEqual('100000000') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1200 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1200 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1200 click result is: " + JSON.stringify(sendEventByKey('button7', 10, ""))); await Utils.sleep(2000); @@ -418,25 +418,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1013, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1300 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1300 change component data error: " + err.message); } let indexEvent = { eventId: 1003, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1300 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.curve).assertEqual('123') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1300 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1300 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1300 click result is: " + JSON.stringify(sendEventByKey('button8', 10, ""))); await Utils.sleep(2000); @@ -454,25 +454,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1014, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1400 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1400 change component data error: " + err.message); } let indexEvent = { eventId: 1004, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1400 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.curve).assertEqual('abc') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1400 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1400 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1400 click result is: " + JSON.stringify(sendEventByKey('button9', 10, ""))); await Utils.sleep(2000); @@ -490,25 +490,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1015, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1500 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1500 change component data error: " + err.message); } let indexEvent = { eventId: 1005, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1500 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.iteration).assertEqual('121212121212') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1500 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1500 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1500 click result is: " + JSON.stringify(sendEventByKey('button10', 10, ""))); await Utils.sleep(2000); @@ -526,25 +526,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1016, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1600 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1600 change component data error: " + err.message); } let indexEvent = { eventId: 1006, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1600 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.iteration).assertEqual('-5') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1600 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1600 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1600 click result is: " + JSON.stringify(sendEventByKey('button11', 10, ""))); await Utils.sleep(2000); @@ -562,25 +562,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1017, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1700 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1700 change component data error: " + err.message); } let indexEvent = { eventId: 1007, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1700 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.tempo).assertEqual('12121212121212') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1700 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1700 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1700 click result is: " + JSON.stringify(sendEventByKey('button12', 10, ""))); await Utils.sleep(2000); @@ -598,25 +598,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1018, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1800 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1800 change component data error: " + err.message); } let indexEvent = { eventId: 1008, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1800 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.tempo).assertEqual('-5') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1800 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1800 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1800 click result is: " + JSON.stringify(sendEventByKey('button13', 10, ""))); await Utils.sleep(2000); @@ -634,25 +634,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1019, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_1900 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_1900 change component data error: " + err.message); } let indexEvent = { eventId: 1009, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_1900 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.playmode).assertEqual('aaa') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_1900 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_1900 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_1900 click result is: " + JSON.stringify(sendEventByKey('button14', 10, ""))); await Utils.sleep(2000); @@ -670,25 +670,25 @@ export default function animateJsunit() { } let indexEventOne = { eventId: 1020, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("animateTest_2000 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("animateTest_2000 change component data error: " + err.message); } let indexEvent = { eventId: 1010, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("animateTest_2000 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.playmode).assertEqual('123456') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animateTest_2000 on events_emitter err : " + JSON.stringify(err)); + console.info("animateTest_2000 on emitter err : " + JSON.stringify(err)); } console.info("animateTest_2000 click result is: " + JSON.stringify(sendEventByKey('button15', 10, ""))); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BackgroundJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BackgroundJsunit.test.ets index aa99edb2d9864890ebfdd65216579021b92f0cf9..8fd738a77bcf0f59b85a70ba1b75f702059ee5ad 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BackgroundJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BackgroundJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function backgroundJsunit() { @@ -69,10 +69,10 @@ export default function backgroundJsunit() { } var innerEvent = { eventId: 2, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testBackground_0200 start pages"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testBackground_0200 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets index 61537d152ce53750159fa9c0e71b9909f761ddc2..ac699a036bea893893a5acac571a6a803b7d06fa 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function badgeJsunit() { @@ -70,10 +70,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge02] change component data error: " + err.message); } @@ -97,10 +97,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge03] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge03] change component data error: " + err.message); } @@ -124,10 +124,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge04] change component data error: " + err.message); } @@ -151,10 +151,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge05] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge05] change component data error: " + err.message); } @@ -202,10 +202,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge08] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge08] change component data error: " + err.message); } @@ -229,10 +229,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 63, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge09] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge09] change component data error: " + err.message); } @@ -255,10 +255,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 64, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge10] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge10] change component data error: " + err.message); } @@ -282,10 +282,10 @@ export default function badgeJsunit() { } var innerEvent = { eventId: 65, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBadge11] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBadge11] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BlankJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BlankJsunit.test.ets index 45fd09dd2d899d7e73483f460d6dfd2e21b37bd3..6e81520f66b127dec86bbbfeb03854e7f7ea0703 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BlankJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/BlankJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function blankJsunit() { @@ -70,10 +70,10 @@ export default function blankJsunit() { } var innerEvent = { eventId: 69, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testBlank02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testBlank02] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets index 8bfbc9245ebff0c9423607021a934f0cbd07c97d..72e635c8f79b2dc67666c852c5c2231c75ceb6d8 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function buttonJsunit() { @@ -100,10 +100,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton05] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton05] change component data error: " + err.message); } @@ -126,10 +126,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton06] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton06] change component data error: " + err.message); } @@ -152,10 +152,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton07] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton07] change component data error: " + err.message); } @@ -178,10 +178,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton08] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton08] change component data error: " + err.message); } @@ -204,10 +204,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton09] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton09] change component data error: " + err.message); } @@ -229,26 +229,26 @@ export default function buttonJsunit() { } let indexEventOne = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testButton10 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("testButton10 change component data error: " + err.message); } await Utils.sleep(1000); let indexEvent = { eventId: 72, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("testButton10 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.fontColorValue).assertEqual(Color.Pink) } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testButton10 on events_emitter err : " + JSON.stringify(err)); + console.info("testButton10 on emitter err : " + JSON.stringify(err)); } console.info("testButton10 click result is: " + JSON.stringify(sendEventByKey('button3', 10, ""))); await Utils.sleep(1000); @@ -266,26 +266,26 @@ export default function buttonJsunit() { } let indexEventOne = { eventId: 70, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testButton11 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("testButton11 change component data error: " + err.message); } await Utils.sleep(1000); let indexEvent = { eventId: 71, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("testButton11 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.fontColorValue).assertEqual(332) } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testButton11 on events_emitter err : " + JSON.stringify(err)); + console.info("testButton11 on emitter err : " + JSON.stringify(err)); } console.info("testButton11 click result is: " + JSON.stringify(sendEventByKey('button2', 10, ""))); await Utils.sleep(1000); @@ -306,12 +306,12 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 4, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[testButton12] on events_emitter err : " + JSON.stringify(err)); + console.info("[testButton12] on emitter err : " + JSON.stringify(err)); } console.info('[testButton12] sendEventByKey ' + JSON.stringify(sendEventByKey('buttonClick', 10, ""))); await Utils.sleep(1000) @@ -330,10 +330,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 74, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton13] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton13] change component data error: " + err.message); } @@ -356,10 +356,10 @@ export default function buttonJsunit() { } var innerEvent = { eventId: 75, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testButton14] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testButton14] change component data error: " + err.message); } @@ -381,26 +381,26 @@ export default function buttonJsunit() { } let indexEventOne = { eventId: 76, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testButton15 start to publish emit"); - events_emitter.emit(indexEventOne, eventData); + emitter.emit(indexEventOne, eventData); } catch (err) { console.log("testButton15 change component data error: " + err.message); } await Utils.sleep(1000); let indexEvent = { eventId: 77, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } let callback = (indexEvent) => { console.info("testButton15 get state result is: " + JSON.stringify(indexEvent)) except(indexEvent.data.fontColorValue).assertEqual('ab996') } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testButton15 on events_emitter err : " + JSON.stringify(err)); + console.info("testButton15 on emitter err : " + JSON.stringify(err)); } console.info("testButton15 click result is: " + JSON.stringify(sendEventByKey('button4', 10, ""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/CircleJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/CircleJsunit.test.ets index 681e4ebd98fb790340e1fbb37045bd9193786ab5..d81d028cf80510a41a9eec1d4d751654c459d30c 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/CircleJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/CircleJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function circleJsunit() { @@ -69,10 +69,10 @@ export default function circleJsunit() { console.info('[circleTest_0200] START'); var innerEvent = { eventId: 77, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[circleTest_0200] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[circleTest_0200] change component data error: " + err.message); } @@ -98,10 +98,10 @@ export default function circleJsunit() { console.info('[circleTest_0300] START'); var innerEvent = { eventId: 77, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[circleTest_030] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[circleTest_030] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/GridJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/GridJsunit.test.ets index 81232c87173c7a3cf7202844b00b56d2412032b7..a683930715afe6c39cfbd6e5361f633c032fa8ff 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/GridJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/GridJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function gridJsunit() { @@ -61,10 +61,10 @@ export default function gridJsunit() { } var innerEvent = { eventId: 110, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info('gridTest01 start to publish emit') - events_emitter.emit(innerEvent, eventData) + emitter.emit(innerEvent, eventData) } catch (err) { console.log('gridTest01 change component data error: ' + err.message) } @@ -92,10 +92,10 @@ export default function gridJsunit() { } var innerEvent = { eventId: 111, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info('[ gridTest02 ] start to publish emit') - events_emitter.emit(innerEvent, eventData) + emitter.emit(innerEvent, eventData) } catch (err) { console.log('[ gridTest02 ] change component data error: ' + err.message) } @@ -123,10 +123,10 @@ export default function gridJsunit() { } var innerEvent = { eventId: 112, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info('[ gridTest03 ] start to publish emit') - events_emitter.emit(innerEvent, eventData) + emitter.emit(innerEvent, eventData) } catch (err) { console.log('[ gridTest03 ] change component data error: ' + err.message) } @@ -154,10 +154,10 @@ export default function gridJsunit() { } var innerEvent = { eventId: 113, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info('[ gridTest04 ] start to publish emit') - events_emitter.emit(innerEvent, eventData) + emitter.emit(innerEvent, eventData) } catch (err) { console.log('[ gridTest04 ] change component data error: ' + err.message) } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LineJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LineJsunit.test.ets index 0e6c516b3613637129489378dc8f650d288ce777..5e749114d948b8233bbb021dbcf81d7067224b6f 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LineJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LineJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function LineJsunit() { describe('LineTest', function () { @@ -98,10 +98,10 @@ export default function LineJsunit() { } var innerEvent = { eventId: 131, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("lineTest_0500 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("lineTest_0500 change component error: " + err.message); } @@ -127,10 +127,10 @@ export default function LineJsunit() { } var innerEvent = { eventId: 131, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("lineTest_0600 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("lineTest_0600 change component error: " + err.message); } @@ -156,10 +156,10 @@ export default function LineJsunit() { } var innerEvent = { eventId: 131, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("lineTest_0700 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("lineTest_0700 change component error: " + err.message); } @@ -185,10 +185,10 @@ export default function LineJsunit() { } var innerEvent = { eventId: 131, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("lineTest_0800 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("lineTest_0800 change component error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LongPressGesture.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LongPressGesture.test.ets index 7d52c3b2c1ee645d7efd5e235f65f3c59459f6bb..3052b8fbb7871fc7dd926770c57384ff4e87e777 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LongPressGesture.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/LongPressGesture.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function longPressGestureJsunit() { @@ -55,13 +55,13 @@ export default function longPressGestureJsunit() { } let innerEvent = { eventId: 125, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - console.info("testLongPressGesture01 on events_emitter on"); - events_emitter.on(innerEvent, callback) + console.info("testLongPressGesture01 on emitter on"); + emitter.on(innerEvent, callback) } catch (err) { - console.info("testLongPressGesture01 on events_emitter err : " + JSON.stringify(err)); + console.info("testLongPressGesture01 on emitter err : " + JSON.stringify(err)); } console.info("testLongPressGesture01 sendEventByKey result: " + JSON.stringify(sendEventByKey('flex', 11, ""))); await Utils.sleep(1000); @@ -78,13 +78,13 @@ export default function longPressGestureJsunit() { } let innerEvent = { eventId: 126, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - console.info("testLongPressGesture02 on events_emitter on"); - events_emitter.on(innerEvent, callback) + console.info("testLongPressGesture02 on emitter on"); + emitter.on(innerEvent, callback) } catch (err) { - console.info("testLongPressGesture02 on events_emitter err : " + JSON.stringify(err)); + console.info("testLongPressGesture02 on emitter err : " + JSON.stringify(err)); } console.info("testLongPressGesture02 sendEventByKey result: " + JSON.stringify(sendEventByKey('flex', 11, ""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/MotionPathJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/MotionPathJsunit.test.ets index 71b49a5928fe528e800f2de5294ade0f2d4dfaba..818334ae1ba7a451f9aae5648ab3ad95b8c75e86 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/MotionPathJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/MotionPathJsunit.test.ets @@ -17,7 +17,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function motionPathJsunit() { describe('motionPathTest', function () { @@ -65,12 +65,12 @@ export default function motionPathJsunit() { } let indexEventOne = { eventId: 133, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callback); + emitter.on(indexEventOne, callback); } catch (err) { - console.info("motionPathTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("motionPathTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("motionPathTest_0200 click result is: " + JSON.stringify(sendEventByKey('button1', 10, ""))); await Utils.sleep(1000); @@ -87,12 +87,12 @@ export default function motionPathJsunit() { } let indexEvent = { eventId: 132, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("motionPathTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("motionPathTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("motionPathTest_0300 click result is: " + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PanGestureJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PanGestureJsunit.test.ets index 3237759da54eda6670adb64cd033b6d0d51494c6..55367242703280c9eddc533e23b688a30c2b41ba 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PanGestureJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PanGestureJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function PanGestureJsunit() { @@ -59,10 +59,10 @@ export default function PanGestureJsunit() { } var innerEvent = { eventId: 23, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testPanGesture01] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testPanGesture01] change component data error: " + err.message); } @@ -90,12 +90,12 @@ export default function PanGestureJsunit() { } var innerEventTwo = { eventId: 24, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventTwo, callbackTwo) + emitter.on(innerEventTwo, callbackTwo) } catch (err) { - console.info("[testPanGesture02] on events_emitter err : " + JSON.stringify(err)); + console.info("[testPanGesture02] on emitter err : " + JSON.stringify(err)); } console.info('[testPanGesture02] testSendTouchEvent ' + sendTouchEvent(point)); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ParallelGestureJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ParallelGestureJsunit.test.ets index 8fa58459ff3f930891fca05a00374dca4bfaaef6..d7a23596b97f3b3bbb95317cfb7363475766bfe2 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ParallelGestureJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ParallelGestureJsunit.test.ets @@ -17,7 +17,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function parallelGestureJsunit() { describe('parallelGestureTest', function () { @@ -62,12 +62,12 @@ export default function parallelGestureJsunit() { } var innerEvent = { eventId: 150, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("parallelGestureTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("parallelGestureTest_0100 on emitter err : " + JSON.stringify(err)); } console.info('parallelGestureTest_0100 sendTouchEvent result:' + sendTouchEvent(point)); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PriorityGestureJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PriorityGestureJsunit.test.ets index ea78f5791e6893964f5908d6f0437571b5574c72..a86e01dc4cd34c0baa5133b17994cf7b6bb183fc 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PriorityGestureJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/PriorityGestureJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function priorityGestureJsunit() { describe('priorityGestureTest', function () { @@ -61,12 +61,12 @@ export default function priorityGestureJsunit() { } var innerEvent = { eventId: 162, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("priorityGestureTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("priorityGestureTest_0100 on emitter err : " + JSON.stringify(err)); } console.info('priorityGestureTest_0100 sendTouchEvent one:' + sendTouchEvent(point)); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ProgressJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ProgressJsunit.test.ets index b8a3eab2c8b407e0344c3a21081577d85e54ca0c..d97c6fffde153a910700f6563b422fb318f920ad 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ProgressJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ProgressJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function progressJsunit() { describe('progressTest', function () { @@ -59,10 +59,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 164, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_100 change component data error: " + err.message); } @@ -100,10 +100,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 165, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_300 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_300 change component data error: " + err.message); } @@ -141,10 +141,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 166, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_500 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_500 change component data error: " + err.message); } @@ -182,10 +182,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 167, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_700 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_700 change component data error: " + err.message); } @@ -212,10 +212,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 168, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_800 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_800 change component data error: " + err.message); } @@ -242,10 +242,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 169, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_900 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_900 change component data error: " + err.message); } @@ -272,10 +272,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 1021, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_1000 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_1000 change component data error: " + err.message); } @@ -302,10 +302,10 @@ export default function progressJsunit() { } var innerEvent = { eventId: 1022, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testProgress_1100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testProgress_1100 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/QrCodeJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/QrCodeJsunit.test.ets index 728fb07d5a53d6db8212ca708404a749fe1dd8d7..e90a9e45137e75f40e863f4304d4b8e80f6b0680 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/QrCodeJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/QrCodeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function qrCodeJsunit() { @@ -68,10 +68,10 @@ export default function qrCodeJsunit() { } var innerEvent = { eventId: 170, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_qrCode_002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_qrCode_002] change component color error: " + err.message); } @@ -94,10 +94,10 @@ export default function qrCodeJsunit() { } var innerEvent = { eventId: 171, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_qrCode_003] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_qrCode_003] change component color error: " + err.message); } @@ -120,10 +120,10 @@ export default function qrCodeJsunit() { } var innerEvent = { eventId: 1023, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_qrCode_004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_qrCode_004] change component color error: " + err.message); } @@ -146,10 +146,10 @@ export default function qrCodeJsunit() { } var innerEvent = { eventId: 1024, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_qrCode_005] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_qrCode_005] change component color error: " + err.message); } @@ -172,10 +172,10 @@ export default function qrCodeJsunit() { } var innerEvent = { eventId: 1025, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_qrCode_006] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_qrCode_006] change component color error: " + err.message); } @@ -198,10 +198,10 @@ export default function qrCodeJsunit() { } var innerEvent = { eventId: 1026, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_qrCode_007] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_qrCode_007] change component color error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/RatingJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/RatingJsunit.test.ets index 37e02046b9e3090ba543014c76b7541563771e9a..8c22e1567fe5a5a180192c24b0dc3db088344adc 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/RatingJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/RatingJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function ratingJsunit() { describe('ratingTest', function () { @@ -56,10 +56,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 173, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_100 change component data error: " + err.message); } @@ -94,11 +94,11 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 174, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_300 start to publish emit"); console.info("eventData.data.rating value" + eventData.data.rating); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_300 change component data error: " + err.message); } @@ -122,10 +122,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 175, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_400 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_400 change component data error: " + err.message); } @@ -149,10 +149,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 176, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_500 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_500 change component data error: " + err.message); } @@ -176,10 +176,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 177, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_600 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_600 change component data error: " + err.message); } @@ -203,10 +203,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 178, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_700 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_700 change component data error: " + err.message); } @@ -230,10 +230,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 1027, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_800 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_800 change component data error: " + err.message); } @@ -257,10 +257,10 @@ export default function ratingJsunit() { } var innerEvent = { eventId: 1028, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testRating_900 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("testRating_900 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ResponseRegionJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ResponseRegionJsunit.test.ets index 48a4201121295fe59d330ad2c38570d327db44d5..2f699f3543a8c27bbf15b604ac3b044a2d654fa6 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ResponseRegionJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ResponseRegionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function ResponseRegionJsunit() { @@ -59,10 +59,10 @@ export default function ResponseRegionJsunit() { } var innerEvent = { eventId: 30, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testResponseRegion01] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testResponseRegion01] change component data error: " + err.message); } @@ -90,12 +90,12 @@ export default function ResponseRegionJsunit() { } var innerEventTwo = { eventId: 31, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventTwo, callbackTwo) + emitter.on(innerEventTwo, callbackTwo) } catch (err) { - console.info("[testResponseRegion02] on events_emitter err : " + JSON.stringify(err)); + console.info("[testResponseRegion02] on emitter err : " + JSON.stringify(err)); } console.info('[testResponseRegion02] testSendTouchEvent ' + sendTouchEvent(point)); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ScrollCodeJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ScrollCodeJsunit.test.ets index 0c325b0e363fc27a1aca51aa5587fb9a7e2d745d..ca0c35c31223d127f31de799916a285b45572e58 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ScrollCodeJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ScrollCodeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function scrollCodeJsunit() { @@ -70,10 +70,10 @@ export default function scrollCodeJsunit() { } var innerEvent = { eventId: 185, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_scrollCode_002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_scrollCode_002] change scrollable error: " + err.message); } @@ -96,10 +96,10 @@ export default function scrollCodeJsunit() { } var innerEvent = { eventId: 186, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_scrollCode_003] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_scrollCode_003] change scrollBar error: " + err.message); } @@ -122,10 +122,10 @@ export default function scrollCodeJsunit() { } var innerEvent = { eventId: 187, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_scrollCode_004] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_scrollCode_004] change scrollBar error: " + err.message); } @@ -148,10 +148,10 @@ export default function scrollCodeJsunit() { } var innerEvent = { eventId: 188, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_scrollCode_005] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_scrollCode_005] change scrollBar error: " + err.message); } @@ -172,12 +172,12 @@ export default function scrollCodeJsunit() { } var innerEvent = { eventId: 189, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[test_scrollCode_06] on events_emitter err : " + JSON.stringify(err)); + console.info("[test_scrollCode_06] on emitter err : " + JSON.stringify(err)); } console.info('[test_scrollCode_006] sendEventByKey ' + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ShapeJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ShapeJsunit.test.ets index 1b4b64af7cff4887ba1a5508756a0588f6838820..229f6a2633d297de8d8ea931ed6ebc7aa07face7 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ShapeJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ShapeJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function shapeJsunit() { describe('shapeTest', function () { @@ -155,10 +155,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1000 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1000 change component color error: " + err.message); } @@ -181,10 +181,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1100 change component color error: " + err.message); } @@ -207,10 +207,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1200 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1200 change component color error: " + err.message); } @@ -233,10 +233,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1300 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1300 change component color error: " + err.message); } @@ -259,10 +259,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1400 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1400 change component color error: " + err.message); } @@ -285,10 +285,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1500 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1500 change component color error: " + err.message); } @@ -311,10 +311,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1600 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1600 change component color error: " + err.message); } @@ -337,10 +337,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1700 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1700 change component color error: " + err.message); } @@ -363,10 +363,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1800 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1800 change component color error: " + err.message); } @@ -389,10 +389,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_1900 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_1900 change component color error: " + err.message); } @@ -415,10 +415,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2000 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2000 change component color error: " + err.message); } @@ -441,10 +441,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2100 change component color error: " + err.message); } @@ -467,10 +467,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2200 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2200 change component color error: " + err.message); } @@ -493,10 +493,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2300 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2300 change component color error: " + err.message); } @@ -519,10 +519,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2400 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2400 change component color error: " + err.message); } @@ -545,10 +545,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2500 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2500 change component color error: " + err.message); } @@ -571,10 +571,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2600 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2600 change component color error: " + err.message); } @@ -597,10 +597,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2700 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2700 change component color error: " + err.message); } @@ -623,10 +623,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2800 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2800 change component color error: " + err.message); } @@ -649,10 +649,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_2900 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_2900 change component color error: " + err.message); } @@ -686,10 +686,10 @@ export default function shapeJsunit() { } var innerEvent = { eventId: 192, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("shapeTest_3100 start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("shapeTest_3100 change component color error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SharedTransitionJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SharedTransitionJsunit.test.ets index 25daaf17338b0edc27a9efb31cc210894d2b302c..daa6415f136f05a3569a224530b8e975367ce9cf 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SharedTransitionJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SharedTransitionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function sharedTransitionJsunit() { @@ -90,10 +90,10 @@ export default function sharedTransitionJsunit() { } let indexEvent = { eventId: 194, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("sharedTransitionTest_0400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("sharedTransitionTest_0400 change component data error: " + err.message); } @@ -105,12 +105,12 @@ export default function sharedTransitionJsunit() { } let indexEventOne = { eventId: 193, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callback); + emitter.on(indexEventOne, callback); } catch (err) { - console.info("sharedTransitionTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("sharedTransitionTest_0400 on emitter err : " + JSON.stringify(err)); } console.info("sharedTransitionTest_0400 click result is: " + JSON.stringify(sendEventByKey('Navigator', 10, ""))); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets index 7a57c498e2afdcd39226fb973cc401a9eb5f7bf2..54cd19c56e19511f682ea5ed56139ac1f7aaf878 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function spanJsunit() { @@ -78,10 +78,10 @@ export default function spanJsunit() { } let indexEvent = { eventId: 200, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSpan003] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSpan003] change component data error: " + err.message); } @@ -115,10 +115,10 @@ export default function spanJsunit() { } let indexEvent = { eventId: 201, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSpan005] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSpan005] change component data error: " + err.message); } @@ -141,10 +141,10 @@ export default function spanJsunit() { } let indexEvent = { eventId: 1029, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSpan006] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSpan006] change component data error: " + err.message); } @@ -167,10 +167,10 @@ export default function spanJsunit() { } let indexEvent = { eventId: 1030, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSpan007] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSpan007] change component data error: " + err.message); } @@ -193,10 +193,10 @@ export default function spanJsunit() { } let indexEvent = { eventId: 1031, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSpan008] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSpan008] change component data error: " + err.message); } @@ -219,10 +219,10 @@ export default function spanJsunit() { } let indexEvent = { eventId: 1032, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSpan009] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testSpan009] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TabsJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TabsJsunit.test.ets index 0710f852bbe2e36e92a0b9cd3f9bbf2d3b1e1d53..ee086958bf747301a5b736bc97afb84b73b535e2 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TabsJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TabsJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function tabsJsunit() { describe('tabsTest', function () { @@ -134,10 +134,10 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 213, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testTabs_0800 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testTabs_0800 change component data error: " + err.message); } @@ -160,10 +160,10 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 213, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testTabs_0900 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testTabs_0900 change component data error: " + err.message); } @@ -186,10 +186,10 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 213, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testTabs_1000 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testTabs_1000 change component data error: " + err.message); } @@ -212,10 +212,10 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 213, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testTabs_1100 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testTabs_1100 change component data error: " + err.message); } @@ -238,10 +238,10 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 214, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testTabs_1200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testTabs_1200 change component data error: " + err.message); } @@ -264,10 +264,10 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 215, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testTabs_1300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testTabs_1300 change component data error: " + err.message); } @@ -289,12 +289,12 @@ export default function tabsJsunit() { } let indexEvent = { eventId: 212, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testTabs_1400 on events_emitter err : " + JSON.stringify(err)); + console.info("testTabs_1400 on emitter err : " + JSON.stringify(err)); } console.info("testTabs_1400 click result is: " + JSON.stringify(sendEventByKey('tabContent1', 10, ""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TapGesture.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TapGesture.test.ets index edd5bb7c25ea6f13c1e1bf3aa85e8142f368d319..df8bd0a3b37274ce4cfb681e6f5ed9b2a4e2b583 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TapGesture.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TapGesture.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function longPressGestureJsunit() { @@ -67,12 +67,12 @@ export default function longPressGestureJsunit() { } var innerEvent = { eventId: 214, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[testTapGesture01] on events_emitter err : " + JSON.stringify(err)); + console.info("[testTapGesture01] on emitter err : " + JSON.stringify(err)); } console.info('testTapGesture01 sendTouchEvent one:' + sendTouchEvent(point)); console.info('testTapGesture01 sendTouchEvent two:' + sendTouchEvent(point2)); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets index 4987391c219fef07a7ffa503be8f1da45d6551c4..8e0b264ca8a75de5cd2e63133b2d18d017d4e8df 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function textJsunit() { @@ -84,10 +84,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 226, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_0300 change component data error: " + err.message); } @@ -122,10 +122,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 227, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_0500 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_0500 change component data error: " + err.message); } @@ -159,10 +159,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 228, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_0700 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_0700 change component data error: " + err.message); } @@ -196,10 +196,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 229, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_0900 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_0900 change component data error: " + err.message); } @@ -233,10 +233,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 230, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_1100 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_1100 change component data error: " + err.message); } @@ -259,10 +259,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 231, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_1200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_1200 change component data error: " + err.message); } @@ -285,10 +285,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 232, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_1300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_1300 change component data error: " + err.message); } @@ -311,10 +311,10 @@ export default function textJsunit() { } let indexEvent = { eventId: 233, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testText_1400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testText_1400 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TimeStampJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TimeStampJsunit.test.ets index f1c818aadc92dee38e6199f2e872eb548a8cd567..2d081aa5ac74c1c45a3bc9b43df16e059d6c3354 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TimeStampJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TimeStampJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function timeStampJsunit() { describe('timeStampTest', function () { @@ -54,12 +54,12 @@ export default function timeStampJsunit() { } let indexEvent = { eventId: 230, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("timeStampTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("timeStampTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("timeStampTest_0100 click result is: " + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1500); diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ToggleJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ToggleJsunit.test.ets index d32ef5c9882c7870e1f8baf9a85ce31f1b6cee08..58762bb2a32018cb768b01fcd057cfa3c1195930 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ToggleJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ToggleJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function ToggleJsunit() { @@ -90,10 +90,10 @@ export default function ToggleJsunit() { } let indexEvent = { eventId: 231, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testToggle04 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testToggle04 change component data error: " + err.message); } @@ -116,10 +116,10 @@ export default function ToggleJsunit() { } let indexEvent = { eventId: 232, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testToggle05 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testToggle05 change component data error: " + err.message); } @@ -142,10 +142,10 @@ export default function ToggleJsunit() { } let indexEvent = { eventId: 1033, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testToggle06 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testToggle06 change component data error: " + err.message); } @@ -168,10 +168,10 @@ export default function ToggleJsunit() { } let indexEvent = { eventId: 1034, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testToggle07 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testToggle07 change component data error: " + err.message); } @@ -194,10 +194,10 @@ export default function ToggleJsunit() { } let indexEvent = { eventId: 1035, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testToggle04 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testToggle04 change component data error: " + err.message); } @@ -220,10 +220,10 @@ export default function ToggleJsunit() { } let indexEvent = { eventId: 1036, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("testToggle04 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("testToggle04 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TransitionJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TransitionJsunit.test.ets index 142c8fb25c367b7cbcf11fa7ef86d2993a48ec9e..03e92356dcb7896e32869c879ca4e5e9037e50dd 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TransitionJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/MainAbility/test/TransitionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function transitionJsunit() { @@ -62,7 +62,7 @@ export default function transitionJsunit() { console.info('transitionTest_0200 START'); let indexEvent = { eventId: 233, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } await Utils.sleep(1000); let callback = (indexEvent) => { @@ -70,9 +70,9 @@ export default function transitionJsunit() { expect(indexEvent.data.btn1).assertEqual(false); } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("transitionTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("transitionTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("transitionTest_0200 click result is: " + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000); @@ -90,10 +90,10 @@ export default function transitionJsunit() { } let indexEvent = { eventId: 234, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("transitionTest_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("transitionTest_0300 change component data error: " + err.message); } @@ -116,10 +116,10 @@ export default function transitionJsunit() { } let indexEvent = { eventId: 234, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("transitionTest_0400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("transitionTest_0400 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/NavigatorCode.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/NavigatorCode.ets index b326a4531477933561264cc20805f623867755c1..82404043a05ed9249c5f2dd6de80a26ed497d3db 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/NavigatorCode.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/NavigatorCode.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -41,15 +41,15 @@ struct NavigatorCode { console.info('navigatorCode page show called'); var stateChangeEvent = { eventId: 137, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent = { eventId: 138, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/PieceCode.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/PieceCode.ets index 9a079fa53823eadaa9fd5014ae4d8d6893a2d98f..4f34d540a32c749460f8f197067052c3db126202 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/PieceCode.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/PieceCode.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -31,9 +31,9 @@ struct PieceCode { console.info('piece page show called'); var stateChangeEvent = { eventId: 154, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { if (eventData != null) { @@ -76,10 +76,10 @@ struct PieceCode { } var backEvent = { eventId: 155, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("piece onClose start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("piece onClose emit action state err: " + JSON.stringify(err.message)) } @@ -98,10 +98,10 @@ struct PieceCode { } var backEvent = { eventId: 156, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("close to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("close action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/animationStatus.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/animationStatus.ets index 5e52eb03cddaf09a02d9df1ff252bd58e1dd47fa..2e17a191bb5df934270735cdfe10120b61b3aabc 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/animationStatus.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/animationStatus.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -94,10 +94,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 56, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -113,10 +113,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 57, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button3 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button3 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindMenu.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindMenu.ets index 5c31c06efe8983cae3d094ee9d47e9d49fe09db7..bf0bcd6fff0a160268d32108e90b12dd9ae30c12 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindMenu.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindMenu.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -48,10 +48,10 @@ struct MenuExample { } var backEvent = { eventId: 64, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("bindMenuTest_0100 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("bindMenuTest_0100 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindPopup.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindPopup.ets index 061140a5d827b86321d9de5ef33902819fd5a4f7..caf3876e34506f6d61de713d285833596e40ce37 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindPopup.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/bindPopup.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -46,10 +46,10 @@ struct PopupExample { } var backEvent = { eventId: 65, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -78,10 +78,10 @@ struct PopupExample { } var backEvent = { eventId: 66, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 emit action state err: " + JSON.stringify(err.message)) } @@ -101,10 +101,10 @@ struct PopupExample { } var backEvent = { eventId: 67, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button emit action state err: " + JSON.stringify(err.message)) } @@ -129,9 +129,9 @@ struct PopupExample { console.info('customPopupOption page show called'); var stateChangeEvent = { eventId: 68, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/configuration.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/configuration.ets index 3e7fedadab2cc70684df817413295a2008a870e4..ec278f69595a13805d1bbe1f6fb5ab78adf341cd 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/configuration.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/configuration.ets @@ -14,7 +14,7 @@ * limitations under the License. */ import Configuration from '@system.configuration'; -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -40,10 +40,10 @@ struct promptExample { console.log("backData is" + JSON.stringify(backData.data)); var backEvent = { eventId: 78, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("confituration start to emit action state"); - events_emitter.emit(backEvent, backData); + emitter.emit(backEvent, backData); }catch{ console.info("confituration emit action state err: " + JSON.stringify(err.message)); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/datePicker.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/datePicker.ets index 1bc516eea6019920458c16616c6c0705b74e0a45..12b9883048393146d794adb5cc9fc516bbf9f034 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/datePicker.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/datePicker.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -41,10 +41,10 @@ struct DatePickerExample01 { } var backEvent = { eventId: 80, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("DatePicker start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("DatePicker emit action state err: " + JSON.stringify(err.message)) } @@ -56,9 +56,9 @@ struct DatePickerExample01 { console.info('DatePicker page show called'); var stateChangeEvent = { eventId: 81, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction.ets index 3e49fbdd7ae7482f2a762ba518fd7bd179060d5d..0d2f293cd8832bc762c4c81517632b68cfe6a167 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -39,9 +39,9 @@ struct Index { console.info('direction page show called'); var stateChangeEvent = { eventId: 84, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction2.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction2.ets index 9d009876fc4df454b922d2fa2cb4f3e9d0ceeaaf..24a1b064efe8cfb45acaab04d9503804add47d3c 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction2.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/direction2.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -48,15 +48,15 @@ struct PositionExample { console.info('direction2 page show called'); var stateChangeEvent = { eventId: 82, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 83, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/divider.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/divider.ets index fb32938cd4e47b2a4f6d3b883b0f20665b7d68cd..f7281ea2905fb97a88371449cab7fd50d2ab0c77 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/divider.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/divider.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -52,9 +52,9 @@ struct DividerExample { console.info('divider page show called'); var stateChangeEvent = { eventId: 85, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexDirection.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexDirection.ets index a48b55d2d6a3671d5b60f6c37fd634af6f1a1295..7e399ad284854913fadf23d963fdf91841c4089a 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexDirection.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexDirection.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -66,19 +66,19 @@ struct flexDirectionExample { console.info('flexDirection page show called'); var stateChangeEvent1 = { eventId: 97, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent1, this.stateChangCallBack) + emitter.on(stateChangeEvent1, this.stateChangCallBack) var stateChangeEvent2 = { eventId: 98, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack) + emitter.on(stateChangeEvent2, this.stateChangCallBack) var stateChangeEvent3 = { eventId: 99, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent3, this.stateChangCallBack) + emitter.on(stateChangeEvent3, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexWrap.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexWrap.ets index 7a6d1bbeb5d190ef6f56ca82313e56b5c1340844..7bfc9888b928f9ed5158cf3a052ea13bb124c7ae 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexWrap.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/flexWrap.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -43,9 +43,9 @@ struct FlexWrapExample { console.info('flexDirection page show called'); var stateChangeEvent = { eventId: 100, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { if (eventData != null) { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/gradientDirection.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/gradientDirection.ets index 7c7cea8f9f8d1214956df30d009b4135cacf8ca9..39900b3faabe443fceca7595ce2a4e978ee37d89 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/gradientDirection.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/gradientDirection.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -40,21 +40,21 @@ struct linearGradientExample { console.info('gradientDirection page show called'); var stateChangeEventOne = { eventId: 106, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) console.info('gradientDirection page show called'); var stateChangeEventTwo = { eventId: 107, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventTwo, this.stateChangCallBack) + emitter.on(stateChangeEventTwo, this.stateChangCallBack) console.info('gradientDirection page show called'); var stateChangeEventThree = { eventId: 108, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventThree, this.stateChangCallBack) + emitter.on(stateChangeEventThree, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/imageAnimator.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/imageAnimator.ets index 26349746c41f62c4636f08d172ea29960398932c..78a373533cfea4b374885c05b59ade2ff6551e46 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/imageAnimator.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/imageAnimator.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -82,10 +82,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 114, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("emit action state err: " + JSON.stringify(err.message)) } @@ -107,10 +107,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 115, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button emit action state err: " + JSON.stringify(err.message)) } @@ -126,10 +126,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 116, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button1 emit action state err: " + JSON.stringify(err.message)) } @@ -145,10 +145,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 117, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -165,10 +165,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 118, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button3 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button3 emit action state err: " + JSON.stringify(err.message)) } @@ -183,10 +183,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 119, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button4 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button4 emit action state err: " + JSON.stringify(err.message)) } @@ -201,10 +201,10 @@ struct ImageAnimatorExample { } var backEvent = { eventId: 120, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button5 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("button5 emit action state err: " + JSON.stringify(err.message)) } @@ -216,9 +216,9 @@ struct ImageAnimatorExample { console.info('imageAnimator page show called'); var stateChangeEvent = { eventId: 121, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/listItem.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/listItem.ets index 16fb00086b72a58be3c69b7ed147b0866fbdce4e..c844d164740b21d674644c5a871ed3aeb2838526 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/listItem.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/listItem.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -27,15 +27,15 @@ struct ListItemExample { console.info('[ListItem] page show called'); var stateChangeEvent = { eventId: 122, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEventOne = { eventId: 123, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack); + emitter.on(stateChangeEventOne, this.stateChangCallBack); } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets index cc7d75f0ded5f4113235edea7710f861cd32d051..0ae0e1623cb1a760c0138526692af3e1f4762078 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -34,9 +34,9 @@ struct LoadingProgressExample { console.info('LoadingProgress page show called'); var stateChangeEvent = { eventId: 124, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/navigation.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/navigation.ets index dbe497da06a44b5cf9d7455f35f0ed2cec4d7ff0..f45c722a7e65b5d68cff5c951368e5654a7ebc43 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/navigation.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/navigation.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -49,9 +49,9 @@ struct NavigationExample { console.info('progress page show called'); var stateChangeEvent = { eventId: 135, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } @Builder NavigationTitle() { @@ -116,10 +116,10 @@ struct NavigationExample { } var backEvent = { eventId: 1366, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("navigationContent1 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("navigationContent1 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/ohosRouterB.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/ohosRouterB.ets index 5b8c293858a77bcf5eb8a694021f53978d81bde7..acb40e970b97f82f3acb3d20540001f68a1f295f 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/ohosRouterB.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/ohosRouterB.ets @@ -14,7 +14,7 @@ * limitations under the License. */ import router from '@system.router'; -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -42,10 +42,10 @@ struct OhosRouterB { } let paramsEvent = { eventId: 142, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[OhosRouterB] start to emit params"); - events_emitter.emit(paramsEvent, paramsData); + emitter.emit(paramsEvent, paramsData); } catch (err) { console.info("[OhosRouterB] emit params err: " + JSON.stringify(err.message)); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/pageTransition.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/pageTransition.ets index 2f52889c1577b75b143f950cad17404ec85e7a32..48d1198862b26c2c72f45ad60a7b4d34e7945845 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/pageTransition.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/pageTransition.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -44,10 +44,10 @@ struct PageTransitionExample1 { } var backEvent = { eventId: 144, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("pageTransition start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("pageTransition emit action state err: " + JSON.stringify(err.message)) } @@ -70,13 +70,13 @@ struct PageTransitionExample1 { onPageShow() { console.info('active page show called'); - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) var stateChangeEventOne = { eventId: 145, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEventOne, this.stateChangCallBack) + emitter.on(stateChangeEventOne, this.stateChangCallBack) } private stateChangCallBack = (eventData) => { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/placement.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/placement.ets index de6f3f87d65653eb0f8f1c774225956e32019b5c..11958c5779c497a0afbf90b43b8e4f429cc45a75 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/placement.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/placement.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -62,10 +62,10 @@ struct PlacementExample { } var backEvent = { eventId: 157, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) }catch(err){ console.info("button emit action state err: " + JSON.stringify(err.message)) } @@ -96,10 +96,10 @@ struct PlacementExample { } var backEventOne = { eventId: 158, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button1 start to emit action state") - events_emitter.emit(backEventOne, backDataOne) + emitter.emit(backEventOne, backDataOne) }catch(err){ console.info("button1 emit action state err: " + JSON.stringify(err.message)) } @@ -130,10 +130,10 @@ struct PlacementExample { } var backEventTwo = { eventId: 159, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button2 start to emit action state") - events_emitter.emit(backEventTwo, backDataTwo) + emitter.emit(backEventTwo, backDataTwo) }catch(err){ console.info("button2 emit action state err: " + JSON.stringify(err.message)) } @@ -164,10 +164,10 @@ struct PlacementExample { } var backEventThree = { eventId: 160, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("button3 start to emit action state") - events_emitter.emit(backEventThree, backDataThree) + emitter.emit(backEventThree, backDataThree) }catch(err){ console.info("button3 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/row.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/row.ets index 19bc56839d79d53b7deae07e4f523eab6f66bb23..c4cfbbacb8861c75b0937f24d65ed63cf8fe2305 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/row.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/row.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -38,9 +38,9 @@ struct RowTest { console.info('row page show called'); var stateChangeEvent = { eventId: 182, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack) + emitter.on(stateChangeEvent, this.stateChangCallBack) } build() { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets index 77c1a13dbdfed2900b6bc00a9d3d70705070f9da..5597e25eae7e13657b07833e803479d7900b177c 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets @@ -14,7 +14,7 @@ * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -42,15 +42,15 @@ struct ScrollBarExample { console.info('scrollBar page show called'); var stateChangeEvent = { eventId: 183, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); var stateChangeEvent2 = { eventId: 184, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent2, this.stateChangCallBack); + emitter.on(stateChangeEvent2, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/search.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/search.ets index e4a6d70c73dcf754b67ffd651f094cdda28d572d..52030678d35cddf97930f6cc9cd07aecf9d24415 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/search.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/search.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter' +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -40,9 +40,9 @@ struct SearchExample { console.info('search page show called'); var stateChangeEvent = { eventId: 190, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(stateChangeEvent, this.stateChangCallBack); + emitter.on(stateChangeEvent, this.stateChangCallBack); } build() { diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/sourceType.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/sourceType.ets index 6c5310d308a0a91a90cd654da2c8b2e7ab784ae0..da563a285ad5e85bcc7c1c66d33ed8b8a98e19d0 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/sourceType.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/sourceType.ets @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import events_emitter from '@ohos.emitter'; +import emitter from '@ohos.events.emitter'; @Entry @Component @@ -51,10 +51,10 @@ struct ClickExample { } var backEvent = { eventId: 198, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("sourceTypeTest_0100 start to emit action state") - events_emitter.emit(backEvent, backData) + emitter.emit(backEvent, backData) } catch (err) { console.info("sourceTypeTest_0100 emit action state err: " + JSON.stringify(err.message)) } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/AnimationStatusJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/AnimationStatusJsunit.test.ets index 5c58f40fdb935cac0b86c59d8d2ea63900ccc3bd..d56adaf31df9763cf219d4835453ad6fda880a4e 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/AnimationStatusJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/AnimationStatusJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function animationStatusJsunit() { describe('animationStatus', function () { @@ -77,12 +77,12 @@ export default function animationStatusJsunit() { } let indexEvent = { eventId: 56, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animationStatus03 on events_emitter err : " + JSON.stringify(err)); + console.info("animationStatus03 on emitter err : " + JSON.stringify(err)); } console.info("animationStatus03 click result is: " + JSON.stringify(sendEventByKey('button2',10,""))); await Utils.sleep(1000); @@ -99,12 +99,12 @@ export default function animationStatusJsunit() { } let indexEvent = { eventId: 57, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("animationStatus04 on events_emitter err : " + JSON.stringify(err)); + console.info("animationStatus04 on emitter err : " + JSON.stringify(err)); } console.info("animationStatus04 click result is: " + JSON.stringify(sendEventByKey('button3',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindMenuJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindMenuJsunit.test.ets index d67d322cda567efc948d03eef71e7d8b3e917fcd..833ea754d8bbf39f059c6e9b19dae3ff851e3848 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindMenuJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindMenuJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function aboutToDisappearJsunit() { @@ -56,12 +56,12 @@ export default function aboutToDisappearJsunit() { } let indexEvent = { eventId: 64, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("bindMenuTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("bindMenuTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("bindMenuTest_0100 button click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindPopupJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindPopupJsunit.test.ets index bb454ea2368704646d07b353345d12b50bb87ee8..752e9d8ad457ab23a77a9dd12997bc5bb5aca4fa 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindPopupJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/BindPopupJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function customPopupOptionJsunit(){ describe('bindPopupTest', function (){ @@ -55,12 +55,12 @@ export default function customPopupOptionJsunit(){ } let indexEvent = { eventId: 67, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("bindPopupTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("bindPopupTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("bindPopupTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1000); @@ -81,10 +81,10 @@ export default function customPopupOptionJsunit(){ } let indexEvent = { eventId: 68, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("bindPopupTest_0200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("bindPopupTest_0200 change component data error: " + err.message); } @@ -96,12 +96,12 @@ export default function customPopupOptionJsunit(){ } let indexEventOne = { eventId: 66, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callbackOne); + emitter.on(indexEventOne, callbackOne); } catch (err) { - console.info("bindPopupTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("bindPopupTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("bindPopupTest_0200 click result is: " + JSON.stringify(sendEventByKey('button1',10,""))); await Utils.sleep(1000); @@ -118,12 +118,12 @@ export default function customPopupOptionJsunit(){ } let indexEvent = { eventId: 65, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("bindPopupTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("bindPopupTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("bindPopupTest_0300 click result is: " + JSON.stringify(sendEventByKey('button2',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ConfigurationJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ConfigurationJsunit.test.ets index ec99f5d94883d8e96b52499541247274f2c742a9..d2bc50f68aef4b46f65b9c5eff16256c834643aa 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ConfigurationJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ConfigurationJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function transFormJsunit() { @@ -55,9 +55,9 @@ export default function transFormJsunit() { } var configurationEvent = { eventId: 78, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } - events_emitter.on(configurationEvent, callBackConfiguration); + emitter.on(configurationEvent, callBackConfiguration); } catch (err) { console.info("configurationTest_0100 on configurationEvent err : " + JSON.stringify(err)); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets index e1100ab60396269f9ce57d18f1307829c62d4122..d5e1bd03a866b9ef3a622d3df5b495cb264d544c 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function datePickerJsunit() { @@ -77,10 +77,10 @@ export default function datePickerJsunit() { } let indexEvent = { eventId: 81, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("datePickerTest_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("datePickerTest_0300 change component data error: " + err.message); } @@ -90,12 +90,12 @@ export default function datePickerJsunit() { } let indexEventOne = { eventId: 80, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callback); + emitter.on(indexEventOne, callback); } catch (err) { - console.info("datePickerTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("datePickerTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("datePickerTest_0300 click result is: " + JSON.stringify(sendEventByKey('datePicker',10,""))); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/Direction2Jsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/Direction2Jsunit.test.ets index d8409635c220ce9f962c052f16546aca60fe7bf8..750a4655a29dcf968c9dd59392d6f90df1cb0610 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/Direction2Jsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/Direction2Jsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function direction2Jsunit(){ describe('direction2Test', function (){ @@ -65,10 +65,10 @@ export default function direction2Jsunit(){ } let indexEvent = { eventId: 82, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("direction2Test_0200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("direction2Test_0200 change component data error: " + err.message); } @@ -91,10 +91,10 @@ export default function direction2Jsunit(){ } let indexEvent = { eventId: 83, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("direction2Test_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("direction2Test_0300 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DirectionJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DirectionJsunit.test.ets index 12bea6ad0844e099b5d3be57bffcee853fffe3e5..146f19130d5e1d8eaeecef0a838ae6d5b2a5b9fc 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DirectionJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DirectionJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function directionJsunit(){ describe('directionTest', function (){ @@ -65,10 +65,10 @@ export default function directionJsunit(){ } let indexEvent = { eventId: 84, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("directionTest_0200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("directionTest_0200 change component data error: " + err.message); } @@ -91,10 +91,10 @@ export default function directionJsunit(){ } let indexEvent = { eventId: 84, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("directionTest_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("directionTest_0300 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DividerJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DividerJsunit.test.ets index 801c9b8cbb0730d8bb7724b653a0af8ad2ca8df8..5e0821123f91096dfddedd2b1c252ee16b409ace 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DividerJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DividerJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function dividerJsunit() { @@ -77,10 +77,10 @@ export default function dividerJsunit() { } let indexEvent = { eventId: 85, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("dividerTest_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("dividerTest_0300 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexDirectionJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexDirectionJsunit.test.ets index bd262a15a6acfb654af132b32a82ddc34ee5654b..956dda5efcea39a68bfca1b24ced72895642869b 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexDirectionJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexDirectionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function flexDirectionJsunit(){ @@ -130,10 +130,10 @@ export default function flexDirectionJsunit(){ } let indexEvent = { eventId: 97, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("flexDirection_0700 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("flexDirection_0700 change component data error: " + err.message); } @@ -160,10 +160,10 @@ export default function flexDirectionJsunit(){ } let indexEvent = { eventId: 98, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("flexDirection_0800 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("flexDirection_0800 change component data error: " + err.message); } @@ -190,10 +190,10 @@ export default function flexDirectionJsunit(){ } let indexEvent = { eventId: 99, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("flexDirection_0900 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("flexDirection_0900 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexWrapJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexWrapJsunit.test.ets index b2426d60e7f0ff64ccc9a002ec3977824f4ef6fb..41489f087702eb45f1f8393af46daf2972a24644 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexWrapJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/FlexWrapJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function flexWrapJsunit() { @@ -81,10 +81,10 @@ export default function flexWrapJsunit() { } let indexEvent = { eventId: 100, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("flexWrap_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("flexWrap_0300 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/GradientDirectionJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/GradientDirectionJsunit.test.ets index 09b79fd527cddb55fddd3d368dfdcde6d172327a..d38dfcde915964233d5eac49b79646e1b4262a13 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/GradientDirectionJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/GradientDirectionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function gridJsunit() { @@ -67,10 +67,10 @@ export default function gridJsunit() { } let indexEvent = { eventId: 106, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("GradientDirectionTest_0200 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("GradientDirectionTest_0200 change component data error: " + err.message); } @@ -94,10 +94,10 @@ export default function gridJsunit() { } let indexEvent = { eventId: 107, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("GradientDirectionTest_0300 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("GradientDirectionTest_0300 change component data error: " + err.message); } @@ -121,10 +121,10 @@ export default function gridJsunit() { } let indexEvent = { eventId: 108, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("GradientDirectionTest_0400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("GradientDirectionTest_0400 change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ImageAnimatorJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ImageAnimatorJsunit.test.ets index e1e1b3360cb30215334a8dd5401d10630e1de573..7d513ba20ab17bbf012f18331262c601822d9c9f 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ImageAnimatorJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ImageAnimatorJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils.ets'; export default function imageAnimatorJsunit(){ @@ -56,12 +56,12 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 115, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("imageAnimatorTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1000); @@ -79,12 +79,12 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 116, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("imageAnimatorTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0200 click result is: " + JSON.stringify(sendEventByKey('button1',10,""))); await Utils.sleep(1000); @@ -102,12 +102,12 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 117, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("imageAnimatorTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0300 click result is: " + JSON.stringify(sendEventByKey('button2',10,""))); await Utils.sleep(1000); @@ -124,12 +124,12 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 118, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("imageAnimatorTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0400 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0400 click result is: " + JSON.stringify(sendEventByKey('button3',10,""))); await Utils.sleep(1000); @@ -146,12 +146,12 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 119, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("imageAnimatorTest_0500 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0500 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0500 click result is: " + JSON.stringify(sendEventByKey('button4',10,""))); await Utils.sleep(1000); @@ -168,12 +168,12 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 114, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("imageAnimatorTest_0600 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0600 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0600 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1000); @@ -191,10 +191,10 @@ export default function imageAnimatorJsunit(){ } let indexEvent = { eventId: 121, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("imageAnimatorTest_0700 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("imageAnimatorTest_0700 change component data error: " + err.message); } @@ -205,12 +205,12 @@ export default function imageAnimatorJsunit(){ } let indexEventOne = { eventId: 120, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callbackOne); + emitter.on(indexEventOne, callbackOne); } catch (err) { - console.info("imageAnimatorTest_0700 on events_emitter err : " + JSON.stringify(err)); + console.info("imageAnimatorTest_0700 on emitter err : " + JSON.stringify(err)); } console.info("imageAnimatorTest_0700 click result is: " + JSON.stringify(sendEventByKey('button5',10,""))); await Utils.sleep(1000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets index af8774d2cf67e359bc4dd8928a46b036f05f19a8..66ac43c181355378b0f5eeb1c885f425b8ba9f09 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function listItemJsunit() { @@ -67,10 +67,10 @@ export default function listItemJsunit() { } var innerEvent = { eventId: 122, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testListItem02] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testListItem02] change component data error: " + err.message); } @@ -104,10 +104,10 @@ export default function listItemJsunit() { } var innerEvent = { eventId: 123, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testListItem04] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testListItem04] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets index 2e54a6b3b4359e08e9573c078e6e4ade1e2513fe..0cf0f6ca17bd0db24916d5b4895d4ceaf6d69277 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function navigationJsunit() { @@ -66,12 +66,12 @@ export default function navigationJsunit() { } let indexEvent = { eventId: 136, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("testNavigation_200 on events_emitter err : " + JSON.stringify(err)); + console.info("testNavigation_200 on emitter err : " + JSON.stringify(err)); } console.info("testNavigation_200 click result is: " + JSON.stringify(sendEventByKey('NavigationContent1',10,""))); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigatorCodeJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigatorCodeJsunit.test.ets index f72a7a68fb9d605d0981b98598ca09a078ec47e0..003d8c3f303b5e3a2d8638bfde4c0e3917c0bb47 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigatorCodeJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/NavigatorCodeJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function navigatorCodeJsunit() { @@ -69,10 +69,10 @@ export default function navigatorCodeJsunit() { } var innerEvent = { eventId: 138, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[test_NavigatorClick_002] start to publish emit" + JSON.stringify(eventData)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[test_NavigatorClick_002] change component error: " + err.message); } @@ -92,12 +92,12 @@ export default function navigatorCodeJsunit() { } var innerEvent = { eventId: 139, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("[test_NavigatorClick_003] on events_emitter err : " + JSON.stringify(err)); + console.info("[test_NavigatorClick_003] on emitter err : " + JSON.stringify(err)); } console.info('[test_NavigatorClick_003] sendEventByKey ' + JSON.stringify(sendEventByKey('button', 10, ""))); await Utils.sleep(1000) diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/OhosRouterJsnuit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/OhosRouterJsnuit.test.ets index 2e40548fb22495ec3ad4da3c10825d9e3e2af04c..7a51c34a0520827e7b925ea9797b8f353faa509d 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/OhosRouterJsnuit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/OhosRouterJsnuit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function OhosRouterJsunit() { describe('ohosRouterTest', function () { @@ -83,12 +83,12 @@ export default function OhosRouterJsunit() { } let paramsEvent = { eventId: 142, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(paramsEvent, callback); + emitter.on(paramsEvent, callback); } catch (err) { - console.info("[ohosRouterTest002] on events_emitter err : " + JSON.stringify(err)); + console.info("[ohosRouterTest002] on emitter err : " + JSON.stringify(err)); } console.info("[ohosRouterTest002] click push button result is: " + JSON.stringify(sendEventByKey('pushButtonA', 10, ""))); @@ -160,12 +160,12 @@ export default function OhosRouterJsunit() { } let paramsEvent = { eventId: 142, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(paramsEvent, callback); + emitter.on(paramsEvent, callback); } catch (err) { - console.info("[ohosRouterTest005] on events_emitter err : " + JSON.stringify(err)); + console.info("[ohosRouterTest005] on emitter err : " + JSON.stringify(err)); } console.info("[ohosRouterTest005] click replace button result is: " + JSON.stringify(sendEventByKey('ReplaceButtonA', 10, ""))); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PageTransitionJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PageTransitionJsunit.test.ets index ea800c9701b5cdd09d25a04be7e8465311349841..4489aeb32f7e9bc4716940f03bff7884c3571c9c 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PageTransitionJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PageTransitionJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter' +import emitter from '@ohos.events.emitter' import Utils from './Utils'; export default function pageTransitionJsunit() { @@ -90,10 +90,10 @@ export default function pageTransitionJsunit() { } let indexEvent = { eventId: 145, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("pageTransitionTest_0400 start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("pageTransitionTest_0400 change component data error: " + err.message); } @@ -105,12 +105,12 @@ export default function pageTransitionJsunit() { } let indexEventOne = { eventId: 144, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callback); + emitter.on(indexEventOne, callback); } catch (err) { - console.info("pageTransitionTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("pageTransitionTest_0400 on emitter err : " + JSON.stringify(err)); } console.info("pageTransitionTest_0400 click result is: " + JSON.stringify(sendEventByKey('Navigator',10,""))); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PieceJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PieceJsunit.test.ets index b43db5a4f06dd9d475d63fefd55691f93a5b1ea8..463b97831aa7bc83271e23d201b38d3993425b7d 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PieceJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PieceJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function pieceJsunit() { @@ -54,12 +54,12 @@ export default function pieceJsunit() { } let indexEvent = { eventId: 156, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("test_pieceCode_01 on events_emitter err : " + JSON.stringify(err)); + console.info("test_pieceCode_01 on emitter err : " + JSON.stringify(err)); } console.info("test_pieceCode_01 click result is: " + JSON.stringify(sendEventByKey('button1',10,""))); await Utils.sleep(1000); @@ -69,12 +69,12 @@ export default function pieceJsunit() { } var innerEventOne = { eventId: 155, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEventOne, callback1); + emitter.on(innerEventOne, callback1); } catch (err) { - console.info("test_pieceCode_01 on events_emitter err : " + JSON.stringify(err)); + console.info("test_pieceCode_01 on emitter err : " + JSON.stringify(err)); } console.info('test_pieceCode_01 END'); done(); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PlacementJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PlacementJsunit.test.ets index 0b6d06604460c2d514b45775a9c992f773cd7ab3..113ee38990490f7d8e178640960a6d58860a2f18 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PlacementJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/PlacementJsunit.test.ets @@ -16,7 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; import Utils from './Utils'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; export default function placementJsunit(){ describe('placementTest', function (){ @@ -54,12 +54,12 @@ export default function placementJsunit(){ } let indexEvent = { eventId: 157, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEvent, callback); + emitter.on(indexEvent, callback); } catch (err) { - console.info("placementTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("placementTest_0100 on emitter err : " + JSON.stringify(err)); } console.info("placementTest_0100 click result is: " + JSON.stringify(sendEventByKey('button',10,""))); await Utils.sleep(1500); @@ -77,12 +77,12 @@ export default function placementJsunit(){ } let indexEventOne = { eventId: 158, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventOne, callbackOne); + emitter.on(indexEventOne, callbackOne); } catch (err) { - console.info("placementTest_0200 on events_emitter err : " + JSON.stringify(err)); + console.info("placementTest_0200 on emitter err : " + JSON.stringify(err)); } console.info("placementTest_0200 click result is: " + JSON.stringify(sendEventByKey('button1',10,""))); await Utils.sleep(1500); @@ -100,12 +100,12 @@ export default function placementJsunit(){ } let indexEventTwo = { eventId: 159, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventTwo, callbackTwo); + emitter.on(indexEventTwo, callbackTwo); } catch (err) { - console.info("placementTest_0300 on events_emitter err : " + JSON.stringify(err)); + console.info("placementTest_0300 on emitter err : " + JSON.stringify(err)); } console.info("placementTest_0300 click result is: " + JSON.stringify(sendEventByKey('button2',10,""))); await Utils.sleep(1500); @@ -123,12 +123,12 @@ export default function placementJsunit(){ } let indexEventThree = { eventId: 160, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(indexEventThree, callbackThree); + emitter.on(indexEventThree, callbackThree); } catch (err) { - console.info("placementTest_0400 on events_emitter err : " + JSON.stringify(err)); + console.info("placementTest_0400 on emitter err : " + JSON.stringify(err)); } console.info("placementTest_0400 click result is: " + JSON.stringify(sendEventByKey('button3',10,""))); await Utils.sleep(1500); diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ScrollBarJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ScrollBarJsunit.test.ets index 833474689f3257de766b13939aaad492ddbe3f27..3fe520dca15c3369c44bd4ef1f0563842529a0b4 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ScrollBarJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/ScrollBarJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function scrollBarJsunit() { @@ -69,10 +69,10 @@ export default function scrollBarJsunit() { } var innerEvent = { eventId: 183, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testScrollBar002] start to publish emit:" + JSON.stringify(eventData.data)); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testScrollBar002] change component data error: " + err.message); } @@ -106,10 +106,10 @@ export default function scrollBarJsunit() { } let indexEvent = { eventId: 184, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testScrollBar004] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testScrollBar004] change component data error: " + err.message); } @@ -132,10 +132,10 @@ export default function scrollBarJsunit() { } let indexEvent = { eventId: 184, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testScrollBar005] start to publish emit"); - events_emitter.emit(indexEvent, eventData); + emitter.emit(indexEvent, eventData); } catch (err) { console.log("[testScrollBar005] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SearchJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SearchJsunit.test.ets index bc6970a0837d305947220fd1deac59513f0578f5..a3b42d058b319010606c005b9deb88a11e24fab3 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SearchJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SearchJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils'; export default function searchJsunit() { @@ -66,10 +66,10 @@ export default function searchJsunit() { } var innerEvent = { eventId: 190, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } console.info("[testSearch002] start to publish emit"); - events_emitter.emit(innerEvent, eventData); + emitter.emit(innerEvent, eventData); } catch (err) { console.log("[testSearch002] change component data error: " + err.message); } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SourceTypeJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SourceTypeJsunit.test.ets index c9571eaeee71e123057daff0d5a8b09975190b3f..1b038ee58bb23bfde310463acdb7447689863c0f 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SourceTypeJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/SourceTypeJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" import router from '@system.router'; -import events_emitter from '@ohos.events.emitter'; +import emitter from '@ohos.events.emitter'; import Utils from './Utils.ets'; export default function sourceTypeJsunit() { @@ -63,12 +63,12 @@ export default function sourceTypeJsunit() { } var innerEvent = { eventId: 198, - priority: events_emitter.EventPriority.LOW + priority: emitter.EventPriority.LOW } try { - events_emitter.on(innerEvent, callback) + emitter.on(innerEvent, callback) } catch (err) { - console.info("sourceTypeTest_0100 on events_emitter err : " + JSON.stringify(err)); + console.info("sourceTypeTest_0100 on emitter err : " + JSON.stringify(err)); } console.info('sourceTypeTest_0100 sendTouchEvent :' + sendTouchEvent(point)); await Utils.sleep(1000)