Set http response body in binary format. 38/269638/2
authorhuayong.xu <huayong.xu@samsung.com>
Wed, 19 Jan 2022 10:28:16 +0000 (18:28 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Mon, 24 Jan 2022 08:14:08 +0000 (16:14 +0800)
Change-Id: Idedacaae4d62f96c098d6a1684a7c2ebdac5f598

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp
automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp

index b291020..ab2548a 100755 (executable)
@@ -654,17 +654,17 @@ public:
     return true;
   }
 
-  bool AddResponseBody(const std::string& body, uint32_t length) override
+  bool AddResponseBody(const int8_t* body, uint32_t length) override
   {
     return true;
   }
 
-  bool AddResponse(const std::string& headers, const std::string& body, uint32_t length) override
+  bool AddResponse(const std::string& headers, const int8_t* body, uint32_t length) override
   {
     return true;
   }
 
-  bool WriteResponseChunk(const std::string& chunk, uint32_t length) override
+  bool WriteResponseChunk(const int8_t* chunk, uint32_t length) override
   {
     return true;
   }
index 6da9ee0..f08d0e8 100755 (executable)
@@ -1689,9 +1689,9 @@ int UtcDaliWebContextHttpRequestInterceptor(void)
   Dali::Property::Map testHeaders;
   testHeaders.Insert("key2", "value2");
   DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseHeaders(testHeaders));
-  DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseBody("test", 4));
-  DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponse("key:value", "test", 4));
-  DALI_TEST_CHECK(gRequestInterceptorInstance->WriteResponseChunk("test", 4));
+  DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseBody((const int8_t*)"test", 4));
+  DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponse("key:value", (const int8_t*)"test", 4));
+  DALI_TEST_CHECK(gRequestInterceptorInstance->WriteResponseChunk((const int8_t*)"test", 4));
   std::string testUrl("http://test.html");
   DALI_TEST_EQUALS(gRequestInterceptorInstance->GetUrl(), testUrl, TEST_LOCATION);
   std::string testMethod("GET");