diff --git a/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets b/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets index 254d1fc6c45bacf8142d6339e2212163103bc900..345f0653cb7aceb892d1e417e74e2b969d6d03ed 100644 --- a/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets +++ b/arkui/ace_ets_web_dev_two/entry/src/main/ets/MainAbility/pages/web.ets @@ -255,8 +255,12 @@ struct Index { console.log('error:' + error); return; } - this.text = result.toString(); - console.log("usage is:" + this.text) + if (result > 2500000000) { + this.text = "true" + } else { + this.text = "false" + } + console.log("usage is:" + result) }) setTimeout(()=>{ Utils.emitEvent(this.text,434) @@ -269,7 +273,12 @@ struct Index { .then(quota=>{ console.log('usage: '+quota) setTimeout(()=>{ - Utils.emitEvent(quota.toString(),448) + if (result > 2500000000) { + this.text = "true" + } else { + this.text = "false" + } + Utils.emitEvent(this.text,448) },3000) }) .catch(error=>{ diff --git a/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets b/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets index 9085a13daa7e44d4ee60100bfe8b1d15e8d58e8a..292ba0f6b2e7c39d1a5c985822f67906e5b2d6ca 100644 --- a/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets +++ b/arkui/ace_ets_web_dev_two/entry/src/main/ets/test/WebJsunit.test.ets @@ -161,7 +161,7 @@ export default function webJsunit() { */ it('getOriginQuota',0,async function(done){ emitKey="emitGetOrigins"; - Utils.registerEvent("getOriginQuota","2575722086",434,done); + Utils.registerEvent("getOriginQuota","true",434,done); sendEventByKey('webcomponent',10,''); }) /* @@ -241,7 +241,7 @@ export default function webJsunit() { */ it('getOriginQuotaPromise',0,async function(done){ emitKey="emitGetOriginsPromise"; - Utils.registerEvent("getOriginQuotaPromise",'2575722086',448,done); + Utils.registerEvent("getOriginQuotaPromise",'true',448,done); sendEventByKey('webcomponent',10,''); }) /*