提交 df56753f 编写于 作者: Z zhijianwen

编程规范+开源版本

Signed-off-by: Nzhijianwen <zhijianwen@huawei.com>
上级 10537483
......@@ -228,9 +228,9 @@ describe('ActsAnsActionButtonTest', function () {
WantAgent.trigger(wantAgentD, triggerInfoD,
(err, data) => {
if (err.code == 0) {
console.info('==== triggerD success' + err.code+JSON.stringify(data) );
console.info('==== triggered success' + err.code + JSON.stringify(data) );
} else {
console.info('----triggerD failed!----'+err.code);
console.info('----triggered failed!----'+ err.code);
}
});
}
......
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
通知许可设定测试
Test Enabling of Notification
</text>
</div>
<div class="container">
<text class="title">
订阅发布
Text of Publishing Common Events
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent1
WantAgent1 Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent1Promise
WantAgent1Promise Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent3
WantAgent3 Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgentPromise3
WantAgentPromise3 Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent4
WantAgent4 Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgentPromise4
WantAgentPromise4 Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent5
WantAgent5 Startup
</text>
</div>
......@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgentPromise5
WantAgentPromise5 Startup
</text>
</div>
......@@ -15,7 +15,7 @@
<div class="container">
<text class="title">
Hello,Earth! 1111
Hello, World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
......@@ -17,18 +17,18 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('ActsSubscriberTestOrder', function () {
console.info("===========ActsSubscriberTestOrder start====================>");
var num2 = 0;
var order = false;
var commonEventSubscriber0100;
var commonEventSubscriber0101;
var commonEventSubscriber0200;
var commonEventSubscriber0201;
var commonEventSubscriber0300;
var commonEventSubscriber0301;
var commonEventSubscriber0400;
var commonEventSubscriber0401;
var commonEventSubscriber0500;
var commonEventSubscriber0501;
let num2 = 0;
let order = false;
let commonEventSubscriber0100;
let commonEventSubscriber0101;
let commonEventSubscriber0200;
let commonEventSubscriber0201;
let commonEventSubscriber0300;
let commonEventSubscriber0301;
let commonEventSubscriber0400;
let commonEventSubscriber0401;
let commonEventSubscriber0500;
let commonEventSubscriber0501;
function publishCallback(err) {
console.info("===============>publishCallback");
......@@ -46,17 +46,17 @@ describe('ActsSubscriberTestOrder', function () {
it('ActsSubscriberTestOrder_0100', 0, async function (done) {
console.info("===============ActsSubscriberTestOrder_0100===============>");
var commonEventSubscribeInfo1 = {
let commonEventSubscribeInfo1 = {
events: ["publish_event0100"],
priority: 10
};
var commonEventSubscribeInfo2 = {
let commonEventSubscribeInfo2 = {
events: ["publish_event0100"],
priority: 9
};
var commonEventPublishData = {
let commonEventPublishData = {
bundleName: "publish_event0100_bundleName",
code: 1,
data: "publish_event1001_init",
......@@ -163,25 +163,25 @@ describe('ActsSubscriberTestOrder', function () {
it ('ActsSubscriberTestOrder_0200', 0, async function (done) {
console.info("===============ActsSubscriberTestOrder_0200===============>");
var commonEventSubscribeInfo1 = {
let commonEventSubscribeInfo1 = {
events: ["publish_event0200",
"publish_event0201"],
priority: 10
};
var commonEventSubscribeInfo2 = {
let commonEventSubscribeInfo2 = {
events: ["publish_event0201"],
priority: 9
};
var commonEventPublishData1 = {
let commonEventPublishData1 = {
bundleName: "publish_event0200_bundleName",
code: 1,
data: "publish_event0200_init",
isOrdered: false,
}
var commonEventPublishData2 = {
let commonEventPublishData2 = {
bundleName: "publish_event0201_bundleName",
code: 1,
data: "publish_event0201_init",
......@@ -275,24 +275,24 @@ describe('ActsSubscriberTestOrder', function () {
it ('ActsSubscriberTestOrder_0300', 0, async function (done) {
console.info("===============ActsSubscriberTestOrder_0300===============>");
var commonEventSubscribeInfo1 = {
let commonEventSubscribeInfo1 = {
events: ["publish_event0301"],
priority: 9
};
var commonEventSubscribeInfo2 = {
let commonEventSubscribeInfo2 = {
events: ["publish_event0301"],
priority: 10
};
var commonEventPublishData2 = {
let commonEventPublishData2 = {
bundleName: "publish_event0301_bundleName",
code: 1,
data: "publish_event0301_init",
isOrdered: true,
}
var callBackNum = 0;
let callBackNum = 0;
async function subscriberCallBack0300(err, data) {
console.info("===============>subscriberCallBack0300========event: " + data.event);
console.info("===============>subscriberCallBack0300========bundleName: " + data.bundleName);
......@@ -368,7 +368,7 @@ describe('ActsSubscriberTestOrder', function () {
data.getSubscribeInfo().then(()=>{
console.info("===============ActsSubscriberTestOrder_0300=========getSubscribeInfo promise2");
Subscriber.subscribe(commonEventSubscriber0301, subscriberCallBack0301);
var numindex = 0;
let numindex = 0;
for (; numindex < 3; ++numindex) {
setTimeout(function(){
console.debug("===================ActsSubscriberTestOrder_0300 delay 100ms==================");
......@@ -388,17 +388,17 @@ describe('ActsSubscriberTestOrder', function () {
it ('ActsSubscriberTestOrder_0400', 0, async function (done) {
console.info("===============ActsSubscriberTestOrder_0400===============>");
var commonEventSubscribeInfo1 = {
let commonEventSubscribeInfo1 = {
events: ["publish_eventOrder0400"],
priority: 10
};
var commonEventSubscribeInfo2 = {
let commonEventSubscribeInfo2 = {
events: ["publish_eventOrder0400"],
priority: 9
};
var commonEventPublishData = {
let commonEventPublishData = {
bundleName: "publish_event0400_bundleName",
code: 1,
data: "publish_event0400_init",
......@@ -472,17 +472,17 @@ describe('ActsSubscriberTestOrder', function () {
it ('ActsSubscriberTestOrder_0500', 0, async function (done) {
console.info("===============ActsSubscriberTestOrder_0500===============>");
var commonEventSubscribeInfo1 = {
let commonEventSubscribeInfo1 = {
events: ["publish_event0500"],
priority: 1001
};
var commonEventSubscribeInfo2 = {
let commonEventSubscribeInfo2 = {
events: ["publish_event0500"],
priority: -101
};
var commonEventPublishData = {
let commonEventPublishData = {
bundleName: "publish_event0500_bundleName",
code: 10,
data: "publish_event0500_init",
......
......@@ -15,7 +15,7 @@
<div class="container">
<text class="title">
Hello,Earth! 1111
Hello, World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
......@@ -17,10 +17,10 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('ActsSubscriberTestUnorderSystem', async function (done) {
console.info("===========ActsSubscriberTestUnorderSystem start====================>");
var commonEventSubscriber1;
var commonEventSubscriber2;
var commonEventSubscriber3;
var array = [
let commonEventSubscriber1;
let commonEventSubscriber2;
let commonEventSubscriber3;
let array = [
Subscriber.Support.COMMON_EVENT_SHUTDOWN,
Subscriber.Support.COMMON_EVENT_BATTERY_CHANGED,
Subscriber.Support.COMMON_EVENT_BATTERY_LOW,
......@@ -116,9 +116,9 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
}
function findArray(str) {
var value = false;
var index1 = 0;
var length = array.length;
let value = false;
let index1 = 0;
let length = array.length;
for(; index1 < length; ++index1) {
if (array[index1] == str) {
value = true;
......@@ -135,7 +135,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
*/
it('ActsSubscriberTestUnorderSystem_0100', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorderSystem_0100 start==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: [
Subscriber.Support.COMMON_EVENT_SHUTDOWN,
Subscriber.Support.COMMON_EVENT_BATTERY_CHANGED,
......@@ -190,7 +190,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
],
};
var result = 0;
let result = 0;
function subscriberCallBack001(err, data) {
console.info("==========================>subscriberCallBack001 event = "+ data.event);
......@@ -226,7 +226,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
*/
it('ActsSubscriberTestUnorderSystem_0200', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorderSystem_0200 start==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: [
Subscriber.Support.COMMON_EVENT_WIFI_HOTSPOT_STATE,
Subscriber.Support.COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE,
......@@ -267,7 +267,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
],
};
var result = 0;
let result = 0;
function subscriberCallBack002(err, data) {
console.info("==========================>subscriberCallBack002 event = "+ data.event);
......@@ -304,7 +304,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
*/
it('ActsSubscriberTestUnorderSystem_0300', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorderSystem_0300 start==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: [
Subscriber.Support.COMMON_EVENT_WIFI_P2P_CONN_STATE,
Subscriber.Support.COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED,
......
......@@ -15,7 +15,7 @@
<div class="container">
<text class="title">
Hello,Earth! 1111
Hello, World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
......@@ -17,18 +17,18 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('ActsSubscriberTestUnorder', async function (done) {
console.info("===========ActsSubscriberTestUnorder start====================>");
var commonEventSubscriber001;
var commonEventSubscriber002;
var commonEventSubscriber003;
var commonEventSubscriber004;
var commonEventSubscriber0051;
var commonEventSubscriber0052;
var commonEventSubscriber006;
var commonEventSubscriber008;
var commonEventSubscriber0101;
var commonEventSubscriber0102;
var commonEventSubscriber011;
var commonEventSubscriber012;
let commonEventSubscriber001;
let commonEventSubscriber002;
let commonEventSubscriber003;
let commonEventSubscriber004;
let commonEventSubscriber0051;
let commonEventSubscriber0052;
let commonEventSubscriber006;
let commonEventSubscriber008;
let commonEventSubscriber0101;
let commonEventSubscriber0102;
let commonEventSubscriber011;
let commonEventSubscriber012;
function publishCallback(err) {
console.info("==========================>publishCallback");
......@@ -62,7 +62,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
done();
}
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_event0100"],
};
......@@ -100,7 +100,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
done();
}
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["@#¥#3243adsafdf_"],
};
......@@ -128,13 +128,13 @@ describe('ActsSubscriberTestUnorder', async function (done) {
*/
it('ActsSubscriberTestUnorder_0300', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorder_0300==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_event0300"],
publisherDeviceId: "PublishDeviceId0300",
priority: 10,
};
var commonEventPublishData = {
let commonEventPublishData = {
isOrdered: false,
bundleName: "PublishBundleName0300",
code: 55,
......@@ -179,11 +179,11 @@ describe('ActsSubscriberTestUnorder', async function (done) {
*/
it('ActsSubscriberTestUnorder_0400', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorder_0400==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_eventSticky0400"]
};
var commonEventPublishData = {
let commonEventPublishData = {
isOrdered: false,
isSticky: true,
}
......@@ -227,11 +227,11 @@ describe('ActsSubscriberTestUnorder', async function (done) {
*/
it('ActsSubscriberTestUnorder_0500', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorder_0500==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_event0500"]
};
var commonEventPublishData = {
let commonEventPublishData = {
isOrdered: false,
isSticky: false,
}
......@@ -280,12 +280,12 @@ describe('ActsSubscriberTestUnorder', async function (done) {
*/
it('ActsSubscriberTestUnorder_0600', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorder_0600==========================>");
var num = 0;
var commonEventSubscribeInfo = {
let num = 0;
let commonEventSubscribeInfo = {
events: ["publish_event0600"]
};
var commonEventPublishData = {
let commonEventPublishData = {
isOrdered: false,
isSticky: false,
}
......@@ -331,12 +331,12 @@ describe('ActsSubscriberTestUnorder', async function (done) {
*/
it('ActsSubscriberTestUnorder_0800', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorder_0800==========================>");
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_event0800"],
publisherPermission:"publish_event0800_publisherPermission"
};
var commonEventPublishData = {
let commonEventPublishData = {
subscriberPermissions:["publish_event0800_subscriberPermissions"],
isOrdered: false,
isSticky: false
......@@ -349,7 +349,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
}
function sleep(delay) {
var start = (new Date()).getTime();
let start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
}
done();
......@@ -391,19 +391,19 @@ describe('ActsSubscriberTestUnorder', async function (done) {
it('ActsSubscriberTestUnorder_1000', 0, async function (done) {
console.info("===============ActsSubscriberTestUnorder_1000==========================>");
var num = 0;
let num = 0;
var commonEventSubscribeInfo1 = {
let commonEventSubscribeInfo1 = {
events: ["publish_event1000_1"],
priority: 5
};
var commonEventSubscribeInfo2 = {
let commonEventSubscribeInfo2 = {
events: ["publish_event1000_2"],
priority: 10
};
var commonEventPublishData1 = {
let commonEventPublishData1 = {
bundleName: "publish_event1000_bundleName1",
code: 3,
data: "publish_event1000_data",
......@@ -411,7 +411,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
isSticky: false,
}
var commonEventPublishData2 = {
let commonEventPublishData2 = {
bundleName: "publish_event1000_bundleName2",
code: 5,
data: "publish_event1000_data",
......@@ -489,7 +489,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
done();
}
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_event1100"],
};
......@@ -533,11 +533,11 @@ describe('ActsSubscriberTestUnorder', async function (done) {
done();
}
var commonEventSubscribeInfo = {
let commonEventSubscribeInfo = {
events: ["publish_event1200"],
};
var commonEventPublishData = {
let commonEventPublishData = {
isOrdered: false,
isSticky: false,
parameters: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册