提交 0ca18485 编写于 作者: G gaoxi

case update

Signed-off-by: Ngaoxi <gaoxi785@huawei.com>
上级 ca9ea4e8
{
"BuildOptions":{},
"CommonInfo":{
"project.ide.version":"3.0.0.900"
}
}
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/telephonyjstest.iml" filepath="$PROJECT_DIR$/.idea/telephonyjstest.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="EMPTY_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
# This file is automatically generated by DevEco Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# For customization when using a Version Control System, please read the header note.
sdk.dir=C:/Users/LiHao/AppData/Local/OpenHarmony/Sdk
nodejs.dir=D:/DevEco Studio 3.0.0.900/tools/nodejs
npm.dir=D:/DevEco Studio 3.0.0.900/tools/nodejs
\ No newline at end of file
...@@ -43,8 +43,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -43,8 +43,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
http.request("https://httpbin.org/user-agent").then(function(data){ http.request("https://httpbin.org/user-agent").then(function(data){
expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue(); expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue();
console.info(JSON.stringify(data)); console.info(JSON.stringify(data));
expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0" expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue();
|| JSON.parse(data.result)["user-agent"].indexOf("Dalvik/2.1.0")).assertTrue();
done(); done();
}) })
}); });
......
...@@ -44,8 +44,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () { ...@@ -44,8 +44,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () {
http.request("https://httpbin.org/user-agent").then(function(data){ http.request("https://httpbin.org/user-agent").then(function(data){
console.info("NetStack "+ JSON.stringify(data)); console.info("NetStack "+ JSON.stringify(data));
expect(data.responseCode === NetHttp.ResponseCode.OK).assertTrue() expect(data.responseCode === NetHttp.ResponseCode.OK).assertTrue()
expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0" expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue();
|| JSON.parse(data.result)["user-agent"].indexOf("Dalvik/2.1.0")).assertTrue();
done(); done();
}) })
}); });
...@@ -175,8 +174,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () { ...@@ -175,8 +174,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () {
success : function(data){ success : function(data){
console.info("NetStack fetch success "+ JSON.stringify(data)) console.info("NetStack fetch success "+ JSON.stringify(data))
expect(data.code === 200).assertTrue() expect(data.code === 200).assertTrue()
expect(JSON.parse(data.data)["user-agent"] === "libcurl-agent/1.0" expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue();
|| JSON.parse(data.data)["user-agent"].indexOf("Dalvik/2.1.0")).assertTrue();
done(); done();
}, },
fail : function(){ fail : function(){
...@@ -202,7 +200,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () { ...@@ -202,7 +200,7 @@ describe("Telephony_NetStack_HttpFetchTest", function () {
success : function(data){ success : function(data){
console.info("NetStack fetch success "+ JSON.stringify(data)) console.info("NetStack fetch success "+ JSON.stringify(data))
expect(data.code === 200).assertTrue() expect(data.code === 200).assertTrue()
expect(data.data["user-agent"]).assertContain("libcurl-agent/1.0"||"Dalvik/2.1.0"); expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue();
done(); done();
}, },
fail : function(){ fail : function(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册