[TCT][Common][synced tizen (4.0) branch with tizen_3.0 branch]
authorJihun Park <jihun87.park@samsung.com>
Tue, 21 Mar 2017 08:04:12 +0000 (01:04 -0700)
committerJihun Park <jihun87.park@samsung.com>
Wed, 22 Mar 2017 04:57:38 +0000 (21:57 -0700)
This reverts commit 93d7806d9ed8b0cc78d2b03592192d45512feba9.

Change-Id: I7be8be6e0ed570101b5d74257b7c696d54ec6a04

19 files changed:
src/ctc/platform-permission/CTs-platform-permission-location-manager.c
src/ctc/platform-permission/CTs-platform-permission-media-content.c
src/itc/capi-maps-service/ITs-capi-maps-place-mapzen.c
src/itc/capi-maps-service/ITs-capi-maps-service-mapzen.c
src/itc/capi-media-streamer/ITs-capi-media-streamer.c
src/itc/context/ITs-context-trigger.c
src/utc/cbhm/utc-cbhm.c
src/utc/context/utc-context-trigger.c
src/utc/webkit2/utc_webkit2_ewk_manifest_icons_count_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_icons_height_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_icons_sizes_count_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_icons_src_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_icons_type_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_icons_width_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_name_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_orientation_type_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_start_url_get_func.c
src/utc/webkit2/utc_webkit2_ewk_manifest_web_display_mode_get_func.c
src/utc/webkit2/utc_webkit2_ewk_view_request_manifest.c

index 62cac54c7a1e1bd6e6ca6492cc7ec683af8f38c3..f22c376e5be4c7d87e2981d4b9e13569b4b86ff5 100755 (executable)
@@ -3,7 +3,7 @@
 #define FEATURE_LOCATION                               "http://tizen.org/feature/location"
 #define FEATURE_LOCATION_GPS                   "http://tizen.org/feature/location.gps"
 #define FEATURE_LOCATION_WPS                   "http://tizen.org/feature/location.wps"
-#define FEATURE_LOCATION_GPS_SATELITE                  "http://tizen.org/feature/location.gps.satellite"
+#define FEATURE_LOCATION_GPS_SATELITE  "http://tizen.org/feature/location.gps.satellite"
 /**
 * @function            LocationManagerGetError
 * @description         Maps error enumerators to string values
@@ -29,7 +29,7 @@ char* LocationManagerGetError(location_error_e nRet)
        }
 
        return szErrorVal;
-       
+
 }
 
 /**
@@ -40,7 +40,7 @@ char* LocationManagerGetError(location_error_e nRet)
 */
 void LocationGpsStatusSatelliteUpdatedCB(int num_of_active, int num_of_inview,  time_t timestamp, void *user_data)
 {
-       
+
        FPRINTF("[Line : %d][%s]Invoked LocationGpsStatusSatelliteUpdatedCB\\n", __LINE__, API_NAMESPACE);
        return;
 }
@@ -48,7 +48,7 @@ void LocationGpsStatusSatelliteUpdatedCB(int num_of_active, int num_of_inview,
 #ifdef WEARABLE        //Starts WEARABLE
 /**
  * @function           LocationUpdatedCB
- * @description                Called at defined interval with updated location information 
+ * @description                Called at defined interval with updated location information
  * @parameter          location_error_e error, double latitude, double longitude, double altitude, time_t timestamp, double speed, double direction, double climb, void *user_data
  * @return                     NA
  */
@@ -123,11 +123,11 @@ int CTc_Location_PrivilegeLocation_start(void)
                        FPRINTF("[Line : %d][%s] Feature is not supported\\n", __LINE__, API_NAMESPACE);
                        return 0;
                }
-       
-       location_method_e eLocationMethod = LOCATIONS_METHOD_GPS;
+
+       location_method_e eLocationMethod = LOCATIONS_METHOD_HYBRID;
        location_manager_h hLocationManager = NULL;
-       
-       
+
+
        int nRet = location_manager_create(eLocationMethod, &hLocationManager);
        PRINT_RESULT(LOCATIONS_ERROR_NONE, nRet, "location_manager_create", LocationManagerGetError(nRet));
 
@@ -163,22 +163,24 @@ int CTc_Location_PrivilegeLocation_set_satelite_updated_cb(void)
 {
        START_TEST;
        int nInterval = 1;
-   bool bIsLocationFeatureSupported = false;
+       bool bIsLocationFeatureSupported = false;
        bool bIsLocationGpsFeatureSupported = false;
+
        IS_FEATURE_SUPPORTED(FEATURE_LOCATION, bIsLocationFeatureSupported, API_NAMESPACE);
        IS_FEATURE_SUPPORTED(FEATURE_LOCATION_GPS_SATELITE, bIsLocationGpsFeatureSupported, API_NAMESPACE);
-       if ( ( false == bIsLocationFeatureSupported ) || ( bIsLocationGpsFeatureSupported == false) )
-               {
-                       FPRINTF("[Line : %d][%s] Feature is not supported\\n", __LINE__, API_NAMESPACE);
-                       return 0;
-               }
-       location_method_e eLocationMethod = LOCATIONS_METHOD_GPS;
+
+       if (( false == bIsLocationFeatureSupported ) || ( bIsLocationGpsFeatureSupported == false))
+       {
+               FPRINTF("[Line : %d][%s] Feature is not supported\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       location_method_e eLocationMethod = LOCATIONS_METHOD_HYBRID;
        location_manager_h hLocationManager = NULL;
 
        int nRet = location_manager_create(eLocationMethod, &hLocationManager);
        PRINT_RESULT(LOCATIONS_ERROR_NONE, nRet, "location_manager_create", LocationManagerGetError(nRet));
 
-       
+
        nRet = gps_status_set_satellite_updated_cb(hLocationManager, LocationGpsStatusSatelliteUpdatedCB, nInterval,  NULL);// Target API
        if(nRet ==LOCATIONS_ERROR_NONE)
        {
@@ -197,10 +199,10 @@ int CTc_Location_PrivilegeLocation_set_satelite_updated_cb(void)
  * @since_tizen                        3.0
  * @author                     SRID(arvin.mittal)
  * @reviewer           SRID(shobhit.v)
- * @type                               auto 
+ * @type                               auto
  * @description                        enable the mock location when developer mode is enable
  * @scenario                   enable the mock location when developer mode is enable
- * @apicovered                 location_manager_enable_mock_location                           
+ * @apicovered                 location_manager_enable_mock_location
  * @passcase                   When location_manager_enable_mock_location is successful.
  * @failcase                   If target api fails or any precondition api fails.
  * @precondition               NA
@@ -209,7 +211,7 @@ int CTc_Location_PrivilegeLocation_set_satelite_updated_cb(void)
 int CTc_Location_PrivilegeLocation_enable_mock_location(void)
 {
        START_TEST;
-       
+
        bool bIsLocationFeatureSupported = false;
        bool bIsLocationGpsFeatureSupported = false;
        bool bIsLocationWpsFeatureSupported = false;
@@ -222,9 +224,9 @@ int CTc_Location_PrivilegeLocation_enable_mock_location(void)
                FPRINTF("[Line : %d][%s] Feature is not supported\\n", __LINE__, API_NAMESPACE);
                return 0;
        }
-       
+
        bool bIsEnable = false;
-       
+
        int nRet = location_manager_enable_mock_location(bIsEnable);
        PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, nRet, "location_manager_enable_mock_location", LocationManagerGetError(nRet));
 
@@ -338,7 +340,7 @@ int CTc_Location_PrivilegeLocation_clear_mock_location(void)
 * @author                      SRID(gaurav.m2)
 * @reviewer                    SRID(shobhit.v)
 * @type                        auto
-* @scenario                    Request to update current location once. 
+* @scenario                    Request to update current location once.
 * @apicovered          location_manager_create, location_manager_start, location_manager_stop, location_manager_get_location and location_manager_destroy
 * @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
 * @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
@@ -349,41 +351,41 @@ int CTc_Location_PrivilegeLocation_clear_mock_location(void)
 int CTc_Location_PrivilegeLocation_location_manager_request_single_location(void)
 {
        START_TEST;
-       
+
        bool g_bIsSupported =false;
        int nTimeout = 1;
-       //g_bIsSupported = (Location_Manager_Check_System_Info_Feature_Supported(FEATURE_LOCATION));
+
        IS_FEATURE_SUPPORTED(FEATURE_LOCATION, g_bIsSupported, API_NAMESPACE);
        if ( !g_bIsSupported )
        {
                FPRINTF("[Line : %d][%s] [%s] is not supported\\n", __LINE__, API_NAMESPACE, FEATURE_LOCATION);
                return 0;
        }
-       
+
        bool g_bIsgpsSupported =false;
-       //g_bIsgpsSupported = (Location_Manager_Check_System_Info_Feature_Supported(FEATURE_LOCATION_GPS));
+
        IS_FEATURE_SUPPORTED(FEATURE_LOCATION_GPS, g_bIsgpsSupported, API_NAMESPACE);
        if ( !g_bIsgpsSupported )
        {
                FPRINTF("[Line : %d][%s] [%s] is not supported\\n", __LINE__, API_NAMESPACE, FEATURE_LOCATION_GPS);
                return 0;
        }
-       
-       location_method_e eLocationMethod = LOCATIONS_METHOD_GPS;
+
+       location_method_e eLocationMethod = LOCATIONS_METHOD_HYBRID;
        location_manager_h hLocationManager = NULL;
 
        int nRet = location_manager_create(eLocationMethod, &hLocationManager);
        PRINT_RESULT(LOCATIONS_ERROR_NONE, nRet, "location_manager_create", LocationManagerGetError(nRet));
 
-       nRet = location_manager_request_single_location ( hLocationManager, nTimeout, LocationUpdatedCB, NULL); 
+       nRet = location_manager_request_single_location ( hLocationManager, nTimeout, LocationUpdatedCB, NULL);
        if(nRet == LOCATIONS_ERROR_NONE)
        {
-               location_manager_destroy(hLocationManager);     
+               location_manager_destroy(hLocationManager);
        }
        PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "location_manager_request_single_location", LocationManagerGetError(nRet), location_manager_destroy(hLocationManager));
 
-       location_manager_destroy(hLocationManager);     
-       
+       location_manager_destroy(hLocationManager);
+
        return 0;
 }
 #endif  //End WEARABLE
\ No newline at end of file
index 42ebc2e2a5e77f833c1d5345781374360e2145b3..921d1737246fd2a33ad8ebea7a705977621bde1a 100755 (executable)
@@ -183,6 +183,10 @@ char* MediaGetError(int nRet)
                case MEDIA_CONTENT_ERROR_INVALID_OPERATION :    szErrorVal = "MEDIA_CONTENT_ERROR_INVALID_OPERATION" ; break;
                case MEDIA_CONTENT_ERROR_DB_BUSY :                              szErrorVal = "MEDIA_CONTENT_ERROR_DB_BUSY" ; break;
                case MEDIA_CONTENT_ERROR_NETWORK :                              szErrorVal = "MEDIA_CONTENT_ERROR_NETWORK" ; break;
+               case MEDIA_CONTENT_FILE_NO_SPACE_ON_DEVICE:             szErrorVal = "MEDIA_CONTENT_FILE_NO_SPACE_ON_DEVICE" ; break;
+               case MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT:   szErrorVal = "MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT" ; break;
+               case MEDIA_CONTENT_ERROR_NOT_SUPPORTED:                 szErrorVal = "MEDIA_CONTENT_ERROR_NOT_SUPPORTED" ; break;
+               case MEDIA_CONTENT_ERROR_PERMISSION_DENIED:             szErrorVal = "MEDIA_CONTENT_ERROR_PERMISSION_DENIED" ; break;
                default :                                                                               szErrorVal = "MEDIA_CONTENT_ERROR_UNKNOWN" ; break;
        }
        return szErrorVal;
index 800ec7b02a8ef4a4e30cd5ea6f81c51011ca2860..d7e2db637ad7384ea46a2713b2e3932feb96905d 100755 (executable)
@@ -31,6 +31,21 @@ static bool MapsPlaceCategoriesCb(int index, int total, maps_place_category_h ca
        
        return true;
 }
+// Callback Function to get list of service providers
+bool MapsServiceProviderForeachCb(char* maps_provider, void* user_data)
+{
+       memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
+       if(maps_provider != NULL)
+       {
+               strcpy(g_szMapsProvider, "MAPZEN");
+               FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);      
+       }
+       else
+               return false;
+       
+       g_nCheckCb = true;
+       return true;
+}
 
 /**
  * @function           ITs_maps_place_startup2
index db2ffcaa41aa00da507bd24182294e80f9c4320b..efd5653c30231c656736d25fc2c938428256940a 100755 (executable)
@@ -43,7 +43,7 @@ static bool MapServiceMultiRevGeocodeCb(maps_error_e result, int request_id, int
 }
 
 // Callback Function to get list of service providers
-static bool MapsServiceProviderForeachCb2(char* maps_provider, void* user_data)
+static bool MapsServiceProviderForeachCb(char* maps_provider, void* user_data)
 {
        memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
        strcpy(g_szMapsProvider, "MAPZEN");
@@ -201,7 +201,7 @@ void ITs_maps_service_startup2(void)
                remove(ERR_LOG);
        }
     bool bMapsFeatureSupported = TCTCheckSystemInfoFeatureSupported(MAPS_FEATURE, API_NAMESPACE);
-       int nRet = maps_service_foreach_provider(MapsServiceProviderForeachCb2, NULL);
+       int nRet = maps_service_foreach_provider(MapsServiceProviderForeachCb, NULL);
        if ( nRet != MAPS_ERROR_NONE)
        {
                FPRINTF("[Line : %d][%s] maps_service_foreach_provider fail in startup error returned : %s \\n", __LINE__, API_NAMESPACE , MapServiceGetError(nRet));
@@ -504,7 +504,7 @@ int ITc_maps_service_foreach_provider_p2(void)
        
        g_nCheckCb = false;
 
-       int nRet = maps_service_foreach_provider(MapsServiceProviderForeachCb2, NULL);
+       int nRet = maps_service_foreach_provider(MapsServiceProviderForeachCb, NULL);
        PRINT_RESULT(MAPS_ERROR_NONE, nRet, "maps_service_foreach_provider", MapServiceGetError(nRet));
 
        if(g_nCheckCb != true)
index 05e8ad2d6c5a7b3836e10aa1a4c48b90afbd292b..2bda22b08aa21d29bf51c01b9cf400a810cc2e60 100755 (executable)
@@ -1103,6 +1103,7 @@ int ITc_capi_media_streamer_set_unset_interrupted_p(void)
        
        nRet = media_streamer_unset_interrupted_cb(streamer);
        PRINT_RESULT(MEDIA_STREAMER_ERROR_NONE, nRet, "media_streamer_unset_interrupted_cb", MediaStreamerGetError(nRet));
+       return 0;
 }
 /** @} */
 /** @} */
index bece52ac5dd08977ddec1c4c7b2d8065ec1c1eb5..552784451286f804fe024daaf6cddfc16d1b80cd 100755 (executable)
@@ -990,6 +990,14 @@ int ITc_context_trigger_get_own_rule_ids_p(void)
 int ITc_context_trigger_rule_entry_add_option_int_p(void)
 {
        START_TEST;
+       bool place_supported = false;
+
+       bool comm_supported = false;
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_PLACE, &place_supported);
+       if (!place_supported) {
+               FPRINTF("[Line : %d][%s] Item not supported. Skip test. (Place)\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
 
        int nRet = context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_PLACE, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &g_Event);
        PRINT_RESULT(CONTEXT_TRIGGER_ERROR_NONE, nRet, "context_trigger_rule_event_create", ContextTriggerGetError(nRet));
index 0253b7423b6714656845da887e8dcab82d8040bc..8a00095dc303c9f7ef94caf6939572a5b0a59cd0 100644 (file)
@@ -53,6 +53,8 @@ int utc_cbhm_open_service_p(void)
    int ret = cbhm_open_service(&cbhm_handle);
    assert_eq(ret, CBHM_ERROR_NONE);
 
+   cbhm_close_service(cbhm_handle);
+
    return 0;
 }
 
index 143f4782f2fa61288034cb813150058686f97131..13da3a76b09def904ce04833ab9ed511a2a1e05d 100755 (executable)
@@ -874,6 +874,16 @@ int utc_context_trigger_rule_add_entry_n1(void)
        context_trigger_rule_entry_h c_comm = NULL;
        context_trigger_rule_entry_h c_comm2 = NULL;
 
+       bool hdp_supported = false;
+       bool batt_supported = false;
+       bool place_supported = false;
+       bool comm_supported = false;
+
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_HEADPHONE, &hdp_supported);
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_BATTERY, &batt_supported);
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_PLACE, &place_supported);
+       context_trigger_rule_condition_is_supported(CONTEXT_TRIGGER_CONDITION_COMMUNICATION_FREQUENCY, &comm_supported);
+
        context_trigger_rule_create(CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &rule);
        context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_HEADPHONE, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &e_headphone);
        context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_BATTERY, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &e_battery);
@@ -888,32 +898,44 @@ int utc_context_trigger_rule_add_entry_n1(void)
        assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER);
 
        // Err: Event already added
-       error = context_trigger_rule_add_entry(rule, e_headphone);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_NONE);
-       error = context_trigger_rule_add_entry(rule, e_battery);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       if (hdp_supported && batt_supported) {
+               error = context_trigger_rule_add_entry(rule, e_headphone);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_NONE);
+               error = context_trigger_rule_add_entry(rule, e_battery);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       } else {
+               PRINT_INFO("Not supported item included. Skip test.");
+       }
 
        // Err: Mandatory option not added (Event)
-       error = context_trigger_rule_add_entry(rule, e_place);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       if (place_supported) {
+               error = context_trigger_rule_add_entry(rule, e_place);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       } else {
+               PRINT_INFO("Not supported item included. Skip test.");
+       }
 
-       // Err: Mandatory option not added (Condition)
-       context_trigger_rule_entry_add_option_string(c_comm, CONTEXT_TRIGGER_DAY_OF_WEEK, CONTEXT_TRIGGER_WEEKDAY);
-       context_trigger_rule_entry_add_key(c_comm, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_RANK);
-       context_trigger_rule_entry_add_comparison_int(c_comm, CONTEXT_TRIGGER_RANK, CONTEXT_TRIGGER_LESS_THAN, 6);
-       error = context_trigger_rule_add_entry(rule, c_comm);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       if (comm_supported) {
+               // Err: Mandatory option not added (Condition)
+               context_trigger_rule_entry_add_option_string(c_comm, CONTEXT_TRIGGER_DAY_OF_WEEK, CONTEXT_TRIGGER_WEEKDAY);
+               context_trigger_rule_entry_add_key(c_comm, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_RANK);
+               context_trigger_rule_entry_add_comparison_int(c_comm, CONTEXT_TRIGGER_RANK, CONTEXT_TRIGGER_LESS_THAN, 6);
+               error = context_trigger_rule_add_entry(rule, c_comm);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
 
-       // Err: Condition without comparison data (key & value not added)
-       context_trigger_rule_entry_add_option_string(c_comm2, CONTEXT_TRIGGER_ADDRESS, "010-1111-2222");
-       context_trigger_rule_entry_add_option_string(c_comm2, CONTEXT_TRIGGER_DAY_OF_WEEK, CONTEXT_TRIGGER_WEEKDAY);
-       error = context_trigger_rule_add_entry(rule, c_comm2);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+               // Err: Condition without comparison data (key & value not added)
+               context_trigger_rule_entry_add_option_string(c_comm2, CONTEXT_TRIGGER_ADDRESS, "010-1111-2222");
+               context_trigger_rule_entry_add_option_string(c_comm2, CONTEXT_TRIGGER_DAY_OF_WEEK, CONTEXT_TRIGGER_WEEKDAY);
+               error = context_trigger_rule_add_entry(rule, c_comm2);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
 
-       // Err: Condition without comparison data (only key added)
-       context_trigger_rule_entry_add_key(c_comm2, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_RANK);
-       error = context_trigger_rule_add_entry(rule, c_comm2);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+               // Err: Condition without comparison data (only key added)
+               context_trigger_rule_entry_add_key(c_comm2, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, CONTEXT_TRIGGER_RANK);
+               error = context_trigger_rule_add_entry(rule, c_comm2);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       } else {
+               PRINT_INFO("Not supported item included. Skip test.");
+       }
 
        context_trigger_rule_entry_destroy(e_headphone);
        context_trigger_rule_entry_destroy(e_battery);
@@ -2308,6 +2330,13 @@ int utc_context_trigger_rule_entry_add_option_int_p(void)
        int error = CONTEXT_TRIGGER_ERROR_NONE;
        context_trigger_rule_entry_h event = NULL;
 
+       bool place_supported = false;
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_PLACE, &place_supported);
+       if (!place_supported) {
+               PRINT_INFO("Not supported item. Skip test.");
+               return 0;
+       }
+
        context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_PLACE, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &event);
        error = context_trigger_rule_entry_add_option_int(event, CONTEXT_TRIGGER_PLACE_ID, 1);
        assert_eq(error, CONTEXT_TRIGGER_ERROR_NONE);
@@ -2329,6 +2358,14 @@ int utc_context_trigger_rule_entry_add_option_int_n(void)
        context_trigger_rule_entry_h condition = NULL;
        context_trigger_rule_entry_h condition2 = NULL;
 
+       bool place_supported = false;
+       bool app_supported = false;
+       bool batt_supported = false;
+
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_PLACE, &place_supported);
+       context_trigger_rule_condition_is_supported(CONTEXT_TRIGGER_CONDITION_APP_USE_FREQUENCY, &app_supported);
+       context_trigger_rule_condition_is_supported(CONTEXT_TRIGGER_CONDITION_BATTERY, &batt_supported);
+
        context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_PLACE, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &event);
        context_trigger_rule_condition_create(CONTEXT_TRIGGER_CONDITION_APP_USE_FREQUENCY, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &condition);
        context_trigger_rule_condition_create(CONTEXT_TRIGGER_CONDITION_BATTERY, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &condition2);
@@ -2340,21 +2377,37 @@ int utc_context_trigger_rule_entry_add_option_int_n(void)
        error = context_trigger_rule_entry_add_option_int(NULL, CONTEXT_TRIGGER_PLACE_ID, 1);
        assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER);
 
-       // Err: Invalid option key
-       error = context_trigger_rule_entry_add_option_int(event, CONTEXT_TRIGGER_RANK, 1);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       if (place_supported) {
+               // Err: Invalid parameter
+               error = context_trigger_rule_entry_add_option_int(event, NULL, 1);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER);
 
-       // Err: Invalid option value
-       error = context_trigger_rule_entry_add_option_int(event, CONTEXT_TRIGGER_PLACE_ID, -1);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+               // Err: Invalid option key
+               error = context_trigger_rule_entry_add_option_int(event, CONTEXT_TRIGGER_RANK, 1);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+
+               // Err: Invalid option value
+               error = context_trigger_rule_entry_add_option_int(event, CONTEXT_TRIGGER_PLACE_ID, -1);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       } else {
+               PRINT_INFO("Not supported item included. Skip test.");
+       }
 
        // Err: Invalid option value type
-       error = context_trigger_rule_entry_add_option_int(condition, CONTEXT_TRIGGER_ADDRESS, 1);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       if (app_supported) {
+               error = context_trigger_rule_entry_add_option_int(condition, CONTEXT_TRIGGER_ADDRESS, 1);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       } else {
+               PRINT_INFO("Not supported item included. Skip test.");
+       }
 
        // Err: Item with no option
-       error = context_trigger_rule_entry_add_option_int(condition, CONTEXT_TRIGGER_IS_CONNECTED, CONTEXT_TRIGGER_TRUE);
-       assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       if (batt_supported) {
+               error = context_trigger_rule_entry_add_option_int(condition2, CONTEXT_TRIGGER_IS_CONNECTED, CONTEXT_TRIGGER_TRUE);
+               assert_eq(error, CONTEXT_TRIGGER_ERROR_INVALID_RULE);
+       } else {
+               PRINT_INFO("Not supported item included. Skip test.");
+       }
 
        context_trigger_rule_entry_destroy(event);
        context_trigger_rule_entry_destroy(condition);
@@ -2622,6 +2675,16 @@ int utc_context_trigger_rule_entry_add_option_n(void)
        context_trigger_rule_entry_h event = NULL;
        context_trigger_rule_entry_h condition = NULL;
 
+       bool place_supported = false;
+       bool comm_supported = false;
+
+       context_trigger_rule_event_is_supported(CONTEXT_TRIGGER_EVENT_PLACE, &place_supported);
+       context_trigger_rule_condition_is_supported(CONTEXT_TRIGGER_CONDITION_COMMUNICATION_FREQUENCY, &comm_supported);
+       if (!(place_supported && comm_supported)) {
+               PRINT_INFO("Not supported item included. Skip test.");
+               return 0;
+       }
+
        // Err: Invalid parmater
        context_trigger_rule_event_create(CONTEXT_TRIGGER_EVENT_PLACE, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &event);
        context_trigger_rule_condition_create(CONTEXT_TRIGGER_CONDITION_COMMUNICATION_FREQUENCY, CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, &condition);
index 6a0b0a8282acbeb8d63ad0da8aa4a8557ed8d018..793d3d77250e075c95123946fd9aa132a95d32ab 100644 (file)
@@ -69,7 +69,7 @@ static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manife
 int utc_webkit2_ewk_manifest_icons_count_get_func_p(void)
 {
   // 1. Open page
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index 3bcf3cae75d6068e92fe1cf29f533d070a4441a8..c599f766875415af81b615746a5eb8f65e5e8fd6 100644 (file)
@@ -50,7 +50,7 @@ void utc_webkit2_ewk_manifest_icons_height_get_func_cleanup(void)
  * @description Callback function for receiving the manifest.
  */
 static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manifest* manifest, void* user_data) {
-  if (manifest != NULL && ewk_manifest_icons_height_get(manifest, 0, 0) == 36)
+  if (manifest != NULL && ewk_manifest_icons_height_get(manifest, 0, 0) == 72)
     isSucceed = EINA_TRUE;
   else
     isSucceed = EINA_FALSE;
@@ -82,7 +82,7 @@ static void DidReceiveRequestManifestForNeg(Evas_Object* view, Ewk_View_Request_
 int utc_webkit2_ewk_manifest_icons_height_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -107,7 +107,7 @@ int utc_webkit2_ewk_manifest_icons_height_get_func_p(void)
 int utc_webkit2_ewk_manifest_icons_height_get_func_n(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index 5c013cc27f58f09f91dc63d80e475679105c7258..b1bf59ec801a1950ee082db160f294818b3be1da 100644 (file)
@@ -82,7 +82,7 @@ static void DidReceiveRequestManifestForNeg(Evas_Object* view, Ewk_View_Request_
 int utc_webkit2_ewk_manifest_icons_sizes_count_get_func_p(void)
 {
   // 1. Open page
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -107,7 +107,7 @@ int utc_webkit2_ewk_manifest_icons_sizes_count_get_func_p(void)
 int utc_webkit2_ewk_manifest_icons_sizes_count_get_func_n(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index d3bfc3210df195b2fa004c8d43ac4d8fb9582df7..40eb025eb31eedea63ef05f49f9a300346632a02 100644 (file)
@@ -50,7 +50,7 @@ void utc_webkit2_ewk_manifest_icons_src_get_func_cleanup(void)
  * @description Callback function for receiving the manifest.
  */
 static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manifest* manifest, void* user_data) {
-  if (manifest != NULL && !strcmp(ewk_manifest_icons_src_get(manifest, 0),"http://www.free.fr/freebox/im/icon_36.png"))
+  if (manifest != NULL && !strcmp(ewk_manifest_icons_src_get(manifest, 0),"https://www.chromestatus.com/static/img/crstatus_72.png"))
     isSucceed = EINA_TRUE;
   else
     isSucceed = EINA_FALSE;
@@ -82,7 +82,7 @@ static void DidReceiveRequestManifestForNeg(Evas_Object* view, Ewk_View_Request_
 int utc_webkit2_ewk_manifest_icons_src_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -107,7 +107,7 @@ int utc_webkit2_ewk_manifest_icons_src_get_func_p(void)
 int utc_webkit2_ewk_manifest_icons_src_get_func_n(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index 44128598a17fc636e1deae27ab4dfa502d65b2ea..12dc790e437d74080a5e79651a0dcb4bf1a9b605 100644 (file)
@@ -82,7 +82,7 @@ static void DidReceiveRequestManifestForNeg(Evas_Object* view, Ewk_View_Request_
 int utc_webkit2_ewk_manifest_icons_type_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -107,7 +107,7 @@ int utc_webkit2_ewk_manifest_icons_type_get_func_p(void)
 int utc_webkit2_ewk_manifest_icons_type_get_func_n(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index 103e81fcddd4b5f7cb790e7875f8c4dc54d6a2b7..14733069ccbe0f62fb45aa785c4c5eeac20cec68 100644 (file)
@@ -50,7 +50,7 @@ void utc_webkit2_ewk_manifest_icons_width_get_func_cleanup(void)
  * @description Callback function for receiving the manifest.
  */
 static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manifest* manifest, void* user_data) {
-  if (manifest != NULL && ewk_manifest_icons_width_get(manifest, 0, 0) == 36)
+  if (manifest != NULL && ewk_manifest_icons_width_get(manifest, 0, 0) == 72)
     isSucceed = EINA_TRUE;
   else
     isSucceed = EINA_FALSE;
@@ -82,7 +82,7 @@ static void DidReceiveRequestManifestForNeg(Evas_Object* view, Ewk_View_Request_
 int utc_webkit2_ewk_manifest_icons_width_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -107,7 +107,7 @@ int utc_webkit2_ewk_manifest_icons_width_get_func_p(void)
 int utc_webkit2_ewk_manifest_icons_width_get_func_n(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index 01bd68ab5b74cede2f51df2ee6284055727c80bb..ff93b424fc49eb5cbccfe18f9a62339e4345c2f3 100644 (file)
@@ -50,7 +50,7 @@ void utc_webkit2_ewk_manifest_name_get_func_cleanup(void)
  * @description Callback function for receiving the manifest.
  */
 static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manifest* manifest, void* user_data) {
-  if (manifest != NULL && !strcmp(ewk_manifest_name_get(manifest),"Free ADSL"))
+  if (manifest != NULL && !strcmp(ewk_manifest_name_get(manifest),"Chrome Platform Status"))
     isSucceed = EINA_TRUE;
   else
     isSucceed = EINA_FALSE;
@@ -69,7 +69,7 @@ static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manife
 int utc_webkit2_ewk_manifest_name_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -104,7 +104,7 @@ int utc_webkit2_ewk_manifest_name_get_func_n(void)
 
   // If callback function received NULL, it is normal operation.
   assert_eq(EINA_FALSE, isSucceed);
-    
+
   // 3. Get the name from NULL object, and if it returns nullptr it is normal operation.
   if (ewk_manifest_name_get(NULL) == NULL)
     assert(EINA_TRUE);
index cb3e3d8cf823048287f7b6051be57e1a1d2eea3c..9f856def6e02edcc79c216ac1e855846e4e60741 100644 (file)
@@ -50,7 +50,7 @@ void utc_webkit2_ewk_manifest_orientation_type_get_func_cleanup(void)
  * @description Callback function for receiving the manifest.
  */
 static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manifest* manifest, void* user_data) {
-  if (manifest != NULL && ewk_manifest_orientation_type_get(manifest) == WebScreenOrientationLockLandscape)
+  if (manifest != NULL && ewk_manifest_orientation_type_get(manifest) == WebScreenOrientationLockAny)
     isSucceed = EINA_TRUE;
   else
     isSucceed = EINA_FALSE;
@@ -69,7 +69,7 @@ static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manife
 int utc_webkit2_ewk_manifest_orientation_type_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://dev.opera.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index c5046b0d1f4324d5179c13adf7494df6dd5f4f10..faf031ed0fa0a7c769fd3d42ae8166035c73fdac 100644 (file)
@@ -50,7 +50,7 @@ void utc_webkit2_ewk_manifest_start_url_get_func_cleanup(void)
  * @description Callback function for receiving the manifest.
  */
 static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manifest* manifest, void* user_data) {
-  if (manifest != NULL && !strcmp(ewk_manifest_start_url_get(manifest),"http://www.free.fr/freebox/index.html"))
+  if (manifest != NULL && !strcmp(ewk_manifest_start_url_get(manifest),"https://www.chromestatus.com/features"))
     isSucceed = EINA_TRUE;
   else
     isSucceed = EINA_FALSE;
@@ -69,7 +69,7 @@ static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manife
 int utc_webkit2_ewk_manifest_start_url_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
@@ -104,7 +104,7 @@ int utc_webkit2_ewk_manifest_start_url_get_func_n(void)
 
   // If callback function received NULL, it is normal operation.
   assert_eq(EINA_FALSE, isSucceed);
-    
+
   // 3. Get the start url from NULL object, and if it returns nullptr it is normal operation.
   if (ewk_manifest_start_url_get(NULL) == NULL)
     assert(EINA_TRUE);
index 3a856b0219bb9fcdb58ac6f9562896976347fcb8..5d3b2fd778c1de20ac43682d480f6fb18f7644ac 100644 (file)
@@ -69,7 +69,7 @@ static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manife
 int utc_webkit2_ewk_manifest_web_display_mode_get_func_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);
 
index 15b2a88433bfa25f0ba0346da0c61edc150e0191..bf0cfdf4bfb9c9e18bbf3897402211e2011e96eb 100644 (file)
@@ -69,7 +69,7 @@ static void DidReceiveRequestManifest(Evas_Object* view, Ewk_View_Request_Manife
 int utc_webkit2_ewk_view_request_manifest_p(void)
 {
   // 1. Open page.
-  assert_eq(EINA_TRUE, loadURL("http://www.free.fr"));
+  assert_eq(EINA_TRUE, loadURL("https://www.chromestatus.com"));
   utc_webkit2_main_loop_begin();
   assert_eq(EINA_TRUE, isLoadSucceed);