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

!3290 适配emitter导包

Merge pull request !3290 from zj/OpenHarmony-3.2-Beta1
......@@ -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))
}
......
......@@ -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))
}
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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);
}
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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) => {
......
......@@ -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() {
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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))
}
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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))
}
......
......@@ -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))
}
......
......@@ -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) => {
......
......@@ -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);
}
......
......@@ -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));
}
......
......@@ -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');
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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)
......
......@@ -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));
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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) => {
......
......@@ -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))
}
......
......@@ -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))
}
......
......@@ -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));
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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) => {
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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() {
......
......@@ -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))
}
......
......@@ -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))
}
......
......@@ -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) => {
......
......@@ -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))
}
......
......@@ -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))
}
......
......@@ -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() {
......
......@@ -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) => {
......
......@@ -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))
}
......
......@@ -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))
}
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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));
}
......
......@@ -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) => {
......
......@@ -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))
}
......
......@@ -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) => {
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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)
......
......@@ -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();
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -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, "")));
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册