diff --git a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestJsunit.test.ets b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestJsunit.test.ets index 73302d70e45522eef2417a7efad1cfaced2c7ecc..16ab0d724aaf8e3fdde02889f21c0974368f819a 100644 --- a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestJsunit.test.ets +++ b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestJsunit.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets index d71612ac9b77f567feb585663438182b2674bc28..5b55188aa0e2df8198215e5d38054ea5672af5f7 100644 --- a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets +++ b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpRequestOptionsJsunit.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -622,6 +622,48 @@ export default function HttpRequestOptionsJsunit() { } }); + /** + * @tc.number TEST_TELEPHONYHTTPREQUESTOPTIONSPRIORITY_002 + * @tc.name testTelephonyHttpRequestOptionsPriority002 + * @tc.desc Test Test HttpRequestOptions property. + * @tc.size: MediumTest + * @tc.type: Method + * @tc.level: level 2 + */ + it("testTelephonyHttpRequestOptionsPriority002", 0, async function (done) { + var casename = 'Telephony_Http_HttpRequestOptions_priority_0100'; + console.log("-----------------------HttpRequestOptions_priority Test is starting-----------------------"); + try { + let httpRequestOptions = { + method: http.RequestMethod.GET, + extraData: { + //tn=albumsdetail&word=渐变风格插画&fr=albumslist&album_tab=设计素材&album_id=409&rn=30 + tn: "albumsdetail", + work: "渐变风格插画", + fr: "albumslist", + album_tab: "设计素材", + album_id: "409", + rn: "30" + }, + header: "content-type': 'application/json", + readTimeout: 60000, + connectTimeout: 60000, + priority: 1000 + } + var httpRequest = http.createHttp(); + httpRequest.request("https://image.baidu.com/search/albumsdetail/", httpRequestOptions, (err, data) => { + console.log(casename + JSON.stringify(err) + " data: " + JSON.stringify(data)); + expect(data.responseCode == 200).assertTrue(); + console.log("-----------------------HttpRequestOptions_extraData Test end-----------------------"); + done(); + }); + } catch (error) { + console.log("testTelephonyHttpRequestOptionsPriority001 : error = " + error); + expect(false).assertTrue(); + done(); + } + }); + /** * @tc.number TEST_TELEPHONY_HTTPREQUESTOPTIONS_USINGPROTOCOL_001 * @tc.name testTelephonyHttpRequestOptionsUsingProtocol001 diff --git a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets index 16f31dd0e513b10450f0c3a8783267bd69c83e67..7eb13c7d173e13d6836553173dd8b71bfcc310b2 100644 --- a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets +++ b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseCacheJsunit.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseJsunit.test.ets b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseJsunit.test.ets index db03a30c3c9462b39a76563317db091028154300..65a94de4b5763156c25a3465be8d86b9f193bc0e 100644 --- a/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseJsunit.test.ets +++ b/telephony/crossplatform/telephony_http_test/src/main/ets/test/HttpResponseJsunit.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/telephony/crossplatform/telephony_http_test/src/main/ets/test/RequestMethodJsunit.test.ets b/telephony/crossplatform/telephony_http_test/src/main/ets/test/RequestMethodJsunit.test.ets index 9688cf509089570df83580ded731489eb1ed2573..c4f63a4044208a6a87aa89768e86e508489b25da 100644 --- a/telephony/crossplatform/telephony_http_test/src/main/ets/test/RequestMethodJsunit.test.ets +++ b/telephony/crossplatform/telephony_http_test/src/main/ets/test/RequestMethodJsunit.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/telephony/crossplatform/telephony_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets b/telephony/crossplatform/telephony_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets index 2bfd371f2b3f89528ab206dea828a2d390c0a238..97f1673568773a9f9bdc7e1bc59f1f84daf115db 100644 --- a/telephony/crossplatform/telephony_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets +++ b/telephony/crossplatform/telephony_http_test/src/main/ets/test/ResponseCodeJsunit.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the 'License') * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -772,7 +772,6 @@ export default function responseCodeJsunit() { * @tc.type: Enum * @tc.level: level 0 */ - it("testTelephonyHttpResponseCodeUnavailable001", 0, async function (done) { console.log("-----------------------ResponseCode UNAVAILABLE Test is starting-----------------------"); try {