/test/xts/acts/sensors/sensor_standard/src/main/js/test/ |
D | SensorGeomagneticTest.test.js | 99 (error, data) => { 107 … console.info('SensorGeomagenticAlgorithmJSTest001 success x: ' + data.x + ',y: ' 108 + data.y + ',z: ' + data.z + ',geomagneticDip: ' + data.geomagneticDip 109 + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' 110 + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) 111 … expect(Math.abs(data.x - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][0]) < EPS).assertTrue() 112 … expect(Math.abs(data.y - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][1]) < EPS).assertTrue() 113 … expect(Math.abs(data.z - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][2]) < EPS).assertTrue() 114 …expect(Math.abs(data.deflectionAngle - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][3]) < EPS).assertTrue() 115 … expect(Math.abs(data.geomagneticDip - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][4]) < EPS).assertTrue() [all …]
|
D | SensorOnOffTest.test_newSensorGeomagnetic.test.js | 92 ….getGeomagneticInfo({'latitude':80, 'longitude':0, 'altitude':0}, timeMillis[j], (error, data) => { 100 …or_GetGeomagneticInfo_001 success x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneti… 101 …+ ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',tota… 102 … expect(Math.abs(data.x - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][0]) < EPS).assertTrue() 103 … expect(Math.abs(data.y - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][1]) < EPS).assertTrue() 104 … expect(Math.abs(data.z - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][2]) < EPS).assertTrue() 105 …expect(Math.abs(data.deflectionAngle - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][3]) < EPS).assertTrue() 106 … expect(Math.abs(data.geomagneticDip - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][4]) < EPS).assertTrue() 107 … expect(Math.abs(data.levelIntensity - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][5]) < EPS).assertTrue() 108 … expect(Math.abs(data.totalIntensity - GEOMAGNETIC_COMPONENT_YEAR_RESULT[j][6]) < EPS).assertTrue() [all …]
|
D | Subscribe_subscribeAccelerometer.test.js | 62 success: function (data) { argument 63 … console.info("subscribeAccelerometer_SensorJsTest001 success" + JSON.stringify(data)); 64 expect(typeof (data.x)).assertEqual("number"); 65 expect(typeof (data.y)).assertEqual("number"); 66 expect(typeof (data.z)).assertEqual("number"); 68 fail: function (data, code) { argument 69 …console.log("subscribeAccelerometer_SensorJsTest001 is failed, data: " + data + ", code: " + code); 88 success: function (data) { argument 89 … console.info("subscribeAccelerometer_SensorJsTest002 success" + JSON.stringify(data)); 90 expect(typeof (data.x)).assertEqual("number"); [all …]
|
D | Subscribe_subscribeGyroscope.test.js | 63 sensor.getSingleSensor(GyroscopeId ,(error, data) => { 71 success: function (data) { argument 72 console.info("subscribeGyroscope_SensorJsTest002 success" + JSON.stringify(data)); 73 expect(typeof (data.x)).assertEqual("number"); 74 expect(typeof (data.y)).assertEqual("number"); 75 expect(typeof (data.z)).assertEqual("number"); 77 fail: function (data, code) { argument 78 … console.log("subscribeGyroscope_SensorJsTest002 is failed, data: " + data + ", code: " + code); 101 sensor.getSingleSensor(GyroscopeId ,(error, data) => { 109 success: function (data) { argument [all …]
|
D | Subscribe_subscribeDeviceOrientation.test.js | 63 sensor.getSingleSensor(DeviceOrientationId ,(error, data) => { 71 success: function (data) { argument 72 console.info("subscribeDeviceOrientation_SensorJsTest001 success" + JSON.stringify(data)); 73 expect(typeof (data.alpha)).assertEqual("number"); 74 expect(typeof (data.beta)).assertEqual("number"); 75 expect(typeof (data.gamma)).assertEqual("number"); 77 fail: function (data, code) { argument 78 …console.log("subscribeDeviceOrientation_SensorJsTest001 is failed, data: " + data + ", code: " + c… 79 expect(data).assertEqual('subscribe fail'); 104 sensor.getSingleSensor(DeviceOrientationId ,(error, data) => { [all …]
|
D | SensorOnOffTest.test_newSensorGeomagneticOptions.test.js | 85 …gneticInfo({'latitude':80, 'longitude':0, 'altitude':0}, timeMillis[i], undefined).then((data) => { 86 …o('Sensor_GetGeomagneticField_058 x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneti… 87 …+ ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',tota… 88 … expect(Math.abs(data.x - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][0]) < EPS).assertTrue() 89 … expect(Math.abs(data.y - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][1]) < EPS).assertTrue() 90 … expect(Math.abs(data.z - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][2]) < EPS).assertTrue() 91 …expect(Math.abs(data.deflectionAngle - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][3]) < EPS).assertTrue() 92 … expect(Math.abs(data.geomagneticDip - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][4]) < EPS).assertTrue() 93 … expect(Math.abs(data.levelIntensity - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][5]) < EPS).assertTrue() 94 … expect(Math.abs(data.totalIntensity - GEOMAGNETIC_COMPONENT_YEAR_RESULT[i][6]) < EPS).assertTrue() [all …]
|
D | Subscribe_subscribeCompass.test.js | 62 success: function (data) { argument 63 console.info("subscribeCompass_SensorJsTest001 success" + JSON.stringify(data)); 64 expect(typeof (data.direction)).assertEqual("number"); 66 fail: function (data, code) { argument 67 … console.log("subscribeCompass_SensorJsTest001 is failed, data: " + data + ", code: " + code); 68 expect(data).assertEqual('subscribe fail'); 88 success: function (data) { argument 89 console.info("subscribeCompass_SensorJsTest002 success" + JSON.stringify(data)); 90 expect(typeof (data.direction)).assertEqual("number"); 92 fail: function (data, code) { argument [all …]
|
/test/xts/acts/account/appaccount/sceneProject/actsaccountsceneonoff/entry/src/main/js/default/pages/index/ |
D | index.js | 36 data: { 65 function changeOnExtra(data){ argument 66 console.info("====>receive change 0100 data:" + JSON.stringify(data)); 68 … if(data[0].owner == "com.example.actsaccounttest" && data[0].name == "changeonoff_extra"){ 70 data: "SUCCESS" property 75 data: "FAIL" property 82 data: "FAIL" property 88 function changeOnAssociateData(data){ argument 89 console.info("====>receive change 0200 data:" + JSON.stringify(data)); 91 … if(data[0].owner == "com.example.actsaccounttest" && data[0].name == "onoff_associatedata"){ [all …]
|
/test/xts/acts/useriam/face_auth/js_api_test/function_test/userauth/src/main/js/test/ |
D | execute.js | 48 auth.execute("ALL", "S2", function(data) { argument 49 console.log("Security_IAM_Face_JSAPI_Function_Execute_1700 auth.execute:" + data); 51 expect(data).assertEqual(-1); 70 auth.execute("ALL", "S2").catch(function(data) { argument 71 console.log("Security_IAM_Face_JSAPI_Function_Execute_2000 auth.execute:" + data); 73 expect(data).assertEqual(-1); 91 auth.execute("", "S2", function(data) { argument 92 console.log("Security_IAM_Face_JSAPI_Function_Execute_1800 auth.execute:" + data); 94 expect(data).assertEqual(6); 113 auth.execute("", "S2").catch(function(data) { argument [all …]
|
/test/xts/acts/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ |
D | ActsSubscriber_test_ordered.js | 64 data: 'publish_event1001_init', property 68 async function subscriberCallBack0100(err, data) { argument 69 console.info('===============>subscriberCallBack0100========event: ' + data.event); 70 console.info('===============>subscriberCallBack0100=========code: ' + data.code); 71 console.info('===============>subscriberCallBack0100=========data: ' + data.data); 72 expect(data.event).assertEqual('publish_event0100'); 73 expect(data.code).assertEqual(1); 74 expect(data.data).assertEqual('publish_event1001_init'); 88 commonEventSubscriber0100.getAbortCommonEvent().then((data)=>{ 90 … '===============>subscriberCallBack0100 getAbortCommonEvent promise abort: ' + data); [all …]
|
/test/xts/acts/telephony/telephonyjstest/netmanager_base/system_fetch/src/main/js/test/ |
D | Http.fetch.test.js | 34 }, (err, data) => { 38 success: function (data) { argument 39 console.info("NetStack fetch success " + JSON.stringify(data)); 40 expect(data.code === 200 || data.code > 500).assertTrue(); 70 }, (err, data) => { 74 success: function (data) { argument 75 console.info("NetStack fetch success " + JSON.stringify(data)); 76 expect(data.code === 200 || data.code > 500).assertTrue(); 77 if (data.code === 200) { 78 … expect(JSON.parse(data.data.toString())["user-agent"] == "libcurl-agent/1.0").assertTrue(); [all …]
|
/test/xts/acts/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ |
D | ActsGetWantAllTest.js | 52 }).then((data) => { 54 …sole.info('====> ACTS_RemoteObject_0100 start startAbilityForResult=====>' + JSON.stringify(data)); 55 expect(data.want.parameters.hasOwnProperty("wantRemoteOjbect")).assertEqual(false); 87 }).then((data) => { 89 console.info('====> ACTS_GetWant_0100 start ability=====>' + JSON.stringify(data)) 90 expect(data.want.deviceId).assertEqual(""); 91 expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap"); 92 … expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); 93 expect(data.want.action).assertEqual("action1"); 94 expect(data.want.parameters.mykey0).assertEqual(1); [all …]
|
/test/xts/acts/ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/ets/test/ |
D | Ability.test.ets | 76 function SubscribeCallBack(err, data) { 77 …console.debug("ACTS_getAbilityInfo_0200====>Subscribe CallBack data:====>" + JSON.stringify(data)); 78 if (data.event == 'MainAbility_Start_CommonEvent_ability') { 81 let abilityInfo = JSON.parse(data.parameters['abilityInfo']) 82 let hapModuleInfo = JSON.parse(data.parameters['hapModuleInfo']) 83 let applicationInfo =JSON.parse(data.parameters['applicationInfo']) 87 } else if (data.event == 'SecondAbility_Start_CommonEvent_ability'){ 90 let abilityInfo1 = JSON.parse(data.parameters['abilityInfo']) 91 let hapModuleInfo1 = JSON.parse(data.parameters['hapModuleInfo']) 92 let applicationInfo1 =JSON.parse(data.parameters['applicationInfo']) [all …]
|
/test/xts/acts/ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/test/ |
D | Ability.test.ets | 44 function checkApplicationInfo(data) { 45 console.log("checkApplicationInfo start " + JSON.stringify(data)); 46 console.log("checkApplicationInfo name : " + data.name); 47 console.log("checkApplicationInfo description : " + data.description); 48 console.log("checkApplicationInfo descriptionId : " + data.descriptionId); 49 console.log("checkApplicationInfo enabled : " + data.enabled); 50 console.log("checkApplicationInfo label : " + data.label) 51 console.log("checkApplicationInfo labelId : " + data.labelId); 52 console.log("checkApplicationInfo icon : " + data.icon); 53 console.log("checkApplicationInfo iconId : " + data.iconId); [all …]
|
/test/xts/acts/security/certificate_framework/js_api_test_one/src/main/js/test/ |
D | Certificate.test.js | 34 .then((data) => { 35 expect(data != null).assertTrue(); 43 .then((data) => { 44 expect(data != null).assertTrue(); 60 .then((data) => { 61 expect(data != null).assertTrue(); 69 .then((data) => { 70 expect(data != null).assertTrue(); 86 .then((data) => { 87 expect(data == null).assertTrue(); [all …]
|
/test/xts/acts/account/appaccount/getallaccounts/actsgetmultipleaccounts/src/main/js/test/ |
D | Getmultipleaccounts.test.js | 68 var data = await appAccountManager.getAllAccounts(); 75 console.info("====>getAllAccounts 0100 data:" + JSON.stringify(data)); 76 console.info("====>data.length:" + data.length); 77 for (let i = 0, len = data.length; i < len; i++) { 78 dataMap.set(data[i].name, data[i].owner) 82 let data = dataMap.get("account_name_scene_first_first"); 83 console.info("====>first account owner is: " + data); 84 expect(data).assertEqual("com.example.actsaccountaccessiblefirst"); 88 let data = dataMap.get("account_name_scene_first_second"); 89 console.info("====>second account owner is: " + data); [all …]
|
/test/xts/acts/telephony/telephonyjstest/telephony_base/call_manager/src/main/js/test/ |
D | CallManagerTest.test.js | 47 call.getCallState((err, data) => { 54 expect(data === call.CALL_STATE_IDLE).assertTrue(); 55 console.log(`Telephony_CallManager_getCallState_Async_0100 finish data = ${data}`); 68 var data = await call.getCallState(); 69 expect(data === call.CALL_STATE_IDLE).assertTrue(); 70 … console.log(`Telephony_CallManager_getCallState_Promise_0100 finish data = ${data}`); 87 call.hasCall((err, data) => { 94 expect(data === false).assertTrue(); 95 console.log(`Telephony_CallManager_hasCall_Async_0400 finish data = ${data}`); 108 var data = await call.hasCall(); [all …]
|
/test/xts/acts/security/cipher/datacipher/cipher/src/main/js/test/Agree/ |
D | cipher2.test.js | 69 success: data => { argument 70 console.log(`cipher.rsa encrypt success: ${data.text}`); 73 fail: (data,code) => { argument 74 this.err = `${code}: ${data}`; 75 console.log(`cipher.rsa encrypt fail: ${code}: ${data}`); 95 success: data => { argument 96 console.log(`cipher.aes encrypt success: ${data.text}`); 99 fail: (data,code) => { argument 100 this.err = `${code}: ${data}`; 101 console.log(`action is invalid, cipher.aes encrypt fail: ${code}: ${data}`); [all …]
|
D | cipher1.test.js | 72 success: data => { argument 73 console.log(`cipher.aes encrypt success: ${data.text}`); 76 fail: (data, code) => { argument 77 this.err = `${code}: ${data}`; 78 console.log(`action is invalid, cipher.aes encrypt fail: ${code}: ${data}`); 101 success: data => { argument 102 console.log(`cipher.aes encrypt success: ${data.text}`); 105 fail: (data,code) => { argument 106 this.err = `${code}: ${data}`; 107 console.log(`action is invalid, cipher.aes encrypt fail: ${code}: ${data}`); [all …]
|
/test/xts/acts/ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/ |
D | getHapModuleInfoJsunit.test.ets | 61 .then((data) => { 64 console.info('[context_getHapModuleInfo_test_0100] data is:' + JSON.stringify(data)); 65 expect(typeof (data)).assertEqual("object"); 89 context.getHapModuleInfo((error, data) => { 92 console.info('[context_getHapModuleInfo_test_0200] data is:' + JSON.stringify(data)); 93 callback = data; 94 expect(typeof (data)).assertEqual("object"); 106 function checkHapModuleInfo(msg, data) { 107 console.log(msg + "checkHapModuleInfo start " + JSON.stringify(data)); 108 console.log(msg + "checkHapModuleInfo name : " + data.name); [all …]
|
/test/xts/acts/telephony/telephonyjstest/netmanager_base/jshttp/src/main/js/test/ |
D | NetworkManagerHttp.test.js | 31 http.request("https://httpbin.org/anything").then(function (data) { argument 33 … expect(data.responseCode === netHttp.ResponseCode.OK || data.responseCode > 500).assertTrue(); 46 http.request("https://httpbin.org/user-agent").then(function (data) { argument 48 … expect(data.responseCode === netHttp.ResponseCode.OK || data.responseCode > 500).assertTrue(); 49 if (data.responseCode === netHttp.ResponseCode.OK) { 50 console.info(JSON.stringify(data)); 51 expect(data.result.toString().search("user-agent") != -1).assertTrue(); 52 expect(data.result.toString().search("libcurl-agent/1.0") != -1).assertTrue(); 70 }).then(function (data) { argument 72 expect(data.responseCode === netHttp.ResponseCode.OK || data.responseCode > 500).assertTrue(); [all …]
|
/test/xts/acts/commonlibrary/ets_utils/threadWorker_lib_standard/entry/src/main/ets/workers/ |
D | newworker.js | 22 let data = e.data; 23 console.info("worker:: worker thread worker data is " + data.data); 24 switch(data.type) { 26 console.info("worker:: worker thread receive data " + data.data); 27 parentPort.postMessage(data); 33 console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); 34 parentPort.postMessage(data, [data.data]); 35 console.info("worker:: worker.js post buffer length is " + data.data.byteLength); 49 parentPort.onerror = function(data) { argument 50 …rker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.file…
|
/test/xts/acts/commonlibrary/ets_utils/worker_lib_standard/entry/src/main/ets/workers/ |
D | worker.js | 26 let data = e.data; 27 console.info("worker:: worker thread worker data is " + data.data); 28 switch(data.type) { 30 console.info("worker:: worker thread receive data " + data.data); 31 parentPort.postMessage(data); 37 console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); 38 parentPort.postMessage(data, [data.data]); 39 console.info("worker:: worker.js post buffer length is " + data.data.byteLength); 53 parentPort.onerror = function(data) { argument 54 …rker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.file…
|
/test/xts/acts/bundlemanager/bundle_standard/bundlemanager/actsbmsatomicserviceetstest/bmsatomicserviceone/entry/src/main/ets/test/ |
D | GetBundleInfoForSelf.test.ets | 23 const SOURCE_DIR = "/data/app/el1/bundle/public/ohos.acts.bundle.stage.test/testModule"; 39 await bundle.getBundleInfoForSelf(bundle.BundleFlag.GET_BUNDLE_INFO_DEFAULT).then(data => { 40 console.info("getBundleInfoForSelfPro" + JSON.stringify(data)); 41 expect(data.name).assertEqual(BUNDLE_NAME); 42 expect(data.vendor).assertEqual(VENDOR); 43 expect(data.versionCode).assertEqual(1000000); 44 expect(data.versionName).assertEqual("1.0.0"); 45 expect(data.minCompatibleVersionCode).assertEqual(1000000); 46 expect(data.targetVersion).assertEqual(8); 47 expect(data.installTime).assertLarger(0); [all …]
|
/test/xts/acts/bundlemanager/bundle_standard/bundlemanager/actsbmsatomicserviceetstest/bmsatomicserviceshared/entry/src/main/ets/test/ |
D | GetBundleInfoForSelf.test.ets | 23 const SOURCE_DIR = "/data/app/el1/bundle/public/ohos.acts.bundle.stage.test/testModule"; 39 await bundle.getBundleInfoForSelf(bundle.BundleFlag.GET_BUNDLE_INFO_DEFAULT).then(data => { 40 console.info("getBundleInfoForSelfPro" + JSON.stringify(data)); 41 expect(data.name).assertEqual(BUNDLE_NAME); 42 expect(data.vendor).assertEqual(VENDOR); 43 expect(data.versionCode).assertEqual(1000000); 44 expect(data.versionName).assertEqual("1.0.0"); 45 expect(data.minCompatibleVersionCode).assertEqual(1000000); 46 expect(data.targetVersion).assertEqual(8); 47 expect(data.installTime).assertLarger(0); [all …]
|