2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 static void startup(void);
21 static void cleanup(void);
23 void (*tet_startup)(void) = startup;
24 void (*tet_cleanup)(void) = cleanup;
26 static void utc_download_remove_http_header_field_negative1(void);
27 static void utc_download_remove_http_header_field_negative2(void);
28 static void utc_download_remove_http_header_field_negative3(void);
30 struct tet_testlist tet_testlist[] = {
31 {utc_download_remove_http_header_field_negative1, 1},
32 {utc_download_remove_http_header_field_negative2, 2},
33 {utc_download_remove_http_header_field_negative3, 3},
37 static void startup(void)
42 static void cleanup(void)
47 void utc_download_remove_http_header_field_negative1(void)
49 const char *TC_NAME = __FUNCTION__;
51 char *field = "negativefield1";
55 retcode = download_remove_http_header_field(id, field);
58 dts_message(TC_NAME, "retcode[%d]",retcode);
59 if (retcode != DOWNLOAD_ERROR_NONE)
60 dts_pass(TC_NAME, "retcode has error about no found field");
62 dts_fail(TC_NAME, "retcode does not have error about no found field");
65 void utc_download_remove_http_header_field_negative2(void)
67 const char *TC_NAME = __FUNCTION__;
69 char *field = "negativefield2";
73 retcode = download_remove_http_header_field(-1, field);
76 if (retcode == DOWNLOAD_ERROR_INVALID_PARAMETER)
77 dts_pass(TC_NAME, "retcode has invalid parameter");
79 dts_fail(TC_NAME, "retcode does not have invalid parameter");
82 void utc_download_remove_http_header_field_negative3(void)
84 const char *TC_NAME = __FUNCTION__;
89 retcode = download_remove_http_header_field(id, NULL);
92 if (retcode == DOWNLOAD_ERROR_INVALID_PARAMETER)
93 dts_pass(TC_NAME, "retcode has invalid parameter");
95 dts_fail(TC_NAME, "retcode does not have invalid parameter");