Lines Matching refs:testEnv
254 TestNApiEnv* testEnv = reinterpret_cast<TestNApiEnv*>(env); in napi_get_named_property() local
256 if (testEnv == nullptr || testValue == nullptr) { in napi_get_named_property()
264 *result = CreateNapiValue(napi_string, testEnv->clientContext.upgradeDevId.c_str()); in napi_get_named_property()
266 *result = CreateNapiValue(napi_string, testEnv->clientContext.controlDevId.c_str()); in napi_get_named_property()
268 *result = CreateNapiValue(napi_string, testEnv->clientContext.upgradeApp.c_str()); in napi_get_named_property()
270 *result = CreateNapiValue(napi_number, &testEnv->clientContext.type); in napi_get_named_property()
274 … *result = CreateNapiValue(napi_string, testEnv->pakcageInfo.result[0].versionName.c_str()); in napi_get_named_property()
276 … *result = CreateNapiValue(napi_string, testEnv->pakcageInfo.result[0].versionCode.c_str()); in napi_get_named_property()
278 … *result = CreateNapiValue(napi_string, testEnv->pakcageInfo.result[0].verifyInfo.c_str()); in napi_get_named_property()
280 … *result = CreateNapiValue(napi_string, testEnv->pakcageInfo.result[0].descriptPackageId.c_str()); in napi_get_named_property()
282 *result = CreateNapiValue(napi_number, &testEnv->pakcageInfo.result[0].packageType); in napi_get_named_property()
284 *result = CreateNapiValue(napi_bigint, &testEnv->pakcageInfo.result[0].size); in napi_get_named_property()
349 TestNApiEnv* testEnv = reinterpret_cast<TestNApiEnv*>(env); in napi_set_named_property() local
359 testEnv->pakcageInfo.result[0].versionName = testValue->strValue; in napi_set_named_property()
361 testEnv->pakcageInfo.result[0].versionCode = testValue->strValue; in napi_set_named_property()
363 testEnv->pakcageInfo.result[0].verifyInfo = testValue->strValue; in napi_set_named_property()
366 testEnv->pakcageInfo.result[0].descriptPackageId = testValue->strValue; in napi_set_named_property()
369 testEnv->errorMsg = testValue->strValue; in napi_set_named_property()
373 testEnv->pakcageInfo.result[0].packageType = (PackageType)testValue->intValue; in napi_set_named_property()
375 testEnv->progress.status = (UpgradeStatus)testValue->intValue; in napi_set_named_property()
377 testEnv->progress.percent = testValue->intValue; in napi_set_named_property()
381 testEnv->pakcageInfo.result[0].size = (size_t)testValue->int64Value; in napi_set_named_property()
408 TestNApiEnv* testEnv = reinterpret_cast<TestNApiEnv*>(env); in napi_get_cb_info() local
409 if (testEnv == nullptr) { in napi_get_cb_info()
412 printf("++++++++++++++ napi_get_cb_info argc %zu testStage %d \n", *argc, testEnv->testStage); in napi_get_cb_info()
413 switch (testEnv->testStage) { in napi_get_cb_info()
416 *argc = (testEnv->engineType != 0) ? NUMBER_2 : 1; in napi_get_cb_info()
417 argv[0] = CreateNapiValue(napi_string, testEnv->eventType.c_str()); in napi_get_cb_info()
438 *argc = testEnv->testAsyncorPermose ? 1 : NUMBER_2; in napi_get_cb_info()
443 argv[0] = CreateNapiValue(napi_string, testEnv->eventType.c_str()); in napi_get_cb_info()
447 *argc = testEnv->testAsyncorPermose ? 1 : NUMBER_2; in napi_get_cb_info()
451 *argc = testEnv->testAsyncorPermose ? 0 : 1; in napi_get_cb_info()
531 TestNApiEnv* testEnv = reinterpret_cast<TestNApiEnv*>(env); in napi_unwrap() local
532 if (testEnv == nullptr) { in napi_unwrap()
535 if (testEnv->testStage && testEnv->noneClient) { in napi_unwrap()
537 testEnv->noneClient = false; in napi_unwrap()