Merge branch 'dev/ewk_test_base' into dev/ewk_test
authorViatcheslav Ostapenko <sl.ostapenko@samsung.com>
Wed, 24 Sep 2014 16:11:00 +0000 (12:11 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Conflicts:
.gitignore

586 files changed:
tizen_src/.gitignore
tizen_src/ewk/CMakeLists.txt [new file with mode: 0644]
tizen_src/ewk/README [new file with mode: 0644]
tizen_src/ewk/README.md [new file with mode: 0644]
tizen_src/ewk/S_TRUNK_OWNERS [new file with mode: 0644]
tizen_src/ewk/WebAPITestApp.wgt [new file with mode: 0644]
tizen_src/ewk/build/S_TRUNK_OWNERS [new file with mode: 0644]
tizen_src/ewk/build/build.sh [new file with mode: 0755]
tizen_src/ewk/build/build_desktop.sh [new file with mode: 0755]
tizen_src/ewk/build/build_mobile.sh [new file with mode: 0755]
tizen_src/ewk/build/build_tv.sh [new file with mode: 0755]
tizen_src/ewk/efl_integration/CMakeLists.txt [new file with mode: 0644]
tizen_src/ewk/efl_integration/S_TRUNK_OWNERS [new file with mode: 0644]
tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/api_static_check.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/chromium_glue.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/chromium_glue.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_context_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_context_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_favicon_database_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_history_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_history_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_hit_test_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_hit_test_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_notification_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_notification_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_security_origin_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_security_origin_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_view_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_view_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_wrt_private.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/ewk_wrt_private.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_application_cache_manager.cc [new file with mode: 0755]
tizen_src/ewk/efl_integration/public/ewk_application_cache_manager.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_auth_challenge.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_auth_challenge.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_auth_request.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_auth_request.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_back_forward_list.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_certificate.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_certificate.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_chromium.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_console_message.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_console_message.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_content_screening_detection.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_content_screening_detection.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_context.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_context.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_context_menu.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_context_menu.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_cookie_manager.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_custom_handlers.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_custom_handlers.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_dispatcher.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_enums.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_error.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_error.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_export.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_favicon_database.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_favicon_database.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_frame.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_frame.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_geolocation.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_geolocation.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_history.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_history.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_hit_test.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_hit_test.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_intercept_request.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_intercept_request.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_ipc_message.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_ipc_message.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_log.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_main.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_main.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_notification.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_notification.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_object.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_object.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_page_group.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_page_group.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_policy_decision.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_popup_menu_item.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_popup_menu_item.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_quota_permission_request.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_quota_permission_request.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_security_origin.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_security_origin.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_settings.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_settings.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_storage_manager.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_storage_manager.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_text_style.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_text_style.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_touch.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_user_media.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_user_media.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_view.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_view.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_web_application_icon_data.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_web_application_icon_data.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_window_features.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/ewk_window_features.h [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/text_encoding_map_efl.cc [new file with mode: 0644]
tizen_src/ewk/efl_integration/public/text_encoding_map_efl.h [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/CMakeLists.txt [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/S_TRUNK_OWNERS [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/app.c [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/browser-object.h [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/browser-string.h [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/efl_webview_app.sh [new file with mode: 0755]
tizen_src/ewk/efl_webview_app/elm_cycle_app.c [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/mini-browser.png [new file with mode: 0644]
tizen_src/ewk/efl_webview_app/mini_browser.c [new file with mode: 0755]
tizen_src/ewk/efl_webview_app/org.tizen.chromium-ewk.xml [new file with mode: 0644]
tizen_src/ewk/org.tizen.chromium-ewktest.manifest [new file with mode: 0644]
tizen_src/ewk/packaging/S_TRUNK_OWNERS [new file with mode: 0644]
tizen_src/ewk/packaging/chromium-ewk.spec [new file with mode: 0755]
tizen_src/ewk/packaging/manifest.xml [new file with mode: 0644]
tizen_src/ewk/packaging/org.tizen.chromium-ewk.manifest [new file with mode: 0644]
tizen_src/ewk/resultToHtml.xsl [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libnspr4.so [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libnss3.so [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libplc4.so [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libplds4.so [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libsmime3.so [new file with mode: 0755]
tizen_src/ewk/thirdparty/nss3.15/libssl3.so [new file with mode: 0755]
tizen_src/ewk/unittest/CMakeLists.txt [new file with mode: 0755]
tizen_src/ewk/unittest/S_TRUNK_OWNERS [new file with mode: 0644]
tizen_src/ewk/unittest/execute_utc_blink.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_new_with_injected_bundle_path_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_storage_path_reset_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_tizen_extensible_api_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_view_vertical_panning_hold_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/favicon.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/common/favicon.ico [new file with mode: 0644]
tizen_src/ewk/unittest/resources/common/logo.png [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_ js.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_ js_confirm.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_ js_prompt.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_1.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_2.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_js_geolocation.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_notification_1.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_notification_2.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/common/sample_notification_3.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context/WebDB2.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context/google-cert.pem [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.c [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.so [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_context_icon_database/favicon2.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_icon_database/tizen-icon.bmp [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_local_file_system/sample_context_local_file_system_read.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_local_file_system/sample_context_local_file_system_write.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_menu/index.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_menu/index_1.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_menu/webkit.png [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_context_vibration/vibration.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_web_indexed_database/CreateDB.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_web_indexed_database/DBExists.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_context_web_storage/webStorageGet.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_context_web_storage/webStorageSet.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_context_web_storage/web_storage_create_simple.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_custom_handlers/registerContentHandler.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_form_data/index.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_frame/iframetest.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_frame/iframetest2.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_history/page1.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_history/page2.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_history/page3.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_hit_test/index.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_hit_test/index_img.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_hit_test/webkit.png [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_policy_decision/iframe.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_policy_decision/mainframe_newwindow.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_policy_decision/subframe_newwindow.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_user_media_permission/index.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/alert_test.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/canvas.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/confirm_test.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/console_debug.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/console_error.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/console_info.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/console_log.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/console_warn.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/edge_test_bottom.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/edge_test_left.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/edge_test_right.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/edge_test_top.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/exceeded_database_quota_test.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/exceeded_local_file_system_quota.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/fullscreen.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/icon.png [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/index_big_red_square.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/open_panel_test.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/orientation_test.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/orientation_test1.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/orientation_test2.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/orientation_test3.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/page_save_test.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/prompt_test.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/quota_ask.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/redirect.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/sample_content_security_policy.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/scroll_test_right_left.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/scroll_test_up_down.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/text_selection_get.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/undo_redo.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view/web_app_icon_url_get_test.html [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view/webkit.edj [new file with mode: 0755]
tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon.png [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon1.png [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon2.png [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon3.png [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_icon.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_icon_apple.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_precomposed.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_urls_get.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/protocol_handler/handler.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/protocol_handler/is_protocol_handler_registered.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/protocol_handler/register_protocol_handler.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/protocol_handler/unregister_protocol_handler.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/selection/sample_1.html [new file with mode: 0644]
tizen_src/ewk/unittest/resources/selection/sample_2.html [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_context_local_file_system_origins_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_context_menu_item_enabled_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_context_menu_item_type_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_context_proxy_uri_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_context_web_storage_delete_all_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_hostname_cookies_clear_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_persistent_storage_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_edge_notifications.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_cached_permissions_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_clicked_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_policies_removed_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_scroll_notifications.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_auto_fitting_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_current_legacy_font_size_mode_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_font_default_size_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_load_remote_images_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_paste_image_uri_mode_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_select_word_automatically_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_text_selection_enabled_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_text_zoom_enabled_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_back_forward_list_clear_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_command_executeRedo_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_command_executeUndo_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_didCommitLoadFrameCallback_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_didStartProvisionalLoadFrameCallback_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_feed_touch_event_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_alert_callback_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_alert_reply_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_confirm_callback_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_prompt_callback_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_prompt_reply_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_load_callbacks_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_mouse_events_enabled_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_mouse_events_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_plain_text_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_reload_bypass_cache_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_smart_class_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_text_selection_range_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_title_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/unused/utc_blink_ewk_view_touch_events_enabled_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_cb_contextmenu_allowed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_contextmenu_willshow.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_closed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_opened.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_editorclient_ime_closed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_editorclient_ime_opened.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_form_submit.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_fullscreen_enterfullscreen.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_fullscreen_exitfullscreen.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_geolocation_valid.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_cb_icon_received.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_inputmethod_changed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_load_finished.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_load_progress.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_load_progress_finished.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_load_progress_started.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_load_started.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_magnifier_hide.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_magnifier_show.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_popup_blocked.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_isregistered.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_registration_requested.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_unregistration_requested.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_redo_size.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_textselection_mode.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_title_changed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_undo_size.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_unfocus_direction.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_uri_changed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_cb_url_changed.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_credential_cancel_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_credential_use_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_realm_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_data_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_data_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_delete_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_id_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_new_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_base.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_base.h [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_allowed_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_certificate_pem_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_console_message_level_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_console_message_line_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_console_message_source_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_console_message_text_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_additional_plugin_path_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_delete_all_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_delete_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_origins_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_cache_clear_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_cache_disabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_cache_model_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_cache_model_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_certificate_file_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_certificate_file_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_cookie_manager_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_default_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_delete_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_did_start_download_callback_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_add_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_get_all_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_remove_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_utils.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_utils.h [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_candidate_data_clear_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_form_password_data_clear_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_icon_database_icon_object_add_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_icon_database_path_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_local_file_system_all_delete_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_local_file_system_delete_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_start_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_stop_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu.h [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_append_as_action_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_append_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_count_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_image_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_link_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_remove_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_tag_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_menu_nth_item_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_new_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_notify_low_memory_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_pixmap_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_proxy_uri_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_proxy_uri_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_vibration_client_callbacks_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_delete_all_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_delete_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_origins_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_indexed_database_delete_all_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_delete_all_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_origin_delete_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_origins_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_accept_policy_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_cookies_clear_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_base_url_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_result_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_target_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_title_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_url_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_error_code_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_error_description_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_error_type_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_error_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_frame_is_main_frame_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_origin_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_history_back_list_length_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_history_forward_list_length_get.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_history_free_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_history_item_title_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_history_item_uri_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_history_nth_item_get.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_attribute_hash_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_free_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_buffer_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_buffer_length_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_file_name_extension_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_uri_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_label_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_title_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_uri_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_media_uri_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_node_value_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_result_context_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_hit_test_tag_name_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_init_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_body_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_clicked_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_notification_icon_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_id_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_origin_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_security_origin_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_showed_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_notification_title_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_cookie_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_frame_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_host_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_http_method_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_ignore_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_navigation_type_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_password_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_headers_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_mime_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_status_code_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_scheme_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_type_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_use_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_userid_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_is_persistent_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_host_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_port_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_protocol_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_quota_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_security_origin_host_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_security_origin_port_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_security_origin_protocol_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_set_arguments_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_auto_fitting_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_auto_fitting_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_autofill_password_form_enabled_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_autofill_password_form_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_clear_text_selection_automatically_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_current_legacy_font_size_mode_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_default_encoding_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_default_keypad_enabled_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_detect_contents_automatically_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_edge_effect_enabled_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_editable_link_behavior_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_extra_feature_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_font_default_size_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_font_default_size_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_force_zoom_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_form_candidate_data_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_form_profile_data_enabled_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_form_profile_data_enabled_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_initial_list_style_position_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_initial_list_style_position_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_is_encoding_valid_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_javascript_enabled_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_javascript_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_link_effect_enabled_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_link_magnifier_enabled_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_link_magnifier_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_load_remote_images_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_loads_images_automatically_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_paste_image_uri_mode_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_plugins_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_scripts_window_open_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_select_word_automatically_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_spdy_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_text_autosizing_enabled_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_settings_text_selection_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_text_style_state_enabled_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_text_zoom_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_uses_encoding_detector_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_settings_uses_keypad_without_user_action_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_shutdown_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_center_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_full_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_left_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_right_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_bg_color_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_bold_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_color_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_font_size_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_has_composition_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_italic_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_ordered_list_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_position_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_underline_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_text_style_unordered_list_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_user_media_permission_request_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_user_media_permission_request_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_add_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_add_with_context_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_add_with_session_data_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_app_name_user_agent_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_app_name_user_agent_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_back_forward_list_clear_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_back_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_back_possible_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_browser_font_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_command_execute_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_content_security_policy_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_contents_pdf_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_contents_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_contents_size_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_context_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_custom_header_add_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_custom_header_remove_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_draws_transparent_background_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_encoding_custom_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_forward_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_forward_possible_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_fullscreen_exit_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_get_cookies_for_url_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_history_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_hit_test_new_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_hit_test_request_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_html_contents_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_inspector_server_stop_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_javascript_confirm_reply_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_load_progress_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_mhtml_data_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_notification_closed_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_orientation_lock_callback_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_orientation_send_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_page_visibility_state_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_plain_text_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_callback_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_cancel_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_reply_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_reload_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_resume_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scale_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scale_range_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scale_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_screenshot_contents_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_script_execute_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_by_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_pos_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_size_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_session_data_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_settings_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_stop_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_suspend_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_text_find_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_text_find_highlight_clear_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_text_selection_clear_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_text_selection_text_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_text_zoom_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_text_zoom_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_title_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_touch_events_enabled_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_url_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_url_request_set_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_url_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_use_settings_font_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_user_agent_get_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_user_agent_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_visibility_set_func.cpp [new file with mode: 0755]
tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_capable_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_icon_url_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_icon_urls_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/unittest/utc_blink_ewk_web_application_icon_data_url_get_func.cpp [new file with mode: 0644]
tizen_src/ewk/utc_gtest_run.sh [new file with mode: 0644]

index ee5e76b..e7cb7d6 100644 (file)
@@ -2,5 +2,6 @@
 *.orig
 /*.list
 /out.*
+*.swp
 /packaging/*.tar.gz
 /build/TARGET
diff --git a/tizen_src/ewk/CMakeLists.txt b/tizen_src/ewk/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5e9ddbc
--- /dev/null
@@ -0,0 +1,68 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+PROJECT(chromium-ewk)
+
+INCLUDE(FindPkgConfig)
+
+pkg_search_module(evas REQUIRED evas)
+pkg_search_module(ecore REQUIRED ecore)
+pkg_search_module(ecore-x REQUIRED ecore-x)
+pkg_search_module(edje REQUIRED edje)
+pkg_search_module(eina REQUIRED eina)
+pkg_search_module(elementary REQUIRED elementary)
+pkg_search_module(ecore-evas REQUIRED ecore-evas)
+pkg_search_module(ecore-imf REQUIRED ecore-imf)
+pkg_search_module(chromium-efl REQUIRED chromium-efl)
+pkg_search_module(appcore-efl appcore-efl)
+pkg_search_module(capi-appfw-application capi-appfw-application)
+pkg_search_module(dlog dlog)
+
+IF(${TARGET} STREQUAL "mobile")
+  pkg_search_module(haptic haptic)
+  pkg_search_module(efl-assist efl-assist)
+ENDIF(${TARGET} STREQUAL "mobile")
+
+SET (BINDIR /usr/bin CACHE STRING "Target binary directory")
+SET (LIBDIR /usr/lib CACHE STRING "Target library directory")
+SET (DATADIR /usr/share CACHE STRING "Target data directory")
+SET (INCLUDEDIR /usr/include CACHE STRING "System include directory")
+
+# add definitions to build target
+IF(${TARGET} STREQUAL "mobile")
+  ADD_DEFINITIONS (
+    -DOS_TIZEN=1
+    -DOS_TIZEN_MOBILE=1
+  )
+ELSEIF(${TARGET} STREQUAL "tv")
+  ADD_DEFINITIONS (
+    -DOS_TIZEN=1
+    -DOS_TIZEN_TV=1
+  )
+ENDIF(${TARGET} STREQUAL "mobile")
+
+# Build type
+IF(NOT CMAKE_BUILD_TYPE)
+    SET(CMAKE_BUILD_TYPE "Release")
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+# Compiler flags
+SET(CMAKE_C_FLAGS_DEBUG        "-O0 -g")
+SET(CMAKE_CXX_FLAGS_DEBUG      "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE      "-O2 -g -DNDEBUG=1")
+SET(CMAKE_CXX_FLAGS_RELEASE    "-O2 -g -DNDEBUG=1")
+# Linker flags
+SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+
+#We include chromium-efl headers hence we
+#should use the same set of macros/defines
+#as chromium-efl
+ADD_DEFINITIONS(${chromium-efl_CFLAGS})
+
+ADD_SUBDIRECTORY(efl_integration)
+ADD_SUBDIRECTORY(efl_webview_app)
+
+message(Adding subdirectory)
+
+IF(DEFINED BUILD_EWK_UNITTEST)
+  ADD_SUBDIRECTORY(unittest)
+ENDIF(DEFINED BUILD_EWK_UNITTEST)
diff --git a/tizen_src/ewk/README b/tizen_src/ewk/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tizen_src/ewk/README.md b/tizen_src/ewk/README.md
new file mode 100644 (file)
index 0000000..7e705cc
--- /dev/null
@@ -0,0 +1,99 @@
+chromium-ewk
+==========
+
+Chromium-ewk is a webview API implementation based on chromium-efl port.
+It is supposed to be completely source and binary compatible with EFL-WebKit2.
+
+Building
+----------
+
+### For Desktop build
+
+    $ ./build/build_desktop.sh
+
+#build_desktop.sh handles some parameters like --ccache
+#--skip-cmake and so on. To see more detailed documentation
+#invoke the script with -h parameter
+
+
+### For target build
+Before Tizen build You need to install GBS.
+Please refer to (https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.
+platform.development%2Fhtml%2Fplatform_dev_env%2Fgit_build_system.htm)
+
+Also you need to have access to chromium-efl-devel package.
+The detailed instrcution how to do this can be found in chromium-efl/README.md file.
+#for mobile
+    $ ./build/build_mobile.sh
+#for tv
+    $ ./build/build_tv.sh
+#developer can add --incremental and --ccache flags to improve development cycle
+    $ ./build/build_(mobile|tv).sh --incremental --ccache
+
+The GBS build supports the following additional options passed through --define switch:
+    _debug_mode [1|0] - compile the code in debug mode (default : 0)
+    build_unittest [1|0 - compile and create package of ewk unittest
+
+
+Coding style
+----------
+
+We use the chromium coding style as a base (see: http://www.chromium.org/developers/coding-style).
+This is a good and consistent style. However, coming from WebKit and Blink,
+it seems like it has some disadvantages regarding readibility.
+For that reason we have some exception from it's rules.
+
+Our extra rules are these:
+
+1. We put starting braces of functinos and methods on it's own line
+
+    *Bad*
+
+        void MyFancyStuff() {
+          ...
+        }
+
+    *Good*
+
+        void MyFancyStuff()
+        {
+          ...
+        }
+
+2. We do not keep the 80 character limit on line lenghts. It hurts readibility.
+   There is no strict rule, but plese do break lines in a sane manner.
+   A soft limit on about 120 characters is reasonable.
+
+    *Bad*
+
+        void RenderWidgetHostViewPort::GetDefaultScreenInfo(
+            WebKit::WebScreenInfo* results)
+
+    *Good*
+
+        void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebKit::WebScreenInfo* results)
+
+3. Do not name function params in function declarations if the role of the argument is clear.
+
+    *Bad*
+
+        void LaunchRocket(const Rocket& rocket);
+
+    *Good*
+
+        void LaunchRocket(const Rocket&);
+
+4. We do not require header guards to contain the full path of the header.
+
+    *Bad*
+
+        #ifndef EFL_INTEGRATION_SOME_MORE_NESTED_DIRS_MY_HEADER_H
+        #define EFL_INTEGRATION_SOME_MORE_NESTED_DIRS_MY_HEADER_H
+
+    *Good*
+
+        #ifndef MY_HEADER_H
+        #define MY_HEADER_H
+
+5. If a file is coming directly from WebKit (headers for example) it's acceptable to
+   completely ignore fixing it's style.
diff --git a/tizen_src/ewk/S_TRUNK_OWNERS b/tizen_src/ewk/S_TRUNK_OWNERS
new file mode 100644 (file)
index 0000000..3078ea0
--- /dev/null
@@ -0,0 +1,13 @@
+a.cogliati@samsung.com
+a1.gomes@samsung.com
+ancilgeorge@samsung.com
+b.kelemen@samsung.com
+l.gombos@samsung.com
+l.malesza@samsung.com
+nke94@samsung.com
+seojin.kim@samsung.com
+s.gibbs@samsung.com
+sl.ostapenko@samsung.com
+sns.park@samsung.com
+sundara.sn@samsung.com
+sung.h.cho@samsung.com
diff --git a/tizen_src/ewk/WebAPITestApp.wgt b/tizen_src/ewk/WebAPITestApp.wgt
new file mode 100644 (file)
index 0000000..173b00f
Binary files /dev/null and b/tizen_src/ewk/WebAPITestApp.wgt differ
diff --git a/tizen_src/ewk/build/S_TRUNK_OWNERS b/tizen_src/ewk/build/S_TRUNK_OWNERS
new file mode 100644 (file)
index 0000000..17d3e34
--- /dev/null
@@ -0,0 +1,5 @@
+djmix.kim@samsung.com
+j.majnert@samsung.com
+p.grad@samsung.com
+t.olszak@samsung.com
+youngbok.yoon@samsung.com
diff --git a/tizen_src/ewk/build/build.sh b/tizen_src/ewk/build/build.sh
new file mode 100755 (executable)
index 0000000..5e2bbcd
--- /dev/null
@@ -0,0 +1,131 @@
+#/bin/bash
+
+SCRIPTNAME="build.sh"
+
+if [[ ! "$0" =~ .*"$SCRIPTNAME" ]]; then
+  echo $0
+  echo "ERROR - $SCRIPTNAME probably invoked  with source or . statement like:"
+  echo "$ source $SCRIPTNAME"
+  echo "$ . $SCRIPTNAME"
+  echo "$SCRIPTNAME is meant to be executed with:"
+  echo "$ ./$SCRIPTNAME"
+  echo "$ bash $SCRIPTNAME"
+  #we don't want to exit with error code here because if script is sourced
+  #it will exit current shell
+  return 1
+fi
+
+BUILD_TARGETS="mobile tv desktop"
+BUILD_TYPES="release debug"
+
+usage() {
+cat << EOF
+usage: $0  $(echo $BUILD_TARGETS|sed "s/ /\|/gi") $(echo $BUILD_TYPES|sed "s/ /\|/gi") [OPTIONS]
+
+Build certain version of chromium-ewk
+
+OPTIONS:
+   -h, --help    Show this message
+   --build-ewk-unittest - build chromium ewk unittest rmp (only for non desktop builds)
+examples:
+$0 mobile debug
+$0 desktop release
+EOF
+  exit
+}
+
+function getHostArch() {
+  echo $(uname -m | sed -e \
+        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
+}
+
+copy_chromium_files() {
+  local chr_out_dir=${1}
+  local out_dir=${2}/efl_webview_app
+  mkdir -p $out_dir
+  ln -sf $chr_out_dir/efl_webprocess $out_dir/efl_webprocess
+  ln -sf $chr_out_dir/resources $out_dir/resources
+  cp $chr_out_dir/icudtl.dat $out_dir/
+}
+
+TARGET=""
+BUILD_TYPE=""
+BUILD_EWK_UNITTEST=""
+
+function validateArgs() {
+  for param in $@; do
+    if [ "$param" == "-h" -o "$param" == "--help" ]; then
+      usage
+    elif [ "$param" == "--build-ewk-unittest" ]; then
+      BUILD_EWK_UNITTEST="-DBUILD_EWK_UNITTEST=1"
+    fi
+  done
+
+  if echo " $BUILD_TARGETS " | grep -cq " $1 "; then
+    TARGET=$1
+  else
+    echo "ERROR - not handled target \"$1\""
+    usage
+  fi
+
+  if echo " $BUILD_TYPES " | grep -cq " $2 "; then
+    BUILD_TYPE=${2^}
+  else
+    echo "ERROR - not handled build type: \"$2\""
+    usage
+  fi
+
+  if [ "$TARGET" == "desktop" -a "$BUILD_EWK_UNITTEST" != "" ]; then
+    echo ERROR - building ewk unittest working only possible non desktop target
+    usage
+  fi
+
+}
+
+validateArgs $@
+
+SCRIPTDIR=$(cd $(dirname $(readlink -f $0)); pwd -P)
+TOPDIR=$(cd $SCRIPTDIR/..; pwd -P)
+CHROMIUM_EFL_DIR=${TOPDIR}/chromium
+
+host_arch=$(getHostArch)
+
+if [ "$TARGET" == "desktop" ]; then
+  OUT_DIR_ABS="${TOPDIR}/out.$host_arch"
+  CHROMIUM_OUTPUT_BASE="${CHROMIUM_EFL_DIR}/out.$host_arch"
+  echo "${CHROMIUM_OUTPUT_BASE}"/${BUILD_TYPE}/lib/libchromium-efl.so
+  if [ -e "${CHROMIUM_OUTPUT_BASE}"/${BUILD_TYPE}/lib/libchromium-efl.so ]; then
+    echo "Found chromium-efl compiled in ${BUILD_TYPE} mode at: ${CHROMIUM_OUTPUT_BASE}/${BUILD_TYPE}"
+    mkdir -p ${OUT_DIR_ABS}/${BUILD_TYPE}
+    copy_chromium_files "${CHROMIUM_OUTPUT_BASE}"/${BUILD_TYPE} "${OUT_DIR_ABS}"/${BUILD_TYPE}
+  else
+    echo "Please build chromium-efl in ${BUILD_TYPE} mode before trying to compile chromium-ewk"
+    exit 1
+  fi
+
+  if [ -d ${CHROMIUM_OUTPUT_BASE}/Dependencies/Root ]; then
+    JHBUILD_DEPS=${CHROMIUM_OUTPUT_BASE}/Dependencies/Root
+  if [ ${host_arch} = 'x64' ]; then
+    _LIBDIR=lib64
+  elif [ ${host_arch} = 'ia32' ]; then
+    _LIBDIR=lib
+  fi
+    export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig:${CHROMIUM_OUTPUT_BASE}/${BUILD_TYPE}/pkgconfig/desktop"
+    export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}"
+    echo "EFL dependencies found at: ${JHBUILD_DEPS}"
+  fi
+else
+  if [ "$USER" != "abuild" ]; then
+    echo "ERROR: non desktop target are only handled in gbs environment"
+    usage
+  fi
+  OUT_DIR_ABS="${TOPDIR}/out.${TARGET}.$host_arch"
+  CHROMIUM_OUTPUT_BASE="${CHROMIUM_EFL_DIR}/out.${TARGET}.$host_arch"
+  export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}":"${CHROMIUM_OUTPUT_BASE}/${BUILD_TYPE}/pkgconfig"
+fi
+
+echo "Configuring project in ${BUILD_TYPE} mode"
+mkdir -p ${OUT_DIR_ABS}/${BUILD_TYPE}
+cd "${OUT_DIR_ABS}/${BUILD_TYPE}"
+set -x
+cmake -DTARGET=${TARGET} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${CMAKE_EXTRA_ARGS} ../..
diff --git a/tizen_src/ewk/build/build_desktop.sh b/tizen_src/ewk/build/build_desktop.sh
new file mode 100755 (executable)
index 0000000..01d6266
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+SCRIPTDIR=$( cd $(dirname $0) ; pwd -P )
+TOPDIR=$( cd ${SCRIPTDIR}/.. ; pwd -P )
+
+source ${TOPDIR}/chromium/build/common.sh
+
+
+host_arch=$(getHostArch)
+
+JHBUILD_DEPS="${TOPDIR}/chromium/out.${host_arch}/Dependencies/Root"
+
+if [ "${host_arch}" == "x64" ]; then
+  _LIBDIR=lib64
+elif [ "${host_arch}" == "ia32" ]; then
+  _LIBDIR=lib
+fi
+
+OUTPUT_DIR=${TOPDIR}/"out.${host_arch}"
+
+usage() {
+cat << EOF
+usage: $0 [OPTIONS]
+
+Build desktop version of chromium-efl
+
+OPTIONS:
+   -h, --help   Show this message
+   --skip-cmake Skip cmake configuration
+   --skip-make  Skip make step
+   --debug      build debug version of chromium-efl (in $GYP_GENERATOR_OUTPUT/Debug instead of default $GYP_GENERATOR_OUTPUT/Release)
+
+examples:
+$0 --skip-cmake
+$0 --skip-make
+$0 --debug
+EOF
+  exit
+}
+
+SKIP_CMAKE=0
+SKIP_MAKE=0
+
+BUILD_TYPE=release
+
+if echo "$@" | grep -cq '\(\(\-\-help\)\|\(\-h\)\)'; then
+  usage
+fi
+
+if echo "$@" | grep -cq '\-\-skip-cmake'; then
+  SKIP_CMAKE=1
+fi
+
+if echo "$@" | grep -cq '\-\-skip-make'; then
+  SKIP_MAKE=1
+fi
+
+if echo "$@" | grep -cq '\-\-debug'; then
+  BUILD_TYPE=debug
+fi
+
+set -e
+
+if [ "$SKIP_CMAKE" == "0" ]; then
+  ${SCRIPTDIR}/build.sh desktop ${BUILD_TYPE}
+fi
+
+if [ "$SKIP_MAKE" == "0" ]; then
+  export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH"
+  make -C ${OUTPUT_DIR}/${BUILD_TYPE^}
+fi
diff --git a/tizen_src/ewk/build/build_mobile.sh b/tizen_src/ewk/build/build_mobile.sh
new file mode 100755 (executable)
index 0000000..a303e27
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+SCRIPTDIR=$(cd $(dirname $0); pwd -P)
+
+PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*")
+
+if [ "$PROFILE_NAME" == "" ]; then
+  PROFILE_NAME=tizenmb
+  PROFILE_PARAMETERS="-P $PROFILE_NAME"
+fi
+
+TIZEN_VERSION="chromium_efl_tizen_version 2.3"
+if echo $PROFILE_NAME | grep -cq 2.1; then
+  TIZEN_VERSION="chromium_efl_tizen_version 2.1"
+fi
+
+echo building mobile for $PROFILE_NAME profile
+
+gbs --conf ${SCRIPTDIR}/../chromium/build/gbs.conf build \
+    $PROFILE_PARAMETERS -A armv7l --incremental \
+    --define "${TIZEN_VERSION}" "$@"
diff --git a/tizen_src/ewk/build/build_tv.sh b/tizen_src/ewk/build/build_tv.sh
new file mode 100755 (executable)
index 0000000..6fa9e4a
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+SCRIPTDIR=$(cd $(dirname $0); pwd -P)
+
+gbs --conf ${SCRIPTDIR}/../chromium/build/gbs.conf build -P tizentv_product -A armv7l "$@"
diff --git a/tizen_src/ewk/efl_integration/CMakeLists.txt b/tizen_src/ewk/efl_integration/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b04a08a
--- /dev/null
@@ -0,0 +1,151 @@
+SET (EWK_API_LIBRARY_NAME "chromium-ewk")
+
+SET (EWK_API_PUBLIC_SOURCES
+  public/ewk_application_cache_manager.cc
+  public/ewk_auth_challenge.cc
+  public/ewk_auth_request.cc
+  public/ewk_autofill_profile.cc
+  public/ewk_back_forward_list.cc
+  public/ewk_back_forward_list_item.cc
+  public/ewk_certificate.cc
+  public/ewk_console_message.cc
+  public/ewk_content_screening_detection.cc
+  public/ewk_context.cc
+  public/ewk_context_menu.cc
+  public/ewk_cookie_manager.cc
+  public/ewk_custom_handlers.cc
+  public/ewk_dispatcher.cc
+  public/ewk_error.cc
+  public/ewk_favicon_database.cc
+  public/ewk_frame.cc
+  public/ewk_geolocation.cc
+  public/ewk_history.cc
+  public/ewk_hit_test.cc
+  public/ewk_intercept_request.cc
+  public/ewk_ipc_message.cc
+  public/ewk_main.cc
+  public/ewk_notification.cc
+  public/ewk_object.cc
+  public/ewk_page_group.cc
+  public/ewk_policy_decision.cc
+  public/ewk_popup_menu_item.cc
+  public/ewk_quota_permission_request.cc
+  public/ewk_security_origin.cc
+  public/ewk_settings.cc
+  public/ewk_storage_manager.cc
+  public/ewk_text_style.cc
+  public/ewk_user_media.cc
+  public/ewk_view.cc
+  public/ewk_web_application_icon_data.cc
+  public/ewk_window_features.cc
+)
+
+SET (EWK_API_PUBLIC_HEADERS
+  public/ewk_application_cache_manager.h
+  public/ewk_auth_challenge.h
+  public/ewk_auth_request.h
+  public/ewk_autofill_profile.h
+  public/ewk_back_forward_list.h
+  public/ewk_back_forward_list_item.h
+  public/ewk_certificate.h
+  public/ewk_chromium.h
+  public/ewk_console_message.h
+  public/ewk_content_screening_detection.h
+  public/ewk_context.h
+  public/ewk_context_menu.h
+  public/ewk_cookie_manager.h
+  public/ewk_custom_handlers.h
+  public/ewk_dispatcher.h
+  public/ewk_enums.h
+  public/ewk_error.h
+  public/ewk_export.h
+  public/ewk_favicon_database.h
+  public/ewk_frame.h
+  public/ewk_geolocation.h
+  public/ewk_history.h
+  public/ewk_hit_test.h
+  public/ewk_intercept_request.h
+  public/ewk_ipc_message.h
+  public/ewk_log.h
+  public/ewk_main.h
+  public/ewk_notification.h
+  public/ewk_object.h
+  public/ewk_page_group.h
+  public/ewk_policy_decision.h
+  public/ewk_popup_menu_item.h
+  public/ewk_quota_permission_request.h
+  public/ewk_security_origin.h
+  public/ewk_settings.h
+  public/ewk_storage_manager.h
+  public/ewk_text_style.h
+  public/ewk_touch.h
+  public/ewk_user_media.h
+  public/ewk_view.h
+  public/ewk_web_application_icon_data.h
+  public/ewk_window_features.h
+)
+
+SET (EWK_API_MISC
+  private/api_static_check.cc
+  private/chromium_glue.cc
+  private/chromium_glue.h
+  private/ewk_context_private.cc
+  private/ewk_context_private.h
+  private/ewk_hit_test_private.h
+  private/ewk_hit_test_private.cc
+  private/ewk_notification_private.h
+  private/ewk_notification_private.cc
+  private/ewk_policy_decision_private.cc
+  private/ewk_policy_decision_private.h
+  private/ewk_private.h
+  private/ewk_quota_permission_request_private.h
+  private/ewk_quota_permission_request_private.cc
+  private/ewk_security_origin_private.h
+  private/ewk_security_origin_private.cc
+  private/ewk_view_private.h
+  private/ewk_view_private.cc
+  private/ewk_wrt_private.h
+  private/ewk_wrt_private.cc
+  private/ewk_history_private.h
+  private/ewk_history_private.cc
+  private/webview_delegate_ewk.h
+  private/webview_delegate_ewk.cc
+  private/ewk_favicon_database_private.h
+  public/text_encoding_map_efl.cc
+  public/text_encoding_map_efl.h
+)
+
+INCLUDE_DIRECTORIES (
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}/public
+  ${eina_INCLUDE_DIRS}
+  ${evas_INCLUDE_DIRS}
+  ${ecore_INCLUDE_DIRS}
+  ${edje_INCLUDE_DIRS}
+  ${ecore-evas_INCLUDE_DIRS}
+  ${ecore-imf_INCLUDE_DIRS}
+  ${chromium-efl_INCLUDE_DIRS}
+)
+
+ADD_LIBRARY (${EWK_API_LIBRARY_NAME} SHARED
+  ${EWK_API_PUBLIC_SOURCES}
+  ${EWK_API_PUBLIC_HEADERS}
+  ${EWK_API_MISC}
+)
+
+TARGET_LINK_LIBRARIES (
+  ${EWK_API_LIBRARY_NAME}
+  ${eina_LDFLAGS}
+  ${evas_LDFLAGS}
+  ${ecore_LDFLAGS}
+  ${edje_LDFLAGS}
+  ${ecore-evas_LDFLAGS}
+  ${ecore-imf_LDFLAGS}
+  ${chromium-efl_LDFLAGS}
+  chromium-ewk
+)
+
+INSTALL (FILES ${EWK_API_PUBLIC_HEADERS} DESTINATION ${INCLUDEDIR}/${PROJECT_NAME})
+INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/${PROJECT_NAME}.pc
+  DESTINATION ${LIBDIR}/pkgconfig)
+INSTALL (TARGETS ${EWK_API_LIBRARY_NAME} LIBRARY DESTINATION ${LIBDIR})
diff --git a/tizen_src/ewk/efl_integration/S_TRUNK_OWNERS b/tizen_src/ewk/efl_integration/S_TRUNK_OWNERS
new file mode 100644 (file)
index 0000000..a7eabf9
--- /dev/null
@@ -0,0 +1,18 @@
+a.renevier@samsung.com
+a1.gomes@samsung.com
+ch.dumez@samsung.com
+dennis.oh@samsung.com
+dhyuna.ko@samsung.com
+dw.im@samsung.com
+hyungsun.ryu@samsung.com
+j.majnert@samsung.com
+kangil.han@samsung.com
+kihong.kwon@samsung.com
+mohan.reddy@samsung.com
+prashant.n@samsung.com
+p.grad@samsung.com
+p.sikorski@samsung.com
+p.tworek@samsung.com
+v.keshav@samsung.com
+yi.shen@samsung.com
+youngbok.yoon@samsung.com
diff --git a/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc b/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc
new file mode 100644 (file)
index 0000000..3dff4b8
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: chromium-ewk
+Description: EWK API based on chromium-efl engine
+Version: 34.1847.76.35-1
+Requires: chromium-efl
+Libs: -L${libdir} -lchromium-ewk
+Cflags: -I${includedir}/chromium-ewk
diff --git a/tizen_src/ewk/efl_integration/private/api_static_check.cc b/tizen_src/ewk/efl_integration/private/api_static_check.cc
new file mode 100644 (file)
index 0000000..c66aec7
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if !defined(EWK_BRINGUP)
+
+#include "public/ewk_view.h"
+#include "public/ewk_cookie_manager.h"
+#include "tizen_webview/public/tw_unfocus_direction.h"
+#include "tizen_webview/public/tw_cookie_accept_policy.h"
+
+template <bool> class StaticAssert;
+template <> class StaticAssert<true> { };
+
+#define STATIC_ASSERT(condition, message) \
+    { StaticAssert<((condition) != 0)> ERROR_##message; (void)ERROR_##message; }
+
+#define STATIC_ENUM_IS_EQUAL(left, right) \
+    STATIC_ASSERT(static_cast<int>(left) == static_cast<int>(right), _ENUM_VALUE_MISMATCH)
+
+void do_static_check()
+{
+  STATIC_ENUM_IS_EQUAL(tizen_webview::TW_UNFOCUS_DIRECTION_FORWARD, EWK_UNFOCUS_DIRECTION_FORWARD);
+  STATIC_ENUM_IS_EQUAL(tizen_webview::TW_UNFOCUS_DIRECTION_BACKWARD, EWK_UNFOCUS_DIRECTION_BACKWARD);
+
+  STATIC_ENUM_IS_EQUAL(EWK_COOKIE_ACCEPT_POLICY_ALWAYS, tizen_webview::TW_COOKIE_ACCEPT_POLICY_ALWAYS);
+  STATIC_ENUM_IS_EQUAL(EWK_COOKIE_ACCEPT_POLICY_NEVER, tizen_webview::TW_COOKIE_ACCEPT_POLICY_NEVER);
+  STATIC_ENUM_IS_EQUAL(EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY, tizen_webview::TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
+}
+#endif
+
diff --git a/tizen_src/ewk/efl_integration/private/chromium_glue.cc b/tizen_src/ewk/efl_integration/private/chromium_glue.cc
new file mode 100644 (file)
index 0000000..7dd98c9
--- /dev/null
@@ -0,0 +1,302 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "chromium_glue.h"
+
+// utility macros for type casting
+#include <stdio.h>
+#include <cassert>
+
+#define GLUE_NOTALLOWED(msg) \
+  fprintf(stderr, "[GLUE ERROR] %s: %s\n", __PRETTY_FUNCTION__, ""#msg); \
+  assert(0);\
+
+#define GLUE_CAST_START(type) \
+  switch ((type)) {\
+
+#define GLUE_CAST_TO(ewk_value, chromium_value) \
+    case ewk_value: return chromium_value;
+
+#define GLUE_CAST_FROM(ewk_value, chromium_value) \
+    case chromium_value: return ewk_value;
+
+#define GLUE_CAST_END() \
+    default: \
+      GLUE_NOTALLOWED("Invalid EWK<->Chromium type conversion")\
+  }\
+
+// early return chromium's null value if argval is ewk's null.
+// initialize result to chromium's null value otherwise.
+#define GLUE_SET_FLAG_TO_INIT(result, argval, ewk_null_value, chromium_null_value)\
+  if (argval == (ewk_null_value))\
+    return chromium_null_value;\
+  int result = (chromium_null_value);
+
+#define GLUE_SET_FLAG_FROM_INIT(result, argval, ewk_null_value, chromium_null_value)\
+  if (argval == (chromium_null_value))\
+    return ewk_null_value;\
+  int result = (ewk_null_value);
+
+// turn on chromium_flag in result if (argval & ewk_flag) is true
+#define GLUE_SET_FLAG_TO(result, argval, ewk_flag, chromium_flag) \
+  if ((argval) & (ewk_flag))\
+    result |= (chromium_flag);
+
+// turn on ewk_flag in result if (argval & chromium_flag) is true
+#define GLUE_SET_FLAG_FROM(result, argval, ewk_flag, chromium_flag) \
+  if ((argval) & (chromium_flag))\
+    result |= (ewk_flag);
+
+
+namespace chromium_glue {
+
+// To access enum values without namespace
+using namespace tizen_webview;
+
+tw::Cache_Model to(Ewk_Cache_Model val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO (EWK_CACHE_MODEL_DOCUMENT_VIEWER, TW_CACHE_MODEL_DOCUMENT_VIEWER)
+    GLUE_CAST_TO (EWK_CACHE_MODEL_DOCUMENT_BROWSER, TW_CACHE_MODEL_DOCUMENT_BROWSER)
+    GLUE_CAST_TO (EWK_CACHE_MODEL_PRIMARY_WEBBROWSER, TW_CACHE_MODEL_PRIMARY_WEBBROWSER)
+  GLUE_CAST_END()
+}
+
+Ewk_Cache_Model from(tw::Cache_Model val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_CACHE_MODEL_DOCUMENT_VIEWER, TW_CACHE_MODEL_DOCUMENT_VIEWER)
+    GLUE_CAST_FROM(EWK_CACHE_MODEL_DOCUMENT_BROWSER, TW_CACHE_MODEL_DOCUMENT_BROWSER)
+    GLUE_CAST_FROM(EWK_CACHE_MODEL_PRIMARY_WEBBROWSER, TW_CACHE_MODEL_PRIMARY_WEBBROWSER)
+  GLUE_CAST_END()
+}
+
+tw::Cookie_Accept_Policy to(Ewk_Cookie_Accept_Policy val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_COOKIE_ACCEPT_POLICY_ALWAYS, TW_COOKIE_ACCEPT_POLICY_ALWAYS)
+    GLUE_CAST_TO(EWK_COOKIE_ACCEPT_POLICY_NEVER, TW_COOKIE_ACCEPT_POLICY_NEVER)
+    GLUE_CAST_TO(EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY, TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY)
+  GLUE_CAST_END()
+}
+
+Ewk_Cookie_Accept_Policy from(tw::Cookie_Accept_Policy val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_COOKIE_ACCEPT_POLICY_ALWAYS, TW_COOKIE_ACCEPT_POLICY_ALWAYS)
+    GLUE_CAST_FROM(EWK_COOKIE_ACCEPT_POLICY_NEVER, TW_COOKIE_ACCEPT_POLICY_NEVER)
+    GLUE_CAST_FROM(EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY, TW_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY)
+  GLUE_CAST_END()
+}
+
+tw::Legacy_Font_Size_Mode to(Ewk_Legacy_Font_Size_Mode val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_LEGACY_FONT_SIZE_MODE_ALWAYS, TW_LEGACY_FONT_SIZE_MODE_ALWAYS)
+    GLUE_CAST_TO(EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH, TW_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH)
+    GLUE_CAST_TO(EWK_LEGACY_FONT_SIZE_MODE_NEVER, TW_LEGACY_FONT_SIZE_MODE_NEVER)
+  GLUE_CAST_END()
+}
+
+Ewk_Legacy_Font_Size_Mode from(tw::Legacy_Font_Size_Mode val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_LEGACY_FONT_SIZE_MODE_ALWAYS, TW_LEGACY_FONT_SIZE_MODE_ALWAYS)
+    GLUE_CAST_FROM(EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH, TW_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH)
+    GLUE_CAST_FROM(EWK_LEGACY_FONT_SIZE_MODE_NEVER, TW_LEGACY_FONT_SIZE_MODE_NEVER)
+  GLUE_CAST_END()
+}
+
+tw::Hit_Test_Result_Context to(Ewk_Hit_Test_Result_Context val)
+{
+  GLUE_SET_FLAG_TO_INIT(res, val, static_cast<Ewk_Hit_Test_Result_Context>(0), static_cast<tw::Hit_Test_Result_Context>(0))
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT, TW_HIT_TEST_RESULT_CONTEXT_DOCUMENT)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_LINK, TW_HIT_TEST_RESULT_CONTEXT_LINK)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_IMAGE, TW_HIT_TEST_RESULT_CONTEXT_IMAGE)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_MEDIA, TW_HIT_TEST_RESULT_CONTEXT_MEDIA)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_SELECTION, TW_HIT_TEST_RESULT_CONTEXT_SELECTION)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE, TW_HIT_TEST_RESULT_CONTEXT_EDITABLE)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_RESULT_CONTEXT_TEXT, TW_HIT_TEST_RESULT_CONTEXT_TEXT)
+  return static_cast<tw::Hit_Test_Result_Context>(res);
+}
+
+Ewk_Hit_Test_Result_Context from(tw::Hit_Test_Result_Context val)
+{
+  GLUE_SET_FLAG_FROM_INIT(res, val, static_cast<Ewk_Hit_Test_Result_Context>(0), static_cast<tw::Hit_Test_Result_Context>(0))
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT, TW_HIT_TEST_RESULT_CONTEXT_DOCUMENT)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_LINK, TW_HIT_TEST_RESULT_CONTEXT_LINK)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_IMAGE, TW_HIT_TEST_RESULT_CONTEXT_IMAGE)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_MEDIA, TW_HIT_TEST_RESULT_CONTEXT_MEDIA)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_SELECTION, TW_HIT_TEST_RESULT_CONTEXT_SELECTION)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE, TW_HIT_TEST_RESULT_CONTEXT_EDITABLE)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_RESULT_CONTEXT_TEXT, TW_HIT_TEST_RESULT_CONTEXT_TEXT)
+  return static_cast<Ewk_Hit_Test_Result_Context>(res);
+}
+
+tw::Hit_Test_Mode to(Ewk_Hit_Test_Mode val)
+{
+  GLUE_SET_FLAG_TO_INIT(res, val, static_cast<Ewk_Hit_Test_Mode>(0), static_cast<tw::Hit_Test_Mode>(0))
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_MODE_DEFAULT, TW_HIT_TEST_MODE_DEFAULT)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_MODE_NODE_DATA, TW_HIT_TEST_MODE_NODE_DATA)
+  GLUE_SET_FLAG_TO(res, val, EWK_HIT_TEST_MODE_IMAGE_DATA, TW_HIT_TEST_MODE_IMAGE_DATA)
+  return static_cast<tw::Hit_Test_Mode>(res);
+}
+
+Ewk_Hit_Test_Mode from(tw::Hit_Test_Mode val)
+{
+  GLUE_SET_FLAG_FROM_INIT(res, val, static_cast<Ewk_Hit_Test_Mode>(0), static_cast<tw::Hit_Test_Mode>(0))
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_MODE_DEFAULT, TW_HIT_TEST_MODE_DEFAULT)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_MODE_NODE_DATA, TW_HIT_TEST_MODE_NODE_DATA)
+  GLUE_SET_FLAG_FROM(res, val, EWK_HIT_TEST_MODE_IMAGE_DATA, TW_HIT_TEST_MODE_IMAGE_DATA)
+  return static_cast<Ewk_Hit_Test_Mode>(res);
+}
+
+#if !defined(EWK_BRINGUP)
+tw::View_Hit_Test_Request_Callback to(Ewk_View_Hit_Test_Request_Callback callback)
+{
+  return reinterpret_cast<tw::View_Hit_Test_Request_Callback>(callback);
+}
+#endif
+
+tw::Policy_Decision_Type to(Ewk_Policy_Decision_Type val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_POLICY_DECISION_USE, TW_POLICY_DECISION_USE)
+    GLUE_CAST_TO(EWK_POLICY_DECISION_DOWNLOAD, TW_POLICY_DECISION_DOWNLOAD)
+    GLUE_CAST_TO(EWK_POLICY_DECISION_IGNORE, TW_POLICY_DECISION_IGNORE)
+  GLUE_CAST_END()
+}
+
+Ewk_Policy_Decision_Type from(tw::Policy_Decision_Type val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_POLICY_DECISION_USE, TW_POLICY_DECISION_USE)
+    GLUE_CAST_FROM(EWK_POLICY_DECISION_DOWNLOAD, TW_POLICY_DECISION_DOWNLOAD)
+    GLUE_CAST_FROM(EWK_POLICY_DECISION_IGNORE, TW_POLICY_DECISION_IGNORE)
+  GLUE_CAST_END()
+}
+
+tw::Policy_Navigation_Type to(Ewk_Policy_Navigation_Type val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED, TW_POLICY_NAVIGATION_TYPE_LINK_CLICKED)
+    GLUE_CAST_TO(EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED, TW_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED)
+    GLUE_CAST_TO(EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD, TW_POLICY_NAVIGATION_TYPE_BACK_FORWARD)
+    GLUE_CAST_TO(EWK_POLICY_NAVIGATION_TYPE_RELOAD, TW_POLICY_NAVIGATION_TYPE_RELOAD)
+    GLUE_CAST_TO(EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED, TW_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED)
+    GLUE_CAST_TO(EWK_POLICY_NAVIGATION_TYPE_OTHER, TW_POLICY_NAVIGATION_TYPE_OTHER)
+  GLUE_CAST_END()
+}
+
+Ewk_Policy_Navigation_Type from(tw::Policy_Navigation_Type val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED, TW_POLICY_NAVIGATION_TYPE_LINK_CLICKED)
+    GLUE_CAST_FROM(EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED, TW_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED)
+    GLUE_CAST_FROM(EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD, TW_POLICY_NAVIGATION_TYPE_BACK_FORWARD)
+    GLUE_CAST_FROM(EWK_POLICY_NAVIGATION_TYPE_RELOAD, TW_POLICY_NAVIGATION_TYPE_RELOAD)
+    GLUE_CAST_FROM(EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED, TW_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED)
+    GLUE_CAST_FROM(EWK_POLICY_NAVIGATION_TYPE_OTHER, TW_POLICY_NAVIGATION_TYPE_OTHER)
+  GLUE_CAST_END()
+}
+
+tw::Touch_Event_Type to(Ewk_Touch_Event_Type val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_TOUCH_START, TW_TOUCH_START)
+    GLUE_CAST_TO(EWK_TOUCH_MOVE, TW_TOUCH_MOVE)
+    GLUE_CAST_TO(EWK_TOUCH_END, TW_TOUCH_END)
+    GLUE_CAST_TO(EWK_TOUCH_CANCEL, TW_TOUCH_CANCEL)
+  GLUE_CAST_END()
+}
+
+Ewk_Touch_Event_Type from(tw::Touch_Event_Type val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_TOUCH_START, TW_TOUCH_START)
+    GLUE_CAST_FROM(EWK_TOUCH_MOVE, TW_TOUCH_MOVE)
+    GLUE_CAST_FROM(EWK_TOUCH_END, TW_TOUCH_END)
+    GLUE_CAST_FROM(EWK_TOUCH_CANCEL, TW_TOUCH_CANCEL)
+  GLUE_CAST_END()
+}
+
+tw::Custom_Handlers_State to(Ewk_Custom_Handlers_State val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_CUSTOM_HANDLERS_NEW, TW_CUSTOM_HANDLERS_NEW)
+    GLUE_CAST_TO(EWK_CUSTOM_HANDLERS_REGISTERED, TW_CUSTOM_HANDLERS_REGISTERED)
+    GLUE_CAST_TO(EWK_CUSTOM_HANDLERS_DECLINED, TW_CUSTOM_HANDLERS_DECLINED)
+  GLUE_CAST_END()
+}
+
+
+Ewk_Custom_Handlers_State from(tw::Custom_Handlers_State val)
+{
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_CUSTOM_HANDLERS_NEW, TW_CUSTOM_HANDLERS_NEW)
+    GLUE_CAST_FROM(EWK_CUSTOM_HANDLERS_REGISTERED, TW_CUSTOM_HANDLERS_REGISTERED)
+    GLUE_CAST_FROM(EWK_CUSTOM_HANDLERS_DECLINED, TW_CUSTOM_HANDLERS_DECLINED)
+  GLUE_CAST_END()
+}
+
+tw::Find_Options to(Ewk_Find_Options val)
+{
+  GLUE_SET_FLAG_TO_INIT(res, val, EWK_FIND_OPTIONS_NONE, TW_FIND_OPTIONS_NONE)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_CASE_INSENSITIVE, TW_FIND_OPTIONS_CASE_INSENSITIVE)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_BACKWARDS, TW_FIND_OPTIONS_BACKWARDS)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_AT_WORD_STARTS, TW_FIND_OPTIONS_AT_WORD_STARTS)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, TW_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_WRAP_AROUND, TW_FIND_OPTIONS_WRAP_AROUND)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_SHOW_OVERLAY, TW_FIND_OPTIONS_SHOW_OVERLAY)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR, TW_FIND_OPTIONS_SHOW_FIND_INDICATOR)
+  GLUE_SET_FLAG_TO(res, val, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT, TW_FIND_OPTIONS_SHOW_HIGHLIGHT)
+  return static_cast<tw::Find_Options>(res);
+}
+
+Ewk_Find_Options from(tw::Find_Options val)
+{
+  GLUE_SET_FLAG_FROM_INIT(res, val, EWK_FIND_OPTIONS_NONE, TW_FIND_OPTIONS_NONE)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_CASE_INSENSITIVE, TW_FIND_OPTIONS_CASE_INSENSITIVE)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_BACKWARDS, TW_FIND_OPTIONS_BACKWARDS)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_AT_WORD_STARTS, TW_FIND_OPTIONS_AT_WORD_STARTS)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, TW_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_WRAP_AROUND, TW_FIND_OPTIONS_WRAP_AROUND)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_SHOW_OVERLAY, TW_FIND_OPTIONS_SHOW_OVERLAY)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR, TW_FIND_OPTIONS_SHOW_FIND_INDICATOR)
+  GLUE_SET_FLAG_FROM(res, val, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT, TW_FIND_OPTIONS_SHOW_HIGHLIGHT)
+  return static_cast<Ewk_Find_Options>(res);
+}
+
+tw::ContentSecurityPolicyType to(Ewk_CSP_Header_Type val) {
+  GLUE_CAST_START(val)
+    GLUE_CAST_TO(EWK_REPORT_ONLY, TW_CSP_REPORT_ONLY)
+    GLUE_CAST_TO(EWK_ENFORCE_POLICY, TW_CSP_ENFORCE_POLICY)
+    GLUE_CAST_TO(EWK_DEFAULT_POLICY, TW_CSP_DEFAULT_POLICY)
+  GLUE_CAST_END()
+}
+
+Ewk_CSP_Header_Type from(tw::ContentSecurityPolicyType val) {
+  GLUE_CAST_START(val)
+    GLUE_CAST_FROM(EWK_REPORT_ONLY, TW_CSP_REPORT_ONLY)
+    GLUE_CAST_FROM(EWK_ENFORCE_POLICY, TW_CSP_ENFORCE_POLICY)
+    GLUE_CAST_FROM(EWK_DEFAULT_POLICY, TW_CSP_DEFAULT_POLICY)
+  GLUE_CAST_END()
+}
+
+} // namespace chromium_glue
diff --git a/tizen_src/ewk/efl_integration/private/chromium_glue.h b/tizen_src/ewk/efl_integration/private/chromium_glue.h
new file mode 100644 (file)
index 0000000..27d8cea
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef CHROMIUM_GLUE_H_
+#define CHROMIUM_GLUE_H_
+
+#ifndef __cplusplus
+#error "Don't mix C and C++ in using chromium_glue.h"
+#endif
+
+#include "ewk_context.h"
+#include "ewk_cookie_manager.h"
+#include "ewk_settings.h"
+#include "ewk_hit_test.h"
+#include "ewk_policy_decision.h"
+#include "ewk_touch.h"
+#include "ewk_custom_handlers.h"
+#include "ewk_view.h"
+
+#include <tizen_webview/public/tw_cache_model.h>
+#include <tizen_webview/public/tw_callbacks.h>
+#include <tizen_webview/public/tw_content_security_policy.h>
+#include <tizen_webview/public/tw_cookie_accept_policy.h>
+#include <tizen_webview/public/tw_legacy_font_size_mode.h>
+#include <tizen_webview/public/tw_hit_test.h>
+#include <tizen_webview/public/tw_policy_decision.h>
+#include <tizen_webview/public/tw_touch_event.h>
+#include <tizen_webview/public/tw_custom_handlers.h>
+#include <tizen_webview/public/tw_find_options.h>
+
+namespace chromium_glue {
+
+namespace tw = tizen_webview;
+
+// --- ewk<->chromium type conversion ---
+tw::Cache_Model to  (Ewk_Cache_Model);
+Ewk_Cache_Model from(tw::Cache_Model);
+
+tw::Cookie_Accept_Policy to  (Ewk_Cookie_Accept_Policy);
+Ewk_Cookie_Accept_Policy from(tw::Cookie_Accept_Policy);
+
+tw::Legacy_Font_Size_Mode to(Ewk_Legacy_Font_Size_Mode);
+Ewk_Legacy_Font_Size_Mode from(tw::Legacy_Font_Size_Mode);
+
+
+tw::Hit_Test_Mode to(Ewk_Hit_Test_Mode);
+Ewk_Hit_Test_Mode from(tw::Hit_Test_Mode);
+
+tw::Hit_Test_Result_Context to(Ewk_Hit_Test_Result_Context);
+Ewk_Hit_Test_Result_Context from(tw::Hit_Test_Result_Context);
+
+#if !defined(EWK_BRINGUP)
+tw::View_Hit_Test_Request_Callback to(Ewk_View_Hit_Test_Request_Callback);
+#endif
+
+tw::Policy_Decision_Type to(Ewk_Policy_Decision_Type);
+Ewk_Policy_Decision_Type from(tw::Policy_Decision_Type);
+
+tw::Policy_Navigation_Type to(Ewk_Policy_Navigation_Type);
+Ewk_Policy_Navigation_Type from(tw::Policy_Navigation_Type);
+
+tw::Touch_Event_Type to(Ewk_Touch_Event_Type);
+Ewk_Touch_Event_Type from(tw::Touch_Event_Type);
+
+tw::Custom_Handlers_State to(Ewk_Custom_Handlers_State);
+Ewk_Custom_Handlers_State from(tw::Custom_Handlers_State);
+
+tw::Find_Options to(Ewk_Find_Options);
+Ewk_Find_Options from(tw::Find_Options);
+
+tw::ContentSecurityPolicyType to(Ewk_CSP_Header_Type);
+Ewk_CSP_Header_Type from(tw::ContentSecurityPolicyType);
+
+} // namespace chromium_glue
+
+#endif  // CHROMIUM_GLUE_H_
diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_private.cc b/tizen_src/ewk/efl_integration/private/ewk_context_private.cc
new file mode 100644 (file)
index 0000000..8315801
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_context_private.h"
+
+// Use compiler generated constructor and destructor
+// No significant implementation is required.
diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_private.h b/tizen_src/ewk/efl_integration/private/ewk_context_private.h
new file mode 100644 (file)
index 0000000..719373c
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_context_private_h
+#define ewk_context_private_h
+
+#include <tizen_webview/public/tw_web_context.h>
+
+struct Ewk_Context : public tizen_webview::WebContext {
+};
+
+#endif // ewk_context_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_favicon_database_private.h b/tizen_src/ewk/efl_integration/private/ewk_favicon_database_private.h
new file mode 100644 (file)
index 0000000..aa6208e
--- /dev/null
@@ -0,0 +1,51 @@
+ /* This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
+
+#ifndef ewk_favicon_database_private_h
+#define ewk_favicon_database_private_h
+
+#include <Evas.h>
+
+#include <../impl/browser/favicon/favicon_database.h>
+#include <tizen_webview/public/tw_web_context.h>
+#include "private/ewk_context_private.h"
+
+struct EwkFaviconDatabase {
+ public:
+  EwkFaviconDatabase()
+  :favicon_database(NULL)
+  {
+  }
+
+  ~EwkFaviconDatabase()
+  {
+    if (favicon_database)
+      delete favicon_database;
+    favicon_database = NULL;
+  }
+
+  void InitEwkFaviconDatabase(const Ewk_Context* ewkContext)
+  {
+    if (!favicon_database)
+      favicon_database = const_cast<Ewk_Context*>(ewkContext)->GetFaviconDatabase();
+    return;
+  }
+ private:
+  FaviconDatabase* favicon_database;
+};
+#endif // ewk_favicon_database_private_h
+#endif
\ No newline at end of file
diff --git a/tizen_src/ewk/efl_integration/private/ewk_history_private.cc b/tizen_src/ewk/efl_integration/private/ewk_history_private.cc
new file mode 100644 (file)
index 0000000..cd49b9e
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_history_private.h"
+
+#if !defined(EWK_BRINGUP)
+
+_Ewk_History *chromium_glue::from(tizen_webview::BackForwardList *list) {
+  return static_cast<_Ewk_History *>(list);
+}
+
+_Ewk_History_Item *chromium_glue::from(tizen_webview::BackForwardListItem *item) {
+  return static_cast<_Ewk_History_Item *>(item);
+}
+
+#endif
diff --git a/tizen_src/ewk/efl_integration/private/ewk_history_private.h b/tizen_src/ewk/efl_integration/private/ewk_history_private.h
new file mode 100644 (file)
index 0000000..45d1d3e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EWK_HISTORY_PRIVATE_H
+#define EWK_HISTORY_PRIVATE_H
+
+#if !defined(EWK_BRINGUP)
+
+#include <tizen_webview/public/tw_back_forward_list.h>
+
+struct _Ewk_History : public tizen_webview::BackForwardList {
+};
+
+struct _Ewk_History_Item : public tizen_webview::BackForwardListItem {
+};
+
+namespace chromium_glue {
+
+_Ewk_History *from(tizen_webview::BackForwardList *);
+_Ewk_History_Item *from(tizen_webview::BackForwardListItem *);
+
+}
+
+#endif // EWK_BRINGUP
+#endif // EWK_HISTORY_PRIVATE_H
diff --git a/tizen_src/ewk/efl_integration/private/ewk_hit_test_private.cc b/tizen_src/ewk/efl_integration/private/ewk_hit_test_private.cc
new file mode 100644 (file)
index 0000000..5740e24
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_hit_test_private.h"
+
+
+// Use compiler generated constructor and destructor
+// No significant implementation is required.
+
+Ewk_Hit_Test* chromium_glue::from(tizen_webview::Hit_Test* val) {
+  // Down-casting to Ewk_Hit_Test is alright because it is the only class
+  // that inherits tizen_webview::Hit_Test
+  return static_cast<Ewk_Hit_Test*>(val);
+}
diff --git a/tizen_src/ewk/efl_integration/private/ewk_hit_test_private.h b/tizen_src/ewk/efl_integration/private/ewk_hit_test_private.h
new file mode 100644 (file)
index 0000000..e32371c
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_hit_test_private_h
+#define ewk_hit_test_private_h
+
+#include <tizen_webview/public/tw_hit_test.h>
+
+struct Ewk_Hit_Test : public tizen_webview::Hit_Test {
+};
+
+namespace chromium_glue {
+  Ewk_Hit_Test* from(tizen_webview::Hit_Test*);
+}
+
+#endif // ewk_hit_test_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_notification_private.cc b/tizen_src/ewk/efl_integration/private/ewk_notification_private.cc
new file mode 100644 (file)
index 0000000..8605fb4
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_notification_private.h"
+
+
+// Use compiler generated constructor and destructor
+// No significant implementation is required.
+
+Ewk_Notification* chromium_glue::from(tizen_webview::Notification* val) {
+  // Down-casting is safe because it is the only class that inherits
+  // tizen_webview::Notification
+  return static_cast<Ewk_Notification*>(val);
+}
diff --git a/tizen_src/ewk/efl_integration/private/ewk_notification_private.h b/tizen_src/ewk/efl_integration/private/ewk_notification_private.h
new file mode 100644 (file)
index 0000000..7c60a29
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_notification_private_h
+#define ewk_notification_private_h
+
+#include <tizen_webview/public/tw_notification.h>
+
+struct Ewk_Notification : public tizen_webview::Notification {
+};
+
+struct Ewk_Notification_Permission_Request
+    : public tizen_webview::NotificationPermissionRequest {
+};
+
+namespace chromium_glue {
+  Ewk_Notification* from(tizen_webview::Notification*);
+
+  //tizen_webview::NotificationPermissionRequest* to(tizen_webview::Notification*);
+}
+
+#endif // ewk_notification_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.cc b/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.cc
new file mode 100644 (file)
index 0000000..d8ef816
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_policy_decision_private.h"
+
+// Use compiler generated constructor and destructor
+// No significant implementation is required.
diff --git a/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h b/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h
new file mode 100644 (file)
index 0000000..129da86
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_policy_decision_private_h
+#define ewk_policy_decision_private_h
+
+#include <tizen_webview/public/tw_policy_decision.h>
+
+struct Ewk_Policy_Decision : public tizen_webview::PolicyDecision {
+};
+
+#endif // ewk_policy_decision_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_private.h b/tizen_src/ewk/efl_integration/private/ewk_private.h
new file mode 100644 (file)
index 0000000..374c790
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_private_h
+#define ewk_private_h
+
+#include "public/ewk_export.h"
+
+#define COMPILE_ASSERT_MATCHING_ENUM(ewkName, webcoreName) \
+        COMPILE_ASSERT(int(ewkName) == int(webcoreName), mismatchingEnums)
+
+// Temporarily added in order to track not-yet-implemented ewk api calls. 
+#include <stdio.h>
+#define LOG_EWK_API_MOCKUP(msg, ...) printf("[EWK_API_MOCKUP] %s:%d %s ", __FILE__, __LINE__, __PRETTY_FUNCTION__); printf(msg "\n", ##__VA_ARGS__)
+#endif
diff --git a/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.cc b/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.cc
new file mode 100644 (file)
index 0000000..649fd0f
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_quota_permission_request_private.h"
+
diff --git a/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h b/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h
new file mode 100644 (file)
index 0000000..f186baa
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_quota_permission_request_private_h
+#define ewk_quota_permission_request_private_h
+
+#if !defined(EWK_BRINGUP)
+
+#include <tizen_webview/public/tw_quota_permission_request.h>
+
+// chromium-efl implementation for _Ewk_Quota_Permission_Request
+struct _Ewk_Quota_Permission_Request : public tizen_webview::Quota_Permission_Request {
+};
+
+#endif // EWK_BRINGUP
+#endif // ewk_quota_permission_request_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_security_origin_private.cc b/tizen_src/ewk/efl_integration/private/ewk_security_origin_private.cc
new file mode 100644 (file)
index 0000000..3369710
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_security_origin_private.h"
+
diff --git a/tizen_src/ewk/efl_integration/private/ewk_security_origin_private.h b/tizen_src/ewk/efl_integration/private/ewk_security_origin_private.h
new file mode 100644 (file)
index 0000000..3fa9d3f
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_security_origin_private_h
+#define ewk_security_origin_private_h
+
+#include <tizen_webview/public/tw_security_origin.h>
+
+// chromium-efl implementation for _Ewk_Security_Origin
+struct _Ewk_Security_Origin : tizen_webview::Security_Origin
+{
+};
+
+#endif // ewk_security_origin_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_view_private.cc b/tizen_src/ewk/efl_integration/private/ewk_view_private.cc
new file mode 100644 (file)
index 0000000..a0ff384
--- /dev/null
@@ -0,0 +1,403 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_view_private.h"
+#include <cassert>
+#include <tizen_webview/public/tw_webview_delegate.h>
+#include <tizen_webview/public/tw_webview_evas_event_handler.h>
+#include "private/ewk_context_private.h"
+#include "private/webview_delegate_ewk.h"
+
+//TODO: remove below header dependency
+#include "../impl/eweb_view.h"
+
+using tizen_webview::WebView;
+using tizen_webview::WebViewDelegate;
+
+// -------- EwkViewImpl
+struct EwkViewImpl  {
+  explicit EwkViewImpl(tizen_webview::WebView* wv) : wv_(wv) {}
+  ~EwkViewImpl() { tizen_webview::WebView::Delete(wv_); }
+  tizen_webview::WebView* GetTizenWebView() { return wv_; }
+  const tizen_webview::WebView* GetTizenWebView() const { return wv_; }
+ private:
+  tizen_webview::WebView* wv_;
+  DISALLOW_COPY_AND_ASSIGN(EwkViewImpl);
+};
+
+Evas_Smart_Class parent_smart_class_ = EVAS_SMART_CLASS_INIT_NULL;
+
+namespace {
+
+Evas_Smart* DefaultSmartClassInstance()
+{
+  static Ewk_View_Smart_Class api = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(EwkViewSmartClassName);
+  static Evas_Smart* smart = 0;
+  if (!smart) {
+    InitSmartClassInterface(api);
+    smart = evas_smart_class_new(&api.sc);
+  }
+
+  return smart;
+}
+
+void SmartDataChanged(Ewk_View_Smart_Data* d)
+{
+  assert(d);
+  if (d->changed.any)
+    return;
+  d->changed.any = true;
+  evas_object_smart_changed(d->self);
+}
+
+// Evas_Smart_Class callback interface:
+void handleEvasObjectAdd(Evas_Object* evas_object)
+{
+  const Evas_Smart* smart = evas_object_smart_smart_get(evas_object);
+  const Evas_Smart_Class* smart_class = evas_smart_class_get(smart);
+  const Ewk_View_Smart_Class* api = reinterpret_cast<const Ewk_View_Smart_Class*>(smart_class);
+  assert(api);
+
+  Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(evas_object);
+
+  if (!d) {
+    // Allocating with 'calloc' as the API contract is that it should be deleted with 'free()'.
+    d = static_cast<Ewk_View_Smart_Data*>(calloc(1, sizeof(Ewk_View_Smart_Data)));
+    evas_object_smart_data_set(evas_object, d);
+  }
+  d->self = evas_object;
+  d->api = api;
+
+  parent_smart_class_.add(evas_object);
+
+  d->priv = 0; // Will be initialized later.
+
+  // Create evas_object_image to draw web contents.
+  d->image = evas_object_image_add(d->base.evas);
+  evas_object_image_alpha_set(d->image, false);
+  evas_object_image_filled_set(d->image, true);
+  evas_object_smart_member_add(d->image, evas_object);
+  evas_object_show(d->image);
+}
+
+// Ewk_View_Smart_Class callback interface:
+void handleEvasObjectDelete(Evas_Object* evas_object)
+{
+  Ewk_View_Smart_Data* smart_data = GetEwkViewSmartDataFromEvasObject(evas_object);
+  if (smart_data) {
+    delete smart_data->priv;
+    smart_data->priv = NULL;
+  }
+  parent_smart_class_.del(evas_object);
+}
+
+void handleEvasObjectShow(Evas_Object* o)
+{
+  Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
+  WebView* wv = GetWebViewFromSmartData(d);
+  if (!wv) {
+    return;
+  }
+  // WebKit bails here if widget accelerated compositing is used.
+  // TODO: consider this when we will have AC support.
+  if (evas_object_clipees_get(d->base.clipper))
+    evas_object_show(d->base.clipper);
+  evas_object_show(d->image);
+  wv->HandleShow();
+}
+
+void handleEvasObjectHide(Evas_Object* o)
+{
+  Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
+  WebView* wv = GetWebViewFromSmartData(d);
+  if (!wv) {
+    return;
+  }
+  evas_object_hide(d->base.clipper);
+  evas_object_hide(d->image);
+  // Deleting view by app results in calling hide method.
+  // We assert that, RWHV is null only when renderer has crashed.
+  /*if (!ToEWebView(d)->rwhv()) {
+     DLOG_ASSERT is used because it is controlled by NDEBUG
+    DLOG_ASSERT(ToEWebView(d)->renderer_crashed_);
+    return;
+  }*/
+  wv->HandleHide();
+}
+
+void handleEvasObjectMove(Evas_Object* o, Evas_Coord x, Evas_Coord y)
+{
+  Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
+  WebView* wv = GetWebViewFromSmartData(d);
+  if (!wv) {
+    return;
+  }
+  evas_object_move(d->image, x, y);
+  wv->HandleMove(x, y);
+  SmartDataChanged(d);
+}
+
+void handleEvasObjectResize(Evas_Object* o, Evas_Coord width, Evas_Coord height)
+{
+  Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
+  WebView* wv = GetWebViewFromSmartData(d);
+  if (!wv) {
+    return;
+  }
+  evas_object_resize(d->image, width, height);
+  evas_object_image_size_set(d->image, width, height);
+  evas_object_image_fill_set(d->image, 0, 0, width, height);
+  d->view.w = width;
+  d->view.h = height;
+  wv->HandleResize(width, height);
+  SmartDataChanged(d);
+}
+
+void handleEvasObjectCalculate(Evas_Object* o)
+{
+  Ewk_View_Smart_Data* d = GetEwkViewSmartDataFromEvasObject(o);
+  WebView* wv = GetWebViewFromSmartData(d);
+  if (!wv) {
+    return;
+  }
+  Evas_Coord x, y, width, height;
+  evas_object_geometry_get(o, &x, &y, &width, &height);
+  d->view.x = x;
+  d->view.y = y;
+  d->view.w = width;
+  d->view.h = height;
+}
+
+void handleEvasObjectColorSet(Evas_Object*, int red, int green, int blue, int alpha)
+{
+  // FIXME: implement.
+}
+
+Eina_Bool handleFocusIn(Ewk_View_Smart_Data* d)
+{
+  WebView* wv = GetWebViewFromSmartData(d);
+  if (!wv) {
+    return false;
+  }
+  tizen_webview::WebViewEvasEventHandler* wv_handler = wv->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_FocusIn() : false;
+}
+
+Eina_Bool handleFocusOut(Ewk_View_Smart_Data* d)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_FocusOut() : false;
+}
+
+Eina_Bool handleMouseWheel(Ewk_View_Smart_Data* d, const Evas_Event_Mouse_Wheel* event)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_MouseWheel(event) : false;
+}
+
+Eina_Bool handleMouseDown(Ewk_View_Smart_Data* d, const Evas_Event_Mouse_Down* event)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ?  wv_handler->HandleEventDefault_MouseDown(event) : false;
+}
+
+Eina_Bool handleMouseUp(Ewk_View_Smart_Data* d, const Evas_Event_Mouse_Up* event)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_MouseUp(event) : false;
+}
+
+Eina_Bool handleMouseMove(Ewk_View_Smart_Data* d, const Evas_Event_Mouse_Move* event)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_MouseMove(event) : false;
+}
+
+Eina_Bool handleKeyDown(Ewk_View_Smart_Data* d, const Evas_Event_Key_Down* event)
+{
+   tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_KeyDown(event) : false;
+}
+
+Eina_Bool handleKeyUp(Ewk_View_Smart_Data* d, const Evas_Event_Key_Up* event)
+{
+   tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_KeyUp(event) : false;
+}
+
+Eina_Bool handleTextSelectionDown(Ewk_View_Smart_Data* d, int x, int y)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_TextSelectionDown(x, y) : false;
+}
+
+Eina_Bool handleTextSelectionUp(Ewk_View_Smart_Data* d, int x, int y)
+{
+  tizen_webview::WebViewEvasEventHandler* wv_handler =
+      GetWebViewFromSmartData(d)->GetEvasEventHandler();
+  return wv_handler ? wv_handler->HandleEventDefault_TextSelectionUp(x, y) : false;
+}
+
+
+unsigned long long handleExceededDatabaseQuota(Ewk_View_Smart_Data *sd, const char *databaseName, const char *displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage)
+{
+  // Chromium does not support quota per origin right now, this API can't be implemented
+  NOTIMPLEMENTED();
+  return EINA_FALSE;
+}
+
+} // namespace
+
+
+// --------- public API --------------
+
+bool IsWebViewObject(const Evas_Object* evas_object)
+{
+  if (!evas_object) {
+    return false;
+  }
+
+  const char* object_type = evas_object_type_get(evas_object);
+  const Evas_Smart* evas_smart = evas_object_smart_smart_get(evas_object);
+  if (!evas_smart) {
+    EINA_LOG_CRIT("%p (%s) is not a smart object!", evas_object,
+                  object_type ? object_type : "(null)");
+    return false;
+  }
+
+  const Evas_Smart_Class* smart_class = evas_smart_class_get(evas_smart);
+  if (!smart_class) {
+    EINA_LOG_CRIT("%p (%s) is not a smart class object!", evas_object,
+                  object_type ? object_type : "(null)");
+    return false;
+  }
+
+  if (smart_class->data != EwkViewSmartClassName) {
+    EINA_LOG_CRIT("%p (%s) is not of an ewk_view (need %p, got %p)!",
+                  evas_object, object_type ? object_type : "(null)",
+                  EwkViewSmartClassName, smart_class->data);
+    return false;
+  }
+  return true;
+}
+
+Ewk_View_Smart_Data* GetEwkViewSmartDataFromEvasObject(const Evas_Object* evas_object)
+{
+  assert(evas_object);
+  assert(IsWebViewObject(evas_object));
+  return static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(evas_object));
+}
+
+Ewk_View_Smart_Data* GetEwkViewSmartDataFromWebView(tizen_webview::WebView* wv) {
+  assert(wv);
+  return GetEwkViewSmartDataFromEvasObject(wv->AsEvasObject());
+}
+
+WebView* GetWebViewFromSmartData(const Ewk_View_Smart_Data* smartData)
+{
+  if (smartData && smartData->priv) {
+    return smartData->priv->GetTizenWebView();
+  }
+  return NULL;
+}
+
+WebView* GetWebViewFromEvasObject(const Evas_Object* eo) {
+  if (!IsWebViewObject(eo)) {
+    return NULL;
+  }
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(eo);
+  return GetWebViewFromSmartData(sd);
+}
+
+Evas_Object* CreateWebViewAsEvasObject(Ewk_Context* context,
+                                       Evas* canvas,
+                                       Evas_Smart* smart /*= 0*/) {
+  if(!WebViewDelegate::IsDelegateRegistered()) {
+    WebViewDelegate::RegisterDelegate(
+      const_cast<WebViewDelegateEwk*>(&WebViewDelegateEwk::GetInstance()));
+  }
+
+  smart = smart ? smart : DefaultSmartClassInstance();
+  Evas_Object* wv_evas_object = evas_object_smart_add(canvas, smart);
+  WebView* view = WebView::Create(context, wv_evas_object);
+  if (!view) {
+    return NULL;
+  }
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv_evas_object);
+  if (!sd) {
+    WebView::Delete(view);
+    return NULL;
+  }
+  // attach webview as a member of smart data
+  sd->priv = new EwkViewImpl(view);
+  view->Initialize();
+  return wv_evas_object;
+}
+
+
+bool InitSmartClassInterface(Ewk_View_Smart_Class& api)
+{
+  if (api.version != EWK_VIEW_SMART_CLASS_VERSION) {
+    EINA_LOG_CRIT("Ewk_View_Smart_Class %p is version %lu while %lu was expected.",
+                  &api, api.version, EWK_VIEW_SMART_CLASS_VERSION);
+    return false;
+  }
+
+  if (!parent_smart_class_.add)
+    evas_object_smart_clipped_smart_set(&parent_smart_class_);
+
+  evas_object_smart_clipped_smart_set(&api.sc);
+
+  // Set Evas_Smart_Class callbacks.
+  api.sc.add = &handleEvasObjectAdd;
+  api.sc.del = &handleEvasObjectDelete;
+  api.sc.move = &handleEvasObjectMove;
+  api.sc.resize = &handleEvasObjectResize;
+  api.sc.show = &handleEvasObjectShow;
+  api.sc.hide = &handleEvasObjectHide;
+  api.sc.calculate = &handleEvasObjectCalculate;
+  api.sc.color_set = &handleEvasObjectColorSet;
+
+  // Set Ewk_View_Smart_Class callbacks.
+  api.focus_in = &handleFocusIn;
+  api.focus_out = &handleFocusOut;
+  api.mouse_down = &handleMouseDown;
+  api.mouse_up = &handleMouseUp;
+  api.mouse_wheel = &handleMouseWheel;
+  api.mouse_move = &handleMouseMove;
+  api.key_down = &handleKeyDown;
+  api.key_up = &handleKeyUp;
+  api.text_selection_down = &handleTextSelectionDown;
+  api.text_selection_up = &handleTextSelectionUp;
+
+  api.exceeded_database_quota = &handleExceededDatabaseQuota;
+
+  // Type identifier.
+  api.sc.data = EwkViewSmartClassName;
+
+  return true;
+}
diff --git a/tizen_src/ewk/efl_integration/private/ewk_view_private.h b/tizen_src/ewk/efl_integration/private/ewk_view_private.h
new file mode 100644 (file)
index 0000000..701cccb
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_view_private_h
+#define ewk_view_private_h
+
+#include <Evas.h>
+#include "ewk_view.h"
+#include <tizen_webview/public/tw_webview.h>
+
+class Ewk_Context;
+
+// Create WebView Evas Object
+Evas_Object* CreateWebViewAsEvasObject(Ewk_Context* context, Evas* canvas, Evas_Smart* smart = 0);
+bool InitSmartClassInterface(Ewk_View_Smart_Class& api);
+
+// EwkView's Smart Class Name
+const char EwkViewSmartClassName[] = "EWebView";
+
+// type conversion utility
+bool IsWebViewObject(const Evas_Object* evas_object);
+Ewk_View_Smart_Data* GetEwkViewSmartDataFromEvasObject(const Evas_Object* evas_object);
+Ewk_View_Smart_Data* GetEwkViewSmartDataFromWebView(tizen_webview::WebView* wv);
+tizen_webview::WebView* GetWebViewFromSmartData(const Ewk_View_Smart_Data* smartData);
+tizen_webview::WebView* GetWebViewFromEvasObject(const Evas_Object* eo);
+
+// helper macro
+#define EWK_VIEW_IMPL_GET_OR_RETURN(evas_object, impl, ...)               \
+  tizen_webview::WebView* impl = GetWebViewFromEvasObject(evas_object);   \
+  do {                                                                    \
+    if (!impl) {                                                          \
+      EINA_LOG_CRIT("Evas Object %p is not Ewk WebView", evas_object);    \
+      return __VA_ARGS__;                                                 \
+    }                                                                     \
+  } while (0)
+
+#endif // ewk_view_private_h
diff --git a/tizen_src/ewk/efl_integration/private/ewk_wrt_private.cc b/tizen_src/ewk/efl_integration/private/ewk_wrt_private.cc
new file mode 100644 (file)
index 0000000..5508f17
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_wrt_private.h"
+
+// Use compiler generated constructor and destructor
+// No significant implementation is required.
diff --git a/tizen_src/ewk/efl_integration/private/ewk_wrt_private.h b/tizen_src/ewk/efl_integration/private/ewk_wrt_private.h
new file mode 100644 (file)
index 0000000..01d5a0c
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EWK_WRT_PRIVATE_H
+#define EWK_WRT_PRIVATE_H
+
+#include <tizen_webview/public/tw_wrt.h>
+
+struct Ewk_Wrt_Message_Data : public tizen_webview::WrtIpcMessageData {
+};
+
+#endif // EWK_WRT_PRIVATE_H
diff --git a/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc b/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc
new file mode 100644 (file)
index 0000000..87d7cd1
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "webview_delegate_ewk.h"
+#include <cassert>
+#include "public/ewk_view.h"
+#include "private/ewk_view_private.h"
+
+// static
+const WebViewDelegateEwk& WebViewDelegateEwk::GetInstance() {
+  static WebViewDelegateEwk instance;
+  return instance;
+}
+
+tizen_webview::WebView* WebViewDelegateEwk::GetWebViewFromEvasObject(
+    Evas_Object* evas_object) {
+  return ::GetWebViewFromEvasObject(evas_object);
+}
+
+bool WebViewDelegateEwk::IsWebViewEvasObject(Evas_Object* evas_object) {
+  return ::IsWebViewObject(evas_object);
+}
+
+Evas_Object* WebViewDelegateEwk::GetContentImageEvasObject(
+    Evas_Object* evas_object) {
+  if (!WebViewDelegateEwk::IsWebViewEvasObject(evas_object)) {
+    return NULL;
+  }
+  return GetEwkViewSmartDataFromEvasObject(evas_object)->image;
+}
+
+Evas_Object_Smart_Clipped_Data* WebViewDelegateEwk::GetSmartClippedData(
+    Evas_Object* evas_object) {
+  if (!WebViewDelegateEwk::IsWebViewEvasObject(evas_object)) {
+    return NULL;
+  }
+  return &GetEwkViewSmartDataFromEvasObject(evas_object)->base;
+}
+
+Eina_Rectangle WebViewDelegateEwk::GetLastUsedViewPortArea(
+    Evas_Object* evas_object) {
+  Eina_Rectangle result = {-1, -1, -1, -1};
+  if (WebViewDelegateEwk::IsWebViewEvasObject(evas_object)) {
+    Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(evas_object);
+    assert(sd);
+    result.x = sd->view.x;
+    result.y = sd->view.y;
+    result.w = sd->view.w;
+    result.h = sd->view.h;
+  }
+  return result;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_FocusIn(WebView* wv) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->focus_in) {
+    sd->api->focus_in(sd);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_FocusOut(WebView* wv) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->focus_out) {
+    sd->api->focus_out(sd);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_MouseUp(WebView* wv,
+    Evas_Event_Mouse_Up* event_info) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->mouse_up) {
+    sd->api->mouse_up(sd, event_info);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_MouseDown(WebView* wv,
+    Evas_Event_Mouse_Down* event_info) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->mouse_down) {
+    sd->api->mouse_down(sd, event_info);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_MouseMove(WebView* wv,
+    Evas_Event_Mouse_Move* event_info) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->mouse_move) {
+    sd->api->mouse_move(sd, event_info);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_MouseWheel(WebView* wv,
+    Evas_Event_Mouse_Wheel* event_info) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->mouse_wheel) {
+    sd->api->mouse_wheel(sd, event_info);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_KeyUp(WebView* wv,
+    Evas_Event_Key_Up* event_info) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->key_up) {
+    sd->api->key_up(sd, event_info);
+    return true;
+  }
+  return false;
+}
+
+bool WebViewDelegateEwk::RequestHandleEvent_KeyDown(WebView* wv,
+    Evas_Event_Key_Down* event_info) {
+  Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromWebView(wv);
+  if (sd && sd->api && sd->api->key_down) {
+    sd->api->key_down(sd, event_info);
+    return true;
+  }
+  return false;
+}
diff --git a/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h b/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h
new file mode 100644 (file)
index 0000000..4c4fd6d
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef webview_delegate_ewk_h
+#define webview_delegate_ewk_h
+
+#include <Evas.h>
+#include <tizen_webview/public/tw_webview.h>
+#include <tizen_webview/public/tw_webview_delegate.h>
+
+using tizen_webview::WebView;
+using tizen_webview::WebViewDelegate;
+
+struct WebViewDelegateEwk : public WebViewDelegate {
+ public:
+  static const WebViewDelegateEwk& GetInstance();
+ protected:
+  WebView* GetWebViewFromEvasObject(Evas_Object* evas_object);
+  bool IsWebViewEvasObject(Evas_Object* evas_object);
+  Evas_Object* GetContentImageEvasObject(Evas_Object* evas_object);
+  Evas_Object_Smart_Clipped_Data* GetSmartClippedData(Evas_Object* evas_object);
+  Eina_Rectangle GetLastUsedViewPortArea(Evas_Object* evas_object);
+
+  // Event handlers
+  bool RequestHandleEvent_FocusIn(WebView* wv);
+  bool RequestHandleEvent_FocusOut(WebView* wv);
+  bool RequestHandleEvent_MouseUp(WebView* wv, Evas_Event_Mouse_Up* event_info);
+  bool RequestHandleEvent_MouseDown(WebView* wv, Evas_Event_Mouse_Down* event_info);
+  bool RequestHandleEvent_MouseMove(WebView* wv, Evas_Event_Mouse_Move* event_info);
+  bool RequestHandleEvent_MouseWheel(WebView* wv, Evas_Event_Mouse_Wheel* event_info);
+  bool RequestHandleEvent_KeyUp(WebView* wv, Evas_Event_Key_Up* event_info);
+  bool RequestHandleEvent_KeyDown(WebView* wv, Evas_Event_Key_Down* event_info);
+ private:
+  WebViewDelegateEwk() {}
+  DISALLOW_COPY_AND_ASSIGN(WebViewDelegateEwk);
+};
+
+
+#endif // webview_delegate_ewk_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_application_cache_manager.cc b/tizen_src/ewk/efl_integration/public/ewk_application_cache_manager.cc
new file mode 100755 (executable)
index 0000000..4e62c54
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_application_cache_manager.h"
+#include "private/ewk_private.h"
+#include "ewk_context.h"
+
+Eina_Bool ewk_application_cache_manager_clear(Ewk_Application_Cache_Manager* manager)
+{
+#if defined(OS_TIZEN_TV)
+  return ewk_context_application_cache_delete_all(ewk_context_default_get());
+#else
+  return EINA_FALSE;
+#endif // OS_TIZEN_TV
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_application_cache_manager.h b/tizen_src/ewk/efl_integration/public/ewk_application_cache_manager.h
new file mode 100644 (file)
index 0000000..542a7d8
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_application_cache_manager.h
+ * @brief   Describes the Ewk Application Cache Manager API.
+ */
+
+#ifndef ewk_application_cache_manager_h
+#define ewk_application_cache_manager_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for Ewk_Application_Cache_Manager */
+typedef struct EwkApplicationCacheManager Ewk_Application_Cache_Manager;
+
+/**
+ * Deletes all web application caches.
+ *
+ * @param manager Ewk_Application_Cache_Manager object
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA FALSE on failure
+ */
+EAPI Eina_Bool ewk_application_cache_manager_clear(Ewk_Application_Cache_Manager *manager);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_application_cache_manager_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_auth_challenge.cc b/tizen_src/ewk/efl_integration/public/ewk_auth_challenge.cc
new file mode 100644 (file)
index 0000000..f30c034
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+
+#include "ewk_auth_challenge.h"
+
+#include <../impl/API/ewk_auth_challenge_private.h>
+
+void ewkAuthChallengeDelete(Ewk_Auth_Challenge* authChallenge)
+{
+  delete authChallenge;
+}
+
+bool ewkAuthChallengeDecided(Ewk_Auth_Challenge* authChallenge)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(authChallenge, false);
+  return authChallenge->is_decided;
+}
+
+bool ewkAuthChallengeSuspended(Ewk_Auth_Challenge* authChallenge)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(authChallenge, false);
+  return authChallenge->is_suspended;
+}
+
+const char* ewk_auth_challenge_realm_get(Ewk_Auth_Challenge* authChallenge)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(authChallenge, 0);
+  return authChallenge->realm.c_str();
+}
+
+const char* ewk_auth_challenge_url_get(Ewk_Auth_Challenge* authChallenge)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(authChallenge, 0);
+  return authChallenge->url.c_str();
+}
+
+void ewk_auth_challenge_suspend(Ewk_Auth_Challenge* authChallenge)
+{
+  EINA_SAFETY_ON_NULL_RETURN(authChallenge);
+  authChallenge->is_suspended = true;
+}
+
+void ewk_auth_challenge_credential_use(Ewk_Auth_Challenge* authChallenge, const char* user, const char* password)
+{
+  EINA_SAFETY_ON_NULL_RETURN(authChallenge);
+  EINA_SAFETY_ON_NULL_RETURN(user);
+  EINA_SAFETY_ON_NULL_RETURN(password);
+
+  authChallenge->is_decided = true;
+  authChallenge->login_delegate->Proceed(user, password);
+}
+
+void ewk_auth_challenge_credential_cancel(Ewk_Auth_Challenge* authChallenge)
+{
+  EINA_SAFETY_ON_NULL_RETURN(authChallenge);
+  authChallenge->is_decided = true;
+  authChallenge->login_delegate->Cancel();
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_auth_challenge.h b/tizen_src/ewk/efl_integration/public/ewk_auth_challenge.h
new file mode 100644 (file)
index 0000000..4f066f9
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_auth_challenge.h
+ * @brief   Describes the authentication challenge API.
+ */
+
+#ifndef ewk_auth_challenge_h
+#define ewk_auth_challenge_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for _Ewk_Auth_Challenge */
+typedef struct _Ewk_Auth_Challenge Ewk_Auth_Challenge;
+
+/**
+ * Gets the realm string of authentication challenge received from "authentication,challenge" evas object smart callback.
+ *
+ * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
+ * @return the realm of authentication challenge on success, @c 0 otherwise
+ *
+ */
+EAPI const char* ewk_auth_challenge_realm_get(Ewk_Auth_Challenge* auth_challenge);
+
+/**
+ * Gets the url string of authentication challenge received from "authentication,challenge" evas object smart callback.
+ *
+ * @param auth_challenge authentication challenge request instance received from "authentication,challenge" evas object smart callback.
+ * @return the url of authentication challenge on success, @c 0 otherwise
+ *
+ */
+EAPI const char* ewk_auth_challenge_url_get(Ewk_Auth_Challenge* auth_challenge);
+
+/**
+ * Suspend the operation for authentication challenge.
+ *
+ * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
+ *
+ */
+EAPI void ewk_auth_challenge_suspend(Ewk_Auth_Challenge* auth_challenge);
+
+/**
+ *  If user select ok, send credential for authentication challenge from user input.
+ *
+ * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
+ * @param user user id from user input.
+ * @param password user password from user input.
+ *
+ */
+EAPI void ewk_auth_challenge_credential_use(Ewk_Auth_Challenge* auth_challenge, const char* user, const char* password);
+
+/**
+ *  If user select cancel, send cancellation notification for authentication challenge.
+ *
+ * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
+ *
+ */
+EAPI void ewk_auth_challenge_credential_cancel(Ewk_Auth_Challenge* auth_challenge);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_auth_challenge_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_auth_request.cc b/tizen_src/ewk/efl_integration/public/ewk_auth_request.cc
new file mode 100644 (file)
index 0000000..917e675
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_auth_request.h"
+#include "private/ewk_private.h"
+
+#include <../impl/API/ewk_auth_challenge_private.h>
+
+Eina_Bool ewk_auth_request_authenticate(Ewk_Auth_Request* request, const char* username, const char* password)
+{
+#if defined(OS_TIZEN_TV)
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(username, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(password, false);
+  request->is_decided = true;
+  request->login_delegate->Proceed(username, password);
+  return true;
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+  return false;
+#endif
+}
+
+Eina_Bool ewk_auth_request_cancel(Ewk_Auth_Request* request)
+{
+#if defined(OS_TIZEN_TV)
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, false);
+  request->is_decided = true;
+  request->login_delegate->Cancel();
+  return true;
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+  return false;
+#endif
+}
+
+const char* ewk_auth_request_realm_get(const Ewk_Auth_Request* request)
+{
+#if defined(OS_TIZEN_TV)
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+  return request->realm.c_str();
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+  return NULL;
+#endif
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_auth_request.h b/tizen_src/ewk/efl_integration/public/ewk_auth_request.h
new file mode 100644 (file)
index 0000000..a41edd8
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_auth_request.h
+ * @brief   Describes the Ewk Authentication Request API.
+ */
+
+#ifndef ewk_auth_request_h
+#define ewk_auth_request_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for _Ewk_Auth_Challenge */
+typedef struct _Ewk_Auth_Challenge Ewk_Auth_Request;
+
+/**
+ * Set credential for the authentication request.
+ *
+ * @param request request object to update
+ *
+ * @return @c EINA_TRUE if the credential was successfuly sent, @c EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool ewk_auth_request_authenticate(Ewk_Auth_Request *request, const char *username, const char *password);
+
+/**
+ * Cancels the authentication request.
+ *
+ * @param request request object to cancel
+ *
+ * @return @c EINA_TRUE if successful, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_auth_request_cancel(Ewk_Auth_Request *request);
+
+/**
+ * Queries the authentication realm.
+ *
+ * @param request request object to query
+ *
+ * @return the realm pointer, that may be @c NULL. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup()
+ */
+EAPI const char *ewk_auth_request_realm_get(const Ewk_Auth_Request *request);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ewk_auth_request_h */
diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.cc
new file mode 100644 (file)
index 0000000..0793f52
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_autofill_profile.h"
+
+// TODO: remove dependency
+#include <../impl/API/ewk_autofill_profile_private.h>
+
+#include "private/ewk_private.h"
+
+Ewk_Autofill_Profile* ewk_autofill_profile_new()
+{
+  return new(std::nothrow) Ewk_Autofill_Profile();
+}
+
+void ewk_autofill_profile_delete(Ewk_Autofill_Profile* profile)
+{
+  EINA_SAFETY_ON_NULL_RETURN(profile);
+  delete profile;
+}
+
+void ewk_autofill_profile_data_set(Ewk_Autofill_Profile* profile,
+    Ewk_Autofill_Profile_Data_Type name, const char* value)
+{
+  EINA_SAFETY_ON_NULL_RETURN(profile);
+  profile->setData(DataType(name), value);
+}
+
+unsigned ewk_autofill_profile_id_get(Ewk_Autofill_Profile* profile)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(profile, 0);
+  return profile->getProfileID();
+}
+
+const char* ewk_autofill_profile_data_get(Ewk_Autofill_Profile* profile,
+    Ewk_Autofill_Profile_Data_Type name)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(profile, 0);
+  return (profile->getData(DataType(name)).empty()) ?
+          NULL : profile->getData(DataType(name)).c_str();
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h
new file mode 100644 (file)
index 0000000..7fe9e60
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_autofill_profile.h
+ * @brief   Describes the Ewk autofill profile APIs.
+ */
+
+#ifndef ewk_autofill_profile_h
+#define ewk_autofill_profile_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum _Ewk_Autofill_Profile_Data_Type {
+  EWK_PROFILE_ID = 0,
+  EWK_PROFILE_NAME,
+  EWK_PROFILE_COMPANY,
+  EWK_PROFILE_ADDRESS1,
+  EWK_PROFILE_ADDRESS2,
+  EWK_PROFILE_CITY_TOWN,
+  EWK_PROFILE_STATE_PROVINCE_REGION,
+  EWK_PROFILE_ZIPCODE,
+  EWK_PROFILE_COUNTRY,
+  EWK_PROFILE_PHONE,
+  EWK_PROFILE_EMAIL,
+  EWK_MAX_AUTOFILL
+};
+
+typedef enum _Ewk_Autofill_Profile_Data_Type Ewk_Autofill_Profile_Data_Type;
+typedef struct _Ewk_Autofill_Profile Ewk_Autofill_Profile;
+
+/**
+ * Creates a new profile
+ *
+ * The created profile must be deleted by ewk_autofill_profile_delete
+ *
+ * @return @c Ewk_Autofill_Profile if new profile is successfully created, @c NULL otherwise
+ * @see ewk_autofill_profile_data_set
+ * @see ewk_autofill_profile_delete
+ */
+EAPI Ewk_Autofill_Profile* ewk_autofill_profile_new(void);
+
+/**
+ * Deletes a given profile
+ *
+ * The API will delete the a particular profile only from the memory.
+ * To remove the profile permenantly use ewk_context_form_autofill_profile_remove
+ *
+ * @param profile name
+ *
+ * @see ewk_autofill_profile_new
+ * @see ewk_context_form_autofill_profile_get
+ * @see ewk_context_form_autofill_profile_remove
+ */
+EAPI void ewk_autofill_profile_delete(Ewk_Autofill_Profile* profile);
+
+/**
+ * Sets the data in the profile created by ewk_autofill_profile_new
+ *
+ * The data set by this function is set locally. To save it to database use ewk_context_form_autofill_profile_add
+ *
+ * @param profile contains the profile data
+ * @param name type of attribute to be set
+ * @param value value of the attribute
+ *
+ * @see ewk_autofill_profile_data_get
+ * @see Ewk_Autofill_Profile_Data_Type
+ * @see ewk_context_form_autofill_profile_add
+ */
+EAPI void ewk_autofill_profile_data_set(Ewk_Autofill_Profile* profile, Ewk_Autofill_Profile_Data_Type name, const char* value);
+
+/**
+ * Gets the id attribute value from a given profile
+ *
+ * The profile obtained from ewk_context_form_autofill_profile_get will be used to get the profileid
+ *
+ * @param profile name of profile
+ *
+ * @return @c Value of attribute (unsigned), @c 0 otherwise
+ * @see ewk_autofill_profile_new
+ * @see ewk_context_form_autofill_profile_get
+ * @see ewk_context_form_autofill_profile_get_all
+ */
+EAPI unsigned ewk_autofill_profile_id_get(Ewk_Autofill_Profile* profile);
+
+/**
+ * Gets the attribute value from a given profile
+ *
+ * The profile obtained from ewk_context_form_autofill_profile_get will be used to get the data
+ *
+ * @param profile name of profile
+ * @param name name of attribute
+ *
+ * @return @c Value of attribute (char*), @c NULL otherwise
+ * @see ewk_autofill_profile_new
+ * @see ewk_context_form_autofill_profile_get
+ * @see ewk_context_form_autofill_profile_get_all
+ */
+EAPI const char* ewk_autofill_profile_data_get(Ewk_Autofill_Profile* profile, Ewk_Autofill_Profile_Data_Type name);
+
+//#endif // TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_autofill_profile_h
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.cc b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.cc
new file mode 100644 (file)
index 0000000..48e2a3e
--- /dev/null
@@ -0,0 +1,35 @@
+/* Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_back_forward_list.h"
+#include "private/ewk_private.h"
+
+#if defined(OS_TIZEN_TV)
+Ewk_Back_Forward_List_Item* ewk_back_forward_list_current_item_get(const Ewk_Back_Forward_List* list)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h
new file mode 100644 (file)
index 0000000..e35cac2
--- /dev/null
@@ -0,0 +1,57 @@
+/* Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_back_forward_list.h
+ * @brief   Describes the Ewk Back Forward List API.
+ */
+
+#ifndef ewk_back_forward_list_h
+#define ewk_back_forward_list_h
+
+#include "ewk_back_forward_list_item.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for Ewk_Back_Forward_List */
+typedef struct EwkBackForwardList Ewk_Back_Forward_List;
+
+/**
+ * Returns the current item in the @a list.
+ *
+ * @param list the back-forward list instance
+ *
+ * @return the current item in the @a list or @c NULL in case of error
+ */
+EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_current_item_get(const Ewk_Back_Forward_List *list);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_back_forward_list_h
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.cc b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.cc
new file mode 100644 (file)
index 0000000..e8de5ce
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this item of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this item of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_back_forward_list_item.h"
+#include "private/ewk_private.h"
+
+#if defined(OS_TIZEN_TV)
+const char* ewk_back_forward_list_item_original_url_get(const Ewk_Back_Forward_List_Item* item)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h
new file mode 100644 (file)
index 0000000..8fe0183
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_back_forward_list_item.h
+ * @brief   Describes the Ewk Back Forward List Item API.
+ */
+
+#ifndef ewk_back_forward_list_item_h
+#define ewk_back_forward_list_item_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Declare Ewk_Back_Forward_List_Item as Ewk_Object.
+ *
+ * @see Ewk_Object
+ */
+typedef struct EwkObject Ewk_Back_Forward_List_Item;
+
+/**
+ * Returns original URL of the item.
+ *
+ * @see ewk_back_forward_list_item_url_get()
+ *
+ * @param item the back-forward list item instance
+ *
+ * @return the original URL of the @a item or @c NULL in case of error. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup()
+ */
+EAPI const char *ewk_back_forward_list_item_original_url_get(const Ewk_Back_Forward_List_Item *item);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_back_forward_list_item_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_certificate.cc b/tizen_src/ewk/efl_integration/public/ewk_certificate.cc
new file mode 100644 (file)
index 0000000..1ab05df
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+#include "ewk_certificate.h"
+
+#include <string>
+
+// TODO: remove dependency
+#include <../impl/API/ewk_certificate_private.h>
+
+
+void ewk_certificate_policy_decision_allowed_set(Ewk_Certificate_Policy_Decision* certificatePolicyDecision, Eina_Bool allowed)
+{
+  EINA_SAFETY_ON_NULL_RETURN(certificatePolicyDecision);
+  certificatePolicyDecision->isDecided = true;
+  certificatePolicyDecision->callback.Run(allowed);
+}
+
+void ewk_certificate_policy_decision_suspend(Ewk_Certificate_Policy_Decision* certificatePolicyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN(certificatePolicyDecision);
+  certificatePolicyDecision->isSuspended = true;
+}
+
+Eina_Stringshare* ewk_certificate_policy_decision_url_get(Ewk_Certificate_Policy_Decision* certificatePolicyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(certificatePolicyDecision, 0);
+  return certificatePolicyDecision->url;
+}
+
+Eina_Stringshare* ewk_certificate_policy_decision_certificate_pem_get(Ewk_Certificate_Policy_Decision* certificatePolicyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(certificatePolicyDecision, 0);
+  return certificatePolicyDecision->certificatePem;
+}
+
+int ewk_certificate_policy_decision_error_get(Ewk_Certificate_Policy_Decision* certificatePolicyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(certificatePolicyDecision, 0);
+  return certificatePolicyDecision->error;
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_certificate.h b/tizen_src/ewk/efl_integration/public/ewk_certificate.h
new file mode 100644 (file)
index 0000000..c806826
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_certificate_h
+#define ewk_certificate_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Certificate_Policy_Decision Ewk_Certificate_Policy_Decision;
+
+/**
+ * Set the variable to allow the site access about certificate error.
+ *
+ * @param certificate_policy_decision certificate information data
+ *
+ * @param allowed decided permission value from user
+ */
+EAPI void ewk_certificate_policy_decision_allowed_set(Ewk_Certificate_Policy_Decision* certificate_policy_decision, Eina_Bool allowed);
+
+/**
+ * Suspend the operation for certificate error policy decision.
+ *
+ * This suspends the operation for certificate error policy decision when the signal for policy is emitted.
+ * This is very usefull to decide the policy from the additional UI operation like the popup.
+ *
+ * @param certificate_policy_decision certificate information data
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI void ewk_certificate_policy_decision_suspend(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
+
+/**
+ * Get the variable url to check the site's url data about certificate error.
+ *
+ * @param certificate_policy_decision certificate information data
+ *
+ * @return @c url string on success or empty string on failure
+ */
+EAPI Eina_Stringshare* ewk_certificate_policy_decision_url_get(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
+
+/**
+ * Get the variable certificate pem data to check the information about certificate error.
+ *
+ * @param certificate_policy_decision certificate information data
+ *
+ * @return @c certificate pem string on success or empty string on failure
+ */
+EAPI Eina_Stringshare* ewk_certificate_policy_decision_certificate_pem_get(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
+
+/**
+ * Get the variable errro number to check the error cause about certificate error.
+ *
+ * @param certificate_policy_decision certificate information data
+ *
+ * @return @c error number
+ */
+EAPI int ewk_certificate_policy_decision_error_get(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_chromium.h b/tizen_src/ewk/efl_integration/public/ewk_chromium.h
new file mode 100644 (file)
index 0000000..9a4ad0b
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// Common header for all Ewk API implemented over Chromium Efl Webview
+// It is replacement for EWebKit2.h for EFL Webkit2 based Webview
+
+#ifndef ewk_chromium_h
+#define ewk_chromium_h
+
+#include <ewk_application_cache_manager.h>
+#include <ewk_auth_challenge.h>
+#include <ewk_auth_request.h>
+#include <ewk_autofill_profile.h>
+#include <ewk_back_forward_list.h>
+#include <ewk_back_forward_list_item.h>
+#include <ewk_certificate.h>
+#include <ewk_chromium.h>
+#include <ewk_console_message.h>
+#include <ewk_content_screening_detection.h>
+#include <ewk_context.h>
+#include <ewk_context_menu.h>
+#include <ewk_cookie_manager.h>
+#include <ewk_custom_handlers.h>
+#include <ewk_dispatcher.h>
+#include <ewk_enums.h>
+#include <ewk_error.h>
+#include <ewk_export.h>
+#include <ewk_favicon_database.h>
+#include <ewk_frame.h>
+#include <ewk_geolocation.h>
+#include <ewk_history.h>
+#include <ewk_hit_test.h>
+#include <ewk_intercept_request.h>
+#include <ewk_ipc_message.h>
+#include <ewk_log.h>
+#include <ewk_main.h>
+#include <ewk_notification.h>
+#include <ewk_object.h>
+#include <ewk_page_group.h>
+#include <ewk_policy_decision.h>
+#include <ewk_popup_menu_item.h>
+#include <ewk_security_origin.h>
+#include <ewk_settings.h>
+#include <ewk_storage_manager.h>
+#include <ewk_text_style.h>
+#include <ewk_touch.h>
+#include <ewk_user_media.h>
+#include <ewk_view.h>
+#include <ewk_web_application_icon_data.h>
+#include <ewk_window_features.h>
+
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_console_message.cc b/tizen_src/ewk/efl_integration/public/ewk_console_message.cc
new file mode 100644 (file)
index 0000000..b5810c0
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+   Copyright (C) 2014 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_console_message.h"
+
+// TODO: remove dependency
+#include <../impl/API/ewk_console_message_private.h>
+
+Ewk_Console_Message_Level ewk_console_message_level_get(const Ewk_Console_Message *message)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(message, EWK_CONSOLE_MESSAGE_LEVEL_NULL);
+  return static_cast<Ewk_Console_Message_Level>(message->level);
+}
+
+Eina_Stringshare* ewk_console_message_text_get(const Ewk_Console_Message *message)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(message, 0);
+  return message->message;
+}
+
+unsigned ewk_console_message_line_get(const Ewk_Console_Message *message)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(message, 0);
+  return message->line;
+}
+
+Eina_Stringshare* ewk_console_message_source_get(const Ewk_Console_Message *message)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(message, 0);
+  return message->source;
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_console_message.h b/tizen_src/ewk/efl_integration/public/ewk_console_message.h
new file mode 100644 (file)
index 0000000..66d22d7
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+   Copyright (C) 2014 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+/**
+ * @file    ewk_console_message.h
+ * @brief   Describes the Console Message API.
+ */
+
+#ifndef ewk_console_message_h
+#define ewk_console_message_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for @a _Ewk_Console_Message. */
+typedef struct _Ewk_Console_Message Ewk_Console_Message;
+
+/// Creates a type name for Ewk_Console_Message_Level.
+typedef enum {
+    EWK_CONSOLE_MESSAGE_LEVEL_NULL,
+    EWK_CONSOLE_MESSAGE_LEVEL_LOG,
+    EWK_CONSOLE_MESSAGE_LEVEL_WARNING,
+    EWK_CONSOLE_MESSAGE_LEVEL_ERROR,
+    EWK_CONSOLE_MESSAGE_LEVEL_DEBUG,
+    EWK_CONSOLE_MESSAGE_LEVEL_INFO,
+} Ewk_Console_Message_Level;
+
+/**
+ * Returns the log severity of the console message from the Console Message object
+ *
+ * @param message console message object
+ *
+ * @return Ewk_Console_Message_Level indicating the console message level,
+           LogMessageLevel = 1,
+           WarningMessageLevel = 2,
+           ErrorMessageLevel = 3,
+           DebugMessageLevel = 4,
+           InfoMessageLevel = 5
+ */
+EAPI Ewk_Console_Message_Level ewk_console_message_level_get(const Ewk_Console_Message *message);
+
+/**
+ * Returns the console message text from the Console Message object
+ *
+ * @param message console message object
+ *
+ * @return console message text on success or empty string on failure
+ */
+EAPI Eina_Stringshare* ewk_console_message_text_get(const Ewk_Console_Message *message);
+
+/**
+ * Returns line no of the console message from the Console Message object
+ *
+ * @param message console message object
+ *
+ * @return the line number of the message on success or 0 on failure
+ */
+EAPI unsigned ewk_console_message_line_get(const Ewk_Console_Message *message);
+
+/**
+ * Returns the source of the console message from the Console Message object
+ *
+ * @param message console message object
+ *
+ * @return source of the console message on success or empty string on failure
+ */
+EAPI Eina_Stringshare* ewk_console_message_source_get(const Ewk_Console_Message *message);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_console_message_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection.cc b/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection.cc
new file mode 100644 (file)
index 0000000..e1bcabd
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_content_screening_detection.h"
+#include "private/ewk_private.h"
+
+void ewk_content_screening_detection_confirmed_set(Ewk_Content_Screening_Detection* content_screening_detection, Eina_Bool confirmed)
+{
+  // API is postponed. Possibly chromium's mechanism may be reused.
+  LOG_EWK_API_MOCKUP("Not Supported yet");
+}
+
+void ewk_content_screening_detection_suspend(Ewk_Content_Screening_Detection* content_screening_detection)
+{
+  // API is postponed. Possibly chromium's mechanism may be reused.
+  LOG_EWK_API_MOCKUP("Not Supperted yet");
+}
+
+Ewk_Error* ewk_content_screening_detection_error_get(Ewk_Content_Screening_Detection* content_screening_detection)
+{
+  // API is postponed. Possibly chromium's mechanism may be reused.
+  LOG_EWK_API_MOCKUP("Not Supported yet");
+  return NULL;
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection.h b/tizen_src/ewk/efl_integration/public/ewk_content_screening_detection.h
new file mode 100644 (file)
index 0000000..d6d5a25
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_content_screening_detection_h
+#define ewk_content_screening_detection_h
+
+#include <Eina.h>
+#include "ewk_error.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Content_Screening_Detection Ewk_Content_Screening_Detection;
+
+/**
+ * Set the variable to allow the release confirm about malware error.
+ *
+ * @param content_screening_detection malware information data
+ *
+ * @param confirmed decided permission value from user
+ */
+EAPI void ewk_content_screening_detection_confirmed_set(Ewk_Content_Screening_Detection* content_screening_detection, Eina_Bool confirmed);
+
+/**
+ * Suspend the operation for content screening detection.
+ *
+ * This suspends the operation for content screening detection when the signal is emitted.
+ * This is very usefull to decide the policy from the additional UI operation like the popup.
+ *
+ * @param content_screening_detection malware information data
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI void ewk_content_screening_detection_suspend(Ewk_Content_Screening_Detection* content_screening_detection);
+
+/**
+ * Get the variable errro structure to check the error cause about malware error.
+ *
+ * @param content_screening_detection malware information data
+ *
+ * @return @c error
+ */
+EAPI Ewk_Error* ewk_content_screening_detection_error_get(Ewk_Content_Screening_Detection* content_screening_detection);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.cc b/tizen_src/ewk/efl_integration/public/ewk_context.cc
new file mode 100644 (file)
index 0000000..e163fc8
--- /dev/null
@@ -0,0 +1,603 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_context.h"
+
+// TODO: remove dependency
+#include <../src/base/memory/ref_counted.h>
+#include <../impl/browser/vibration/vibration_provider_client.h>
+#include <../impl/browser_context_efl.h>
+#include <../impl/API/ewk_cookie_manager_private.h>
+#if !defined(EWK_BRINGUP)
+#include <../impl/API/ewk_context_form_autofill_profile_private.h>
+#endif
+
+#include <tizen_webview/public/tw_security_origin.h>
+#include <tizen_webview/public/tw_web_context.h>
+#include <tizen_webview/public/tw_url.h>
+
+#include "public/ewk_security_origin.h"
+#include "private/ewk_context_private.h"
+#include "private/ewk_private.h"
+#include "private/ewk_security_origin_private.h"
+#include "private/chromium_glue.h"
+#include "private/ewk_favicon_database_private.h"
+
+
+using tizen_webview::WebContext;
+
+Ewk_Context *ewk_context_ref(Ewk_Context *context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, NULL);
+  context->AddRef();
+  return context;
+}
+
+void ewk_context_unref(Ewk_Context *context)
+{
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  context->Release();
+}
+
+Ewk_Cookie_Manager* ewk_context_cookie_manager_get(const Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
+  return context->ewkCookieManager();
+}
+
+Ewk_Context* ewk_context_default_get()
+{
+  return static_cast<Ewk_Context*>(WebContext::DefaultContext());
+}
+
+Ewk_Context* ewk_context_new()
+{
+  return static_cast<Ewk_Context*>(WebContext::Create());
+}
+
+Ewk_Context *ewk_context_new_with_injected_bundle_path(const char *path)
+{
+  //with chromium engine this API not used.
+  //returning default context
+  NOTIMPLEMENTED();
+  return NULL;
+}
+
+void ewk_context_delete(Ewk_Context* context)
+{
+  if (context)
+    context->Release();
+}
+
+void ewk_context_proxy_uri_set(Ewk_Context* context, const char* proxy)
+{
+  // browser only api
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  EINA_SAFETY_ON_NULL_RETURN(proxy);
+  if (0 != strcmp(proxy,""))
+    context->SetProxyUri(proxy);
+}
+
+const char* ewk_context_proxy_uri_get(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context,0);
+  return context->GetProxyUri();
+}
+
+Eina_Bool ewk_context_notify_low_memory(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, false);
+  context->NotifyLowMemory();
+  return true;
+}
+
+Eina_Bool ewk_context_origins_free(Eina_List* origins)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(origins, false);
+
+  void* current_origin;
+  EINA_LIST_FREE(origins, current_origin) {
+    Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(current_origin);
+    delete origin;
+  }
+  return true;
+}
+
+Eina_Bool ewk_context_application_cache_delete_all(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->DeleteAllApplicationCache();
+  return true;
+}
+
+Eina_Bool ewk_context_application_cache_delete(Ewk_Context* context, Ewk_Security_Origin* origin)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
+  context->DeleteApplicationCacheForSite(origin->GetURL());
+  return true;
+}
+
+Eina_Bool ewk_context_application_cache_origins_get(Ewk_Context* context, Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+
+  context->GetAllOriginsWithApplicationCache(callback, user_data);
+  return true;
+}
+
+Eina_Bool ewk_context_application_cache_usage_for_origin_get(Ewk_Context* context, const Ewk_Security_Origin* origin, Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->GetApplicationCacheUsage(origin->GetURL(), callback, user_data);
+  return true;
+}
+
+Eina_Bool ewk_context_application_cache_quota_for_origin_set(Ewk_Context* context, const Ewk_Security_Origin* origin, int64_t quota)
+{
+  NOTIMPLEMENTED() << "Chromium does not support quota management for individual features.";
+  return false;
+}
+
+Eina_Bool ewk_context_icon_database_path_set(Ewk_Context* context, const char* path)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  return context->SetFaviconDatabasePath(path) ? EINA_TRUE : EINA_FALSE;
+}
+
+Evas_Object* ewk_context_icon_database_icon_object_add(Ewk_Context* context, const char* uri, Evas* canvas)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(uri, NULL);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, NULL);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, NULL);
+  return context->AddFaviconObject(uri, canvas);
+}
+
+Eina_Bool ewk_context_local_file_system_all_delete(Ewk_Context *context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->FileSystemDelete(tizen_webview::URL());
+  return true;
+}
+
+Eina_Bool ewk_context_local_file_system_delete(Ewk_Context *context, Ewk_Security_Origin *origin)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->FileSystemDelete(tizen_webview::URL(ewk_security_origin_host_get(origin)));
+  return true;
+}
+
+Eina_Bool ewk_context_local_file_system_origins_get(const Ewk_Context *context,
+                                                    Ewk_Local_File_System_Origins_Get_Callback callback,
+                                                    void *user_data)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->GetAllOriginsWithFileSystem(callback, user_data);
+  return true;
+}
+
+Eina_Bool ewk_context_web_database_delete_all(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->WebDBDelete(tizen_webview::URL());
+  return true;
+}
+
+Eina_Bool ewk_context_web_database_delete(Ewk_Context* context, Ewk_Security_Origin* origin)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->WebDBDelete(tizen_webview::URL(ewk_security_origin_host_get(origin)));
+  return true;
+}
+
+Eina_Bool ewk_context_web_database_origins_get(Ewk_Context* context,
+                                               Ewk_Web_Database_Origins_Get_Callback callback,
+                                               void* user_data)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->GetAllOriginsWithWebDB(callback, user_data);
+  return true;
+}
+
+Eina_Bool ewk_context_web_database_quota_for_origin_get(Ewk_Context* context, Ewk_Web_Database_Quota_Get_Callback callback, void* userData, Ewk_Security_Origin* origin)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+Eina_Bool ewk_context_web_database_quota_for_origin_set(Ewk_Context* context, Ewk_Security_Origin* origin, uint64_t quota)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+Eina_Bool ewk_context_web_indexed_database_delete_all(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->IndexedDBDelete();
+  return true;
+}
+
+Eina_Bool ewk_context_web_storage_delete_all(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->WebStorageDelete();
+  return true;
+}
+
+Eina_Bool ewk_context_web_storage_origin_delete(Ewk_Context* context, Ewk_Security_Origin* origin)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(origin, EINA_FALSE);
+
+  context->WebStorageDelete(origin->GetURL());
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_context_web_storage_origins_get(Ewk_Context* context, Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+
+  context->WebStorageOriginsAllGet(callback, user_data);
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_context_web_storage_path_set(Ewk_Context* /*context*/, const char* /*path*/)
+{
+  //With chromium engine no separate path for web storage supported.
+  //This API not implemented
+  NOTIMPLEMENTED();
+  return EINA_FALSE;
+}
+
+Eina_Bool ewk_context_web_storage_usage_for_origin_get(Ewk_Context* context, Ewk_Security_Origin* origin, Ewk_Web_Storage_Usage_Get_Callback callback, void* userData)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+Eina_Bool ewk_context_soup_data_directory_set(Ewk_Context* /*context*/, const char* /*path*/)
+{
+  //chomium engine does not use libsoup hence this API will not be implemented
+  NOTIMPLEMENTED();
+  return EINA_FALSE;
+}
+
+Eina_Bool ewk_context_cache_model_set(Ewk_Context* context, Ewk_Cache_Model model)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->SetCacheModel(chromium_glue::to(model));
+  return true;
+}
+
+Ewk_Cache_Model ewk_context_cache_model_get(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+  return chromium_glue::from(context->GetCacheModel());
+}
+
+Eina_Bool ewk_context_cache_disabled_set(Ewk_Context* context, Eina_Bool cacheDisabled)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->SetNetworkCacheEnable(!cacheDisabled);
+  return true;
+}
+
+Eina_Bool ewk_context_cache_disabled_get(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  return !context->GetNetworkCacheEnable();
+}
+
+Eina_Bool ewk_context_certificate_file_set(Ewk_Context *context, const char *certificate_file)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(certificate_file, EINA_FALSE);
+  context->SetCertificate(certificate_file);
+  return true;
+}
+
+const char* ewk_context_certificate_file_get(const Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, NULL);
+#if !defined(EWK_BRINGUP)
+  return context->GetCertificate();
+#else
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+#endif
+}
+
+Eina_Bool ewk_context_cache_clear(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->ClearNetworkCache();
+  context->ClearWebkitCache();
+  return EINA_TRUE;
+}
+
+void ewk_context_did_start_download_callback_set(Ewk_Context* context,
+                                                 Ewk_Context_Did_Start_Download_Callback callback,
+                                                 void* userData)
+{
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  context->SetDidStartDownloadCallback(callback, userData);
+}
+
+void ewk_context_mime_override_callback_set(Ewk_Context_Override_Mime_For_Url_Callback callback)
+{
+  WebContext::SetMimeOverrideCallback(callback);
+}
+
+void ewk_context_memory_sampler_start(Ewk_Context* context, double timerInterval)
+{
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  context->StartMemorySampler(timerInterval);
+}
+
+void ewk_context_memory_sampler_stop(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  context->StopMemorySampler();
+}
+
+Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(path, EINA_FALSE);
+  context->AddExtraPluginDir(path);
+  return true;
+}
+
+void ewk_context_memory_saving_mode_set(Ewk_Context* context, Eina_Bool mode)
+{
+  //memory saving mode should be handled in chromium in different way
+  //than it is handled in WebKit, so implementation of this feature
+  //is postponed, for now dummy implementation is enough
+  NOTIMPLEMENTED();
+  return;
+}
+
+void ewk_context_form_password_data_clear(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN(context);
+#if !defined(EWK_BRINGUP)
+  context->ClearPasswordData();
+#else
+  LOG_EWK_API_MOCKUP();
+#endif
+}
+
+void ewk_context_form_password_data_delete(Ewk_Context* ewkContext, const char* url)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+Eina_List* ewk_context_form_password_data_list_get(Ewk_Context* ewkContext)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+void ewk_context_form_password_data_list_free(Ewk_Context* ewkContext, Eina_List* list)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_context_form_candidate_data_clear(Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN(context);
+#if !defined(EWK_BRINGUP)
+  context->ClearCandidateData();
+#else
+  LOG_EWK_API_MOCKUP();
+#endif
+}
+
+Eina_List* ewk_context_form_autofill_profile_get_all(Ewk_Context* context)
+{
+  if (NULL == context) {
+    return NULL;
+  }
+#if !defined(EWK_BRINGUP)
+  return EwkContextFormAutofillProfileManager::priv_form_autofill_profile_get_all(context);
+#else
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+#endif
+}
+
+Ewk_Autofill_Profile* ewk_context_form_autofill_profile_get(Ewk_Context* context, unsigned id)
+{
+  if (NULL == context) {
+    return NULL;
+  }
+#if !defined(EWK_BRINGUP)
+  return EwkContextFormAutofillProfileManager::priv_form_autofill_profile_get(context, id);
+#else
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+#endif
+}
+
+Eina_Bool ewk_context_form_autofill_profile_set(Ewk_Context* context, unsigned id, Ewk_Autofill_Profile* profile)
+{
+  if (NULL == context || NULL == profile) {
+    return EINA_FALSE;
+  }
+#if !defined(EWK_BRINGUP)
+  return EwkContextFormAutofillProfileManager::priv_form_autofill_profile_set(context, id, profile);
+#else
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+#endif
+}
+
+Eina_Bool ewk_context_form_autofill_profile_add(Ewk_Context* context, Ewk_Autofill_Profile* profile)
+{
+  if (NULL == context || NULL == profile) {
+    return EINA_FALSE;
+  }
+#if !defined(EWK_BRINGUP)
+  return EwkContextFormAutofillProfileManager::priv_form_autofill_profile_add(context, profile);
+#else
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+#endif
+}
+
+Eina_Bool ewk_context_form_autofill_profile_remove(Ewk_Context* context, unsigned id)
+{
+  if (NULL == context) {
+    return EINA_FALSE;
+  }
+#if !defined(EWK_BRINGUP)
+  return EwkContextFormAutofillProfileManager::priv_form_autofill_profile_remove(context, id);
+#else
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+#endif
+}
+
+void ewk_context_vibration_client_callbacks_set(Ewk_Context* context,
+                                                Ewk_Vibration_Client_Vibrate_Cb vibrate,
+                                                Ewk_Vibration_Client_Vibration_Cancel_Cb cancel,
+                                                void* data)
+{
+  VibrationProviderClient* vibra_client = VibrationProviderClient::GetInstance();
+  vibra_client->SetVibrationClientCallbacks(vibrate, cancel, data);
+}
+
+Eina_Bool ewk_context_tizen_extensible_api_string_set(Ewk_Context* ewkContext,  const char* extensibleAPI, Eina_Bool enable)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+Eina_Bool ewk_context_tizen_extensible_api_set(Ewk_Context * /*context*/, Ewk_Extensible_API /*extensibleAPI*/, Eina_Bool /*enable*/)
+{
+  //This API will not be implemented with chromium engine based Ewk View
+  NOTIMPLEMENTED();
+  return EINA_FALSE;
+}
+
+Eina_Bool ewk_context_tizen_extensible_api_get(Ewk_Context * /*context*/, Ewk_Extensible_API /*extensibleAPI*/)
+{
+  //This API will not be implemented with chromium engine based Ewk View
+  NOTIMPLEMENTED();
+  return EINA_FALSE;
+}
+
+void ewk_context_storage_path_reset(Ewk_Context* /*context*/)
+{
+  //not supported in chromium to dynamically update the storage path
+  NOTIMPLEMENTED();
+}
+
+Eina_Bool ewk_context_pixmap_set(Ewk_Context *context, int pixmap)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, EINA_FALSE);
+  context->SetPixmap(pixmap);
+  return true;
+}
+
+int ewk_context_pixmap_get(Ewk_Context *context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
+  return context->Pixmap();
+}
+
+unsigned int ewk_context_inspector_server_start(Ewk_Context* ewkContext, unsigned int port)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+Eina_Bool ewk_context_inspector_server_stop(Ewk_Context* ewkContext)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+void ewk_send_widget_info(Ewk_Context *context,
+                          int widget_handle,
+                          double scale,
+                          const char *theme,
+                          const char *encodedBundle)
+{
+  EINA_SAFETY_ON_NULL_RETURN(theme);
+  EINA_SAFETY_ON_NULL_RETURN(encodedBundle);
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  context->SendWidgetInfo(widget_handle, scale, theme, encodedBundle);
+}
+
+#if defined(OS_TIZEN_TV)
+Ewk_Application_Cache_Manager* ewk_context_application_cache_manager_get(const Ewk_Context* ewkContext)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+#endif
+
+Ewk_Favicon_Database* ewk_context_favicon_database_get(const Ewk_Context* ewkContext)
+{
+#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
+  EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
+  Ewk_Favicon_Database favicon_database;
+  favicon_database.InitEwkFaviconDatabase(ewkContext);
+  return (&favicon_database);
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+  return NULL;
+#endif
+}
+
+void ewk_context_resource_cache_clear(Ewk_Context* ewkContext)
+{
+  EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+  ewkContext->ClearNetworkCache();
+  ewkContext->ClearWebkitCache();
+}
+
+#if defined(OS_TIZEN_TV)
+Eina_Bool ewk_context_favicon_database_directory_set(Ewk_Context* ewkContext, const char* directoryPath)
+{
+  LOG_EWK_API_MOCKUP("Tizen TV Browser");
+  return false;
+}
+
+void ewk_context_preferred_languages_set(Eina_List* languages)
+{
+  LOG_EWK_API_MOCKUP("Tizen TV Browser");
+}
+
+Ewk_Storage_Manager* ewk_context_storage_manager_get(const Ewk_Context* ewkContext)
+{
+  LOG_EWK_API_MOCKUP("Tizen TV Browser");
+  return NULL;
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.h b/tizen_src/ewk/efl_integration/public/ewk_context.h
new file mode 100644 (file)
index 0000000..798b19f
--- /dev/null
@@ -0,0 +1,968 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_context_h
+#define ewk_context_h
+
+#include <Evas.h>
+
+#include "ewk_autofill_profile.h"
+#include "ewk_cookie_manager.h"
+#include "ewk_export.h"
+#include "ewk_security_origin.h"
+#include "ewk_application_cache_manager.h"
+#include "ewk_favicon_database.h"
+#include "ewk_storage_manager.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// Defines extensible api
+enum Ewk_Extensible_API {
+    EWK_EXTENSIBLE_API_BACKGROUND_MUSIC,
+    EWK_EXTENSIBLE_API_CSP,
+    EWK_EXTENSIBLE_API_ENCRYPTION_DATABASE,
+    EWK_EXTENSIBLE_API_FULL_SCREEN,
+    EWK_EXTENSIBLE_API_FULL_SCREEN_FORBID_AUTO_EXIT,
+    EWK_EXTENSIBLE_API_MEDIA_STREAM_RECORD,
+    EWK_EXTENSIBLE_API_MEDIA_VOLUME_CONTROL,
+    EWK_EXTENSIBLE_API_PRERENDERING_FOR_ROTATION,
+    EWK_EXTENSIBLE_API_ROTATE_CAMERA_VIEW,
+    EWK_EXTENSIBLE_API_ROTATION_LOCK,
+    EWK_EXTENSIBLE_API_SOUND_MODE,
+    EWK_EXTENSIBLE_API_SUPPORT_FULL_SCREEN,
+    EWK_EXTENSIBLE_API_VISIBILITY_SUSPEND,
+    EWK_EXTENSIBLE_API_XWINDOW_FOR_FULL_SCREEN_VIDEO,
+    EWK_EXTENSIBLE_API_SUPPORT_MULTIMEDIA
+};
+/// Creates a type name for @a _Ewk_Extensible_API.
+typedef enum Ewk_Extensible_API Ewk_Extensible_API;
+
+typedef struct Ewk_Context Ewk_Context;
+typedef struct Ewk_Context_Exceeded_Quota Ewk_Context_Exceeded_Quota;
+
+/**
+ * Deletes Ewk_Context.
+ *
+ * @param context Ewk_Context to delete
+ */
+EAPI void ewk_context_delete(Ewk_Context* context);
+
+/**
+ * Notify low memory to free unused memory.
+ *
+ * @param o context object to notify low memory.
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool ewk_context_notify_low_memory(Ewk_Context* ewkContext);
+
+/**
+ * Sets the given proxy URI to network backend of specific context.
+ *
+ * @param ewkContext context object to set proxy URI.
+ * @param proxy URI to set
+ */
+EAPI void ewk_context_proxy_uri_set(Ewk_Context* ewkContext, const char* proxy);
+
+/**
+ * Gets the proxy URI from the network backend of specific context.
+ *
+ * It returns an internal string and should not
+ * be modified. The string is guaranteed to be stringshared.
+ *
+ * @param ewkContext context object to get proxy URI.
+ *
+ * @return current proxy URI or @c 0 if it's not set
+ */
+EAPI const char* ewk_context_proxy_uri_get(Ewk_Context* ewkContext);
+
+/**
+ * @typedef Ewk_Local_File_System_Origins_Get_Callback Ewk_Local_File_System_Origins_Get_Callback
+ * @brief Type definition for use with ewk_context_local_file_system_origins_get()
+ */
+typedef void (*Ewk_Local_File_System_Origins_Get_Callback)(Eina_List *origins, void *user_data);
+
+/**
+ * Callback for ewk_context_application_cache_origins_get
+ *
+ * @param origins web application cache origins
+ * @param user_data user_data will be passsed when ewk_context_application_cache_origins_get is called
+ */
+typedef void (*Ewk_Web_Application_Cache_Origins_Get_Callback)(Eina_List* origins, void* user_data);
+
+/**
+ * Callback for ewk_context_application_cache_quota_get.
+ *
+ * @param quota web application cache quota
+ * @param user_data user_data will be passsed when ewk_context_application_cache_quota_get is called
+ */
+typedef void (*Ewk_Web_Application_Cache_Quota_Get_Callback)(int64_t quota, void* user_data);
+
+/**
+ * Callback for ewk_context_application_cache_usage_for_origin_get.
+ *
+ * @param usage web application cache usage for origin
+ * @param user_data user_data will be passsed when ewk_context_application_cache_usage_for_origin_get is called
+ */
+typedef void (*Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback)(int64_t usage, void* user_data);
+
+/**
+ * Callback for ewk_context_application_cache_path_get.
+ *
+ * @param path web application cache directory
+ * @param user_data user_data will be passsed when ewk_context_application_cache_path_get is called
+ */
+//typedef void (*Ewk_Web_Application_Cache_Path_Get_Callback)(const char* path, void* user_data);
+
+/**
+ * Callback for ewk_context_web_database_origins_get.
+ *
+ * @param origins web database origins
+ * @param user_data user_data will be passsed when ewk_context_web_database_origins_get is called
+ */
+typedef void (*Ewk_Web_Database_Origins_Get_Callback)(Eina_List* origins, void* user_data);
+
+/**
+ * Callback for ewk_context_web_database_quota_for_origin_get.
+ *
+ * @param quota web database quota
+ * @param user_data user_data will be passsed when ewk_context_web_database_quota_for_origin_get is called
+ */
+typedef void (*Ewk_Web_Database_Quota_Get_Callback)(uint64_t quota, void* user_data);
+
+/**
+ * Callback for ewk_context_web_database_usage_for_origin_get.
+ *
+ * @param usage web database usage
+ * @param user_data user_data will be passsed when ewk_context_web_database_usage_for_origin_get is called
+ */
+typedef void (*Ewk_Web_Database_Usage_Get_Callback)(uint64_t usage, void* user_data);
+
+/**
+ * Callback for ewk_context_web_database_path_get.
+ *
+ * @param path web database directory
+ * @param user_data user_data will be passsed when ewk_context_web_database_path_get is called
+ */
+//typedef void (*Ewk_Web_Database_Path_Get_Callback)(const char* path, void* user_data);
+
+/**
+ * Callback for ewk_context_web_storage_origins_get.
+ *
+ * @param origins web storage origins
+ * @param user_data user_data will be passsed when ewk_context_web_storage_origins_get is called
+ */
+typedef void (*Ewk_Web_Storage_Origins_Get_Callback)(Eina_List* origins, void* user_data);
+
+/**
+ * Callback for ewk_context_web_storage_usage_for_origin_get.
+ *
+ * @param usage usage of web storage
+ * @param user_data user_data will be passsed when ewk_context_web_storage_usage_for_origin_get is called
+ */
+typedef void (*Ewk_Web_Storage_Usage_Get_Callback)(uint64_t usage, void* user_data);
+
+/*
+ * Callback for didStartDownload
+ *
+ * @param download_url url to download
+ * @param user_data user_data will be passsed when download is started
+ */
+typedef void (*Ewk_Context_Did_Start_Download_Callback)(const char* download_url, void* user_data);
+
+/*
+ * Callback for overriding default mime type
+ *
+ * @param url url for which the mime type can be overriden
+ * @param mime current mime type assumed by the web engine
+ * @param new_mime string with a new mime type for content pointer by url. Should be allocated
+ *                 dynamically, the browser will take ownership of the allocated memory and free
+ *                 it when it's no longer needed
+ * @return true in case mime should be override by the contents of new_mime, false otherwise
+ */
+typedef Eina_Bool (*Ewk_Context_Override_Mime_For_Url_Callback)(const char* url, const char *mime, char **new_mime);
+
+/**
+ * Requests for freeing origins.
+ *
+ * @param origins list of origins
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_origins_free(Eina_List* origins);
+
+/**
+ * Requests for deleting all web application caches.
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_application_cache_delete_all(Ewk_Context* context);
+
+/**
+ * Requests for deleting web application cache for origin.
+ *
+ * @param context context object
+ * @param origin application cache origin
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_application_cache_delete(Ewk_Context* context, Ewk_Security_Origin* origin);
+
+/**
+ * Requests for getting web application cache origins.
+ *
+ * @param context context object
+ * @param result_callback callback to get web application cache origins
+ * @param user_data user_data will be passsed when result_callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ *
+ * @see ewk_context_origins_free
+ */
+EAPI Eina_Bool ewk_context_application_cache_origins_get(Ewk_Context* context, Ewk_Web_Application_Cache_Origins_Get_Callback callback, void* user_data);
+
+/**
+ * Requests for setting application cache quota for origin.
+ *
+ * @param context context object
+ * @param origin serucity origin
+ * @param quota size of quota
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_application_cache_quota_for_origin_set(Ewk_Context* context, const Ewk_Security_Origin* origin, int64_t quota);
+
+/**
+ * Requests for getting application cache usage for origin.
+ *
+ * @param context context object
+ * @param origin security origin
+ * @param result_callback callback to get web database usage
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_application_cache_usage_for_origin_get(Ewk_Context* context, const Ewk_Security_Origin* origin, Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback, void* user_data);
+
+/**
+ * Requests setting of the favicon database path.
+ *
+ * @param context context object
+ * @param path database path.
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_icon_database_path_set(Ewk_Context* context, const char* path);
+
+/**
+ * Requests to get image representing the given URL.
+ *
+ * @param context context object
+ * @param url which url to query icon, must not be @c 0
+ * @param canvas evas instance where to add resulting object, must not be @c 0
+ *
+ * @return newly allocated Evas_Object instance or @c 0 on
+ *         errors. Delete the object with evas_object_del().
+ */
+EAPI Evas_Object* ewk_context_icon_database_icon_object_add(Ewk_Context* context, const char* uri, Evas* canvas);
+
+/**
+ * Requests for deleting all local file systems.
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_local_file_system_all_delete(Ewk_Context *context);
+
+/**
+ * Requests for deleting local file system for origin.
+ *
+ * @param context context object
+ * @param origin local file system origin
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_local_file_system_delete(Ewk_Context *context, Ewk_Security_Origin *origin);
+
+ /**
+ * Requests for getting local file system origins.
+ *
+ * @param context context object
+ * @param result_callback callback to get local file system origins
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ *
+ * @see ewk_context_origins_free
+ */
+EAPI Eina_Bool ewk_context_local_file_system_origins_get(const Ewk_Context *context, Ewk_Local_File_System_Origins_Get_Callback callback, void *user_data);
+
+/**
+ * Requests for deleting all web databases.
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_database_delete_all(Ewk_Context* context);
+
+/**
+ * Requests for deleting web databases for origin.
+ *
+ * @param context context object
+ * @param origin database origin
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_database_delete(Ewk_Context* context, Ewk_Security_Origin* origin);
+
+/**
+ * Requests for getting web database origins.
+ *
+ * @param context context object
+ * @param result_callback callback to get web database origins
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ *
+ * @see ewk_context_origins_free
+ */
+EAPI Eina_Bool ewk_context_web_database_origins_get( Ewk_Context* context, Ewk_Web_Database_Origins_Get_Callback callback, void* user_data);
+
+/**
+ * Requests for getting web database quota for origin.
+ *
+ * @param context context object
+ * @param result_callback callback to get web database quota
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ * @param origin database origin
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_database_quota_for_origin_get(Ewk_Context* context, Ewk_Web_Database_Quota_Get_Callback callback, void* user_data, Ewk_Security_Origin* origin);
+
+/**
+ * Requests for setting web database quota for origin.
+ *
+ * @param context context object
+ * @param origin database origin
+ * @param quota size of quota
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_database_quota_for_origin_set(Ewk_Context* context, Ewk_Security_Origin* origin, uint64_t quota);
+
+/**
+ * Requests for getting web database usage for origin.
+ *
+ * @param context context object
+ * @param result_callback callback to get web database usage
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ * @param origin database origin
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_database_usage_for_origin_get(Ewk_Context* context, Ewk_Web_Database_Usage_Get_Callback callback, void* user_data, Ewk_Security_Origin* origin);
+
+/**
+ * Requests for deleting all web indexed databases.
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_indexed_database_delete_all(Ewk_Context* context);
+/**
+ * Deletes all web storage.
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_storage_delete_all(Ewk_Context* context);
+
+/**
+ * Deletes origin that is stored in web storage db.
+ *
+ * @param context context object
+ * @param origin origin of db
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_storage_origin_delete(Ewk_Context* context, Ewk_Security_Origin* origin);
+
+/**
+ * Gets list of origins that is stored in web storage db.
+ *
+ * This function allocates memory for context structure made from callback and user_data.
+ *
+ * @param context context object
+ * @param result_callback callback to get web storage origins
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
+ *
+ * @See ewk_context_origins_free()
+ */
+EAPI Eina_Bool ewk_context_web_storage_origins_get(Ewk_Context* context, Ewk_Web_Storage_Origins_Get_Callback callback, void* user_data);
+/**
+ * Gets usage of web storage for certain origin.
+ *
+ * This function allocates memory for context structure made from callback and user_data.
+ *
+ * @param context context object
+ * @param origin security origin
+ * @param callback callback to get web storage usage
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_web_storage_usage_for_origin_get(Ewk_Context* context, Ewk_Security_Origin* origin, Ewk_Web_Storage_Usage_Get_Callback callback, void* user_data);
+
+/**
+ * Requests for setting soup data path(soup data include cookie and cache).
+ *
+ * @param context context object
+ * @param path soup data path to set
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_soup_data_directory_set(Ewk_Context* context, const char* path);
+
+/**
+ * \enum    Ewk_Cache_Model
+ *
+ * @brief   Contains option for cache model
+ */
+enum Ewk_Cache_Model {
+    /// Use the smallest cache capacity.
+    EWK_CACHE_MODEL_DOCUMENT_VIEWER,
+    /// Use bigger cache capacity than EWK_CACHE_MODEL_DOCUMENT_VIEWER.
+    EWK_CACHE_MODEL_DOCUMENT_BROWSER,
+    /// Use the biggest cache capacity.
+    EWK_CACHE_MODEL_PRIMARY_WEBBROWSER
+};
+
+/// Creates a type name for the Ewk_Cache_Model.
+typedef enum Ewk_Cache_Model Ewk_Cache_Model;
+
+/**
+* Requests to set the cache model
+*
+* @param context context object
+* @param model cache model
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_context_cache_model_set(Ewk_Context* context, Ewk_Cache_Model model);
+
+/**
+* Returns the cache model type
+*
+* @param context context object
+*
+* @return Ewk_Cache_Model
+*/
+EAPI Ewk_Cache_Model ewk_context_cache_model_get(Ewk_Context* context);
+
+/**
+* Toggles the cache enable and disable
+*
+* @param context context object
+* @param enable or disable cache
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_context_cache_disabled_set(Ewk_Context* ewkContext, Eina_Bool cacheDisabled);
+
+/**
+* Queries if the cache is enabled
+*
+* @param context context object
+*
+* @return @c EINA_TRUE is cache is enabled or @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_context_cache_disabled_get(const Ewk_Context* ewkContext);
+
+/**
+ * Request to set certifcate file
+ *
+ * @param context context object
+ * @param certificate_file is path where certificate file is stored
+ *
+ * @return @c EINA_TRUE is cache is enabled or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_certificate_file_set(Ewk_Context *context, const char *certificate_file);
+
+/**
+* Request to get certifcate file
+*
+* @param context context object
+*
+* @return @c certificate_file is path which is set during ewk_context_certificate_file_set or @c NULL otherwise
+*/
+EAPI const char* ewk_context_certificate_file_get(const Ewk_Context *context);
+
+/**
+ * Requests to clear cache
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_cache_clear(Ewk_Context* ewkContext);
+
+/**
+ * Sets callback for started download.
+ *
+ * @param context context object
+ * @param callback callback for started download
+ * @param user_data user data
+ */
+EAPI void ewk_context_did_start_download_callback_set(Ewk_Context* context, Ewk_Context_Did_Start_Download_Callback callback, void* user_data);
+
+/*
+ * Sets callback for overriding mime type
+ *
+ * @param callback callback to be invoked whenver the mime type can be overriden
+ */
+EAPI void ewk_context_mime_override_callback_set(Ewk_Context_Override_Mime_For_Url_Callback callback);
+
+/**
+ * start memory sampler.
+ *
+ * @param context context object
+ * @param interval time gap to fire the timer
+*/
+EAPI void ewk_context_memory_sampler_start(Ewk_Context* context, double timer_interval);
+
+/**
+* stop memory sampler.
+*
+* @param context context object
+*/
+EAPI void ewk_context_memory_sampler_stop(Ewk_Context* context);
+
+/**
+ * @typedef Ewk_Vibration_Client_Vibrate_Cb Ewk_Vibration_Client_Vibrate_Cb
+ * @brief Type definition for a function that will be called back when vibrate
+ * request receiveed from the vibration controller.
+ */
+typedef void (*Ewk_Vibration_Client_Vibrate_Cb)(uint64_t vibration_time, void *user_data);
+
+/**
+ * @typedef Ewk_Vibration_Client_Vibration_Cancel_Cb Ewk_Vibration_Client_Vibration_Cancel_Cb
+ * @brief Type definition for a function that will be called back when cancel
+ * vibration request receiveed from the vibration controller.
+ */
+typedef void (*Ewk_Vibration_Client_Vibration_Cancel_Cb)(void *user_data);
+
+/**
+ * Increases the reference count of the given object.
+ *
+ * @param context context object to increase the reference count
+ *
+ * @return Ewk_Context object on success or @c NULL on failure
+ */
+EAPI Ewk_Context *ewk_context_ref(Ewk_Context *context);
+
+/**
+ * Decreases the reference count of the given object, possibly freeing it.
+ *
+ * When the reference count it's reached 0, the Ewk_Context is freed.
+ *
+ * @param context context object to decrease the reference count
+ */
+EAPI void ewk_context_unref(Ewk_Context *context);
+/**
+ * Gets default Ewk_Context instance.
+ *
+ * The returned Ewk_Context object @b should not be unref'ed if application
+ * does not call ewk_context_ref() for that.
+ *
+ * @return Ewk_Context object.
+ */
+EAPI Ewk_Context *ewk_context_default_get(void);
+
+/**
+ * Creates a new Ewk_Context.
+ *
+ * The returned Ewk_Context object @b should be unref'ed after use.
+ *
+ * @return Ewk_Context object on success or @c NULL on failure
+ *
+ * @see ewk_context_unref
+ * @see ewk_context_new_with_injected_bundle_path
+ */
+EAPI Ewk_Context *ewk_context_new(void);
+
+/**
+ * Creates a new Ewk_Context.
+ *
+ * The returned Ewk_Context object @b should be unref'ed after use.
+ *
+ * Ewk view based on chromium engine does not support this API
+ * Avoid using this API
+ *
+ * @param path path of injected bundle library
+ *
+ * @return Ewk_Context object on success or @c NULL on failure
+ *
+ * @see ewk_context_unref
+ * @see ewk_context_new
+ */
+EAPI Ewk_Context *ewk_context_new_with_injected_bundle_path(const char *path);
+
+/*
+ * Gets the cookie manager instance for this @a context.
+ *
+ * @param context context object to query.
+ *
+ * @return Ewk_Cookie_Manager object instance or @c NULL in case of failure.
+ */
+EAPI Ewk_Cookie_Manager *ewk_context_cookie_manager_get(const Ewk_Context *context);
+
+/**
+ * Sets additional plugin directory.
+ *
+ * @param context context object
+ * @param path the directory to be set
+ *
+ * @return @c EINA_TRUE if the directory was set, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path);
+
+/**
+ * Sets vibration client callbacks to handle the tactile feedback in the form of
+ * vibration in the client application when the content asks for vibration.
+ *
+ * To stop listening for vibration events, you may call this function with @c
+ * NULL for the callbacks.
+ *
+ * @param context context object to set vibration client callbacks.
+ * @param vibrate The function to call when the vibrate request received from the
+ *        controller (may be @c NULL).
+ * @param cancel The function to call when the cancel vibration request received
+ *        from the controller (may be @c NULL).
+ * @param data User data (may be @c NULL).
+ */
+EAPI void ewk_context_vibration_client_callbacks_set(Ewk_Context *context, Ewk_Vibration_Client_Vibrate_Cb vibrate, Ewk_Vibration_Client_Vibration_Cancel_Cb cancel, void *data);
+
+/**
+ * Sets memory saving mode.
+ *
+ * @param context context object
+ * @param enable or disable memory saving mode
+ *
+ */
+EAPI void ewk_context_memory_saving_mode_set(Ewk_Context *context, Eina_Bool mode);
+
+struct Ewk_Password_Data {
+    char* url;
+    Eina_Bool useFingerprint;
+};
+
+/**
+ * Clear password data
+ *
+ * @param context context object
+ *
+ */
+EAPI void ewk_context_form_password_data_clear(Ewk_Context* context);
+
+/**
+ * Deletes password data from DB for given URL
+ *
+ * The API will delete the a password data from DB.
+ *
+ * @param const char* with url
+ *
+ * @see ewk_context_form_password_data_update
+ * @see ewk_context_form_password_data_list_free
+ * @see ewk_context_form_password_data_list_get
+ */
+EAPI void ewk_context_form_password_data_delete(Ewk_Context* context, const char* url);
+
+/**
+ * Get all password url list
+ *
+ * The API will delete the a password data list only from the memory.
+ * To remove the password data for URL permenantly, use ewk_context_form_password_data_delete
+ *
+ * @param Eina_List with Ewk_Password_Data
+ *
+ * @see ewk_context_form_password_data_update
+ * @see ewk_context_form_password_data_delete
+ * @see ewk_context_form_password_data_list_free
+ */
+EAPI Eina_List* ewk_context_form_password_data_list_get(Ewk_Context* context);
+
+/**
+ * Deletes a given password data list
+ *
+ * The API will delete the a password data list only from the memory.
+ * To remove the password data for URL permenantly, use ewk_context_form_password_data_delete
+ *
+ * @param Eina_List with Ewk_Password_Data
+ *
+ * @see ewk_context_form_password_data_update
+ * @see ewk_context_form_password_data_delete
+ * @see ewk_context_form_password_data_list_get
+ */
+EAPI void ewk_context_form_password_data_list_free(Ewk_Context* context, Eina_List* list);
+
+/**
+ * Clear candidate data
+ *
+ * @param context context object
+ *
+ */
+EAPI void ewk_context_form_candidate_data_clear(Ewk_Context* context);
+
+/**
+ * Gets a list of all existing profiles
+ *
+ * The obtained profile must be deleted by ewk_autofill_profile_delete.
+ * @param context context object
+ *
+ * @return @c Eina_List of Ewk_Autofill_Profile @c NULL otherwise
+ * @see ewk_autofill_profile_delete
+ */
+EAPI Eina_List* ewk_context_form_autofill_profile_get_all(Ewk_Context* context);
+
+/**
+ * Gets the existing profile for given index
+ *
+ * The obtained profile must be deleted by ewk_autofill_profile_delete.
+ *
+ * @param context context object
+ * @param profile id
+ *
+ * @return @c Ewk_Autofill_Profile if profile exists, @c NULL otherwise
+ * @see ewk_autofill_profile_delete
+ */
+EAPI Ewk_Autofill_Profile* ewk_context_form_autofill_profile_get(Ewk_Context* context, unsigned id);
+
+/**
+ * Sets the given profile for the given id
+ *
+ * Data can be added to the created profile by ewk_autofill_profile_data_set.
+ *
+ * @param context context object
+ * @param profile id
+ * @param profile Ewk_Autofill_Profile
+ *
+ * @return @c EINA_TRUE if the profile data is set successfully, @c EINA_FALSE otherwise
+ * @see ewk_autofill_profile_new
+ * @see ewk_context_form_autofill_profile_add
+ */
+EAPI Eina_Bool ewk_context_form_autofill_profile_set(Ewk_Context* context, unsigned id, Ewk_Autofill_Profile* profile);
+
+/**
+ * Saves the created profile into permenant storage
+ *
+ * The profile used to save must be created by ewk_autofill_profile_new.
+ * Data can be added to the created profile by ewk_autofill_profile_data_set.
+ *
+ * @param context context object
+ * @param profile Ewk_Autofill_Profile
+ *
+ * @return @c EINA_TRUE if the profile data is saved successfully, @c EINA_FALSE otherwise
+ * @see ewk_autofill_profile_new
+ */
+EAPI Eina_Bool ewk_context_form_autofill_profile_add(Ewk_Context* context, Ewk_Autofill_Profile* profile);
+
+/**
+ * Removes Autofill Form profile completely
+ *
+ * @param context context object
+ * @param index profile id
+ *
+ * @return @c EINA_TRUE if the profile data is removed successfully, @c EINA_FALSE otherwise
+ * @see ewk_context_form_autofill_profile_get_all
+ */
+EAPI Eina_Bool ewk_context_form_autofill_profile_remove(Ewk_Context* context, unsigned id);
+
+ /**
+ * Toggles tizen extensible api enable and disable
+ *
+ * @param context context object
+ * @param extensible_api extensible API name of every kind
+ * @param enable enable or disable tizen extensible api
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_tizen_extensible_api_string_set(Ewk_Context *context,  const char *extensible_api, Eina_Bool enable);
+
+/**
+ * Toggles tizen extensible api enable and disable
+ *
+ * @param context context object
+ * @param extensibleAPI extensible API of every kind
+ * @param enable enable or disable tizen extensible api
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_tizen_extensible_api_set(Ewk_Context *ewkContext, Ewk_Extensible_API extensibleAPI, Eina_Bool enable);
+
+/**
+ * Get tizen extensible api enable state
+ *
+ * @param context context object
+ * @param extensibleAPI extensible API of every kind
+ *  *
+ * @return @c EINA_TRUE if the extensibleAPI set as true or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_tizen_extensible_api_get(Ewk_Context *ewkContext, Ewk_Extensible_API extensibleAPI);
+
+/**
+ * Reset storage path such as web storage, web database, application cache and so on
+ *
+ * @param context context object
+ *
+ */
+EAPI void ewk_context_storage_path_reset(Ewk_Context* ewkContext);
+
+/**
+ * Sets the given id for the pixmap
+ *
+ * @param context context object
+ * @param pixmap id
+ *
+ * @return @c EINA_TRUE if the pixmap set successfully, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_pixmap_set(Ewk_Context* context, int pixmap);
+
+/**
+ * Start the inspector server
+ *
+ * @param context context object
+ * @param port number
+ *
+ * @return @c return the port number
+ */
+EAPI unsigned int ewk_context_inspector_server_start(Ewk_Context* context, unsigned int port);
+
+/**
+ * Stop the inspector server
+ *
+ * @param context context object
+  *
+ * @return @c EINA_TRUE if the inspector server stop set successfully, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_inspector_server_stop(Ewk_Context* context);
+
+
+///------- belows are extension of chromium-ewk ---------------------------
+
+/**
+ * Gets the id for the pixmap
+ *
+ * @param context context object
+ *
+ * @return @c id for the pixmap. On error default return is 0.
+ */
+EAPI int ewk_context_pixmap_get(Ewk_Context *context);
+
+EAPI void ewk_send_widget_info(Ewk_Context *context, int widget_handle, double scale, const char *theme, const char *encodedBundle);
+
+/**
+ * Gets the application cache manager instance for this @a context.
+ *
+ * @param context context object to query.
+ *
+ * @return Ewk_Cookie_Manager object instance or @c NULL in case of failure.
+ */
+EAPI Ewk_Application_Cache_Manager *ewk_context_application_cache_manager_get(const Ewk_Context *context);
+
+/**
+ * Gets the favicon database instance for this @a context.
+ *
+ * @param context context object to query.
+ *
+ * @return Ewk_Favicon_Database object instance or @c NULL in case of failure.
+ */
+EAPI Ewk_Favicon_Database *ewk_context_favicon_database_get(const Ewk_Context *context);
+
+/**
+ * Clears HTTP caches in local storage and all resources cached in memory
+ * such as images, CSS, JavaScript, XSL, and fonts for @a context.
+ *
+ * @param context context object to clear all resource caches
+ */
+EAPI void ewk_context_resource_cache_clear(Ewk_Context *context);
+
+/**
+ * Sets the favicon database directory for this @a context.
+ *
+ * Sets the directory path to be used to store the favicons database
+ * for @a context on disk. Passing @c NULL as @a directory_path will
+ * result in using the default directory for the platform.
+ *
+ * Calling this method also means enabling the favicons database for
+ * its use from the applications, it is therefore expected to be
+ * called only once. Further calls for the same instance of
+ * @a context will not have any effect.
+ *
+ * @param context context object to update
+ * @param directory_path database directory path to set
+ *
+ * @return @c EINA_TRUE if successful, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_context_favicon_database_directory_set(Ewk_Context *context, const char *directory_path);
+
+/**
+ * Sets the list of preferred languages.
+ *
+ * Sets the list of preferred langages. This list will be used to build the "Accept-Language"
+ * header that will be included in the network requests.
+ * Client can pass @c NULL for languages to clear what is set before.
+ *
+ * @param languages the list of preferred languages (char* as data) or @c NULL
+ *
+ * @note all contexts will be affected.
+ */
+EAPI void ewk_context_preferred_languages_set(Eina_List *languages);
+
+/**
+ * Gets the storage manager instance for this @a context.
+ *
+ * @param context context object to query.
+ *
+ * @return Ewk_Storage_Manager object instance or @c NULL in case of failure.
+ */
+EAPI Ewk_Storage_Manager *ewk_context_storage_manager_get(const Ewk_Context *context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_context_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_menu.cc b/tizen_src/ewk/efl_integration/public/ewk_context_menu.cc
new file mode 100644 (file)
index 0000000..e1bb106
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_context_menu.h"
+
+#include <Eina.h>
+
+// TODO: remove dependency
+#include <../impl/API/ewk_context_menu_private.h>
+#include <../impl/context_menu_controller_efl.h>
+
+unsigned ewk_context_menu_item_count(Ewk_Context_Menu* menu)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(menu, 0);
+  return eina_list_count(menu->menu_list_);
+}
+
+Ewk_Context_Menu_Item* ewk_context_menu_nth_item_get(Ewk_Context_Menu* menu, unsigned int n)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(menu, NULL);
+  return static_cast<Ewk_Context_Menu_Item*>(eina_list_nth(menu->menu_list_, n));
+}
+
+Eina_Bool ewk_context_menu_item_remove(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(menu, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+
+  menu->menu_list_ = eina_list_remove(menu->menu_list_, reinterpret_cast<const void*>(item));
+
+  delete item->menu_item_;
+  delete item;
+
+  return true;
+}
+
+Eina_Bool ewk_context_menu_item_append_as_action(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item_Tag tag, const char* title, Eina_Bool enabled)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(menu, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(title, false);
+  content::ContextMenuItemEfl *new_item = new content::ContextMenuItemEfl(content::MENU_ITEM_TYPE_ACTION,
+                                                                          static_cast<content::ContextMenuOption>(tag),
+                                                                          std::string(title),
+                                                                          std::string(),
+                                                                          std::string(),
+                                                                          std::string());
+  new_item->SetEnabled(enabled);
+  _Ewk_Context_Menu_Item *item = new _Ewk_Context_Menu_Item();
+  item->menu_item_ = new_item;
+  menu->menu_list_ = eina_list_append(menu->menu_list_, item);
+  return true;
+}
+
+
+Eina_Bool ewk_context_menu_item_append(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item_Tag tag, const char* title, const char* icon_file, Eina_Bool enabled)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(menu, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(title, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(icon_file, false);
+
+  content::ContextMenuItemEfl *new_item = new content::ContextMenuItemEfl(content::MENU_ITEM_TYPE_ACTION,
+                                                                          static_cast<content::ContextMenuOption>(tag),
+                                                                          std::string(title),
+                                                                          std::string(),
+                                                                          std::string(),
+                                                                          std::string(icon_file));
+  new_item->SetEnabled(enabled);
+  _Ewk_Context_Menu_Item *item = new _Ewk_Context_Menu_Item();
+  item->menu_item_ = new_item;
+  menu->menu_list_ = eina_list_append(menu->menu_list_, item);
+  return true;
+}
+
+Ewk_Context_Menu_Item_Tag ewk_context_menu_item_tag_get(Ewk_Context_Menu_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
+  content::ContextMenuItemEfl *info_item = item->menu_item_;
+  return static_cast<Ewk_Context_Menu_Item_Tag>(info_item->GetContextMenuOption());
+}
+
+Ewk_Context_Menu_Item_Type ewk_context_menu_item_type_get(Ewk_Context_Menu_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, EWK_CONTEXT_MENU_ITEM_TYPE_ACTION);
+  content::ContextMenuItemEfl *info_item = item->menu_item_;
+  return static_cast<Ewk_Context_Menu_Item_Type>(info_item->GetContextMenuOptionType());
+}
+
+Eina_Bool ewk_context_menu_item_enabled_get(const Ewk_Context_Menu_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+  content::ContextMenuItemEfl *info_item = item->menu_item_;
+  return info_item->IsEnabled();
+}
+
+const char* ewk_context_menu_item_link_url_get(Ewk_Context_Menu_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
+  content::ContextMenuItemEfl *info_item = item->menu_item_;
+  return info_item->LinkURL().c_str();
+}
+
+const char* ewk_context_menu_item_image_url_get(Ewk_Context_Menu_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
+  content::ContextMenuItemEfl *info_item = item->menu_item_;
+  return info_item->ImageURL().c_str();
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_menu.h b/tizen_src/ewk/efl_integration/public/ewk_context_menu.h
new file mode 100644 (file)
index 0000000..f5564fd
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_context_menu.h
+ * @brief   Describes the context menu API.
+ */
+
+#ifndef ewk_context_menu_h
+#define ewk_context_menu_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \enum    Ewk_Context_Menu_Item_Tag
+ * @brief   Provides the tags of items for the context menu.
+ * @info    Keep this in sync with WKContextMenuItemTypes.h
+ */
+enum {
+    EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION = 0,
+    EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW,
+    EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_LINK_TO_DISK,
+    EWK_CONTEXT_MENU_ITEM_TAG_COPY_LINK_TO_CLIPBOARD,
+    EWK_CONTEXT_MENU_ITEM_TAG_OPEN_IMAGE_IN_NEW_WINDOW,
+    EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_IMAGE_TO_DISK,
+    EWK_CONTEXT_MENU_ITEM_TAG_COPY_IMAGE_TO_CLIPBOARD,
+    EWK_CONTEXT_MENU_ITEM_TAG_OPEN_FRAME_IN_NEW_WINDOW,
+    EWK_CONTEXT_MENU_ITEM_TAG_COPY,
+    EWK_CONTEXT_MENU_ITEM_TAG_GO_BACK,
+    EWK_CONTEXT_MENU_ITEM_TAG_GO_FORWARD,
+    EWK_CONTEXT_MENU_ITEM_TAG_STOP,
+    EWK_CONTEXT_MENU_ITEM_TAG_RELOAD,
+    EWK_CONTEXT_MENU_ITEM_TAG_CUT,
+    EWK_CONTEXT_MENU_ITEM_TAG_PASTE,
+    EWK_CONTEXT_MENU_ITEM_TAG_SPELLING_GUESS,
+    EWK_CONTEXT_MENU_ITEM_TAG_NO_GUESSES_FOUND,
+    EWK_CONTEXT_MENU_ITEM_TAG_IGNORE_SPELLING,
+    EWK_CONTEXT_MENU_ITEM_TAG_LEARN_SPELLING,
+    EWK_CONTEXT_MENU_ITEM_TAG_OTHER,
+    EWK_CONTEXT_MENU_ITEM_TAG_SEARCH_IN_SPOTLIGHT,
+    EWK_CONTEXT_MENU_ITEM_TAG_SEARCH_WEB,
+    EWK_CONTEXT_MENU_ITEM_TAG_LOOK_UP_IN_DICTIONARY,
+    EWK_CONTEXT_MENU_ITEM_TAG_OPEN_WITH_DEFAULT_APPLICATION,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_ACTUAL_SIZE,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_ZOOM_IN,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_ZOOM_OUT,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_AUTO_SIZE,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_SINGLE_PAGE,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_FACTING_PAGES,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_CONTINUOUS,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_NEXT_PAGE,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_PREVIOUS_PAGE,
+    EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK,
+    EWK_CONTEXT_MENU_ITEM_TAG_IGNORE_GRAMMAR,
+    EWK_CONTEXT_MENU_ITEM_TAG_SPELLING_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_SHOW_SPELLING_PANEL,
+    EWK_CONTEXT_MENU_ITEM_TAG_CHECK_SPELLING,
+    EWK_CONTEXT_MENU_ITEM_TAG_CHECK_SPELLING_WHILE_TYPING,
+    EWK_CONTEXT_MENU_ITEM_TAG_CHECK_GRAMMAR_WITH_SPELLING,
+    EWK_CONTEXT_MENU_ITEM_TAG_FONT_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_SHOW_FONTS,
+    EWK_CONTEXT_MENU_ITEM_TAG_BOLD,
+    EWK_CONTEXT_MENU_ITEM_TAG_ITALIC,
+    EWK_CONTEXT_MENU_ITEM_TAG_UNDERLINE,
+    EWK_CONTEXT_MENU_ITEM_TAG_OUTLINE,
+    EWK_CONTEXT_MENU_ITEM_TAG_STYLES,
+    EWK_CONTEXT_MENU_ITEM_TAG_SHOW_COLORS,
+    EWK_CONTEXT_MENU_ITEM_TAG_SPEECH_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_START_SPEAKING,
+    EWK_CONTEXT_MENU_ITEM_TAG_STOP_SPEAKING,
+    EWK_CONTEXT_MENU_ITEM_TAG_WRITING_DIRECTION_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_DEFAULT_DIRECTION,
+    EWK_CONTEXT_MENU_ITEM_TAG_LEFT_TO_RIGHT,
+    EWK_CONTEXT_MENU_ITEM_TAG_RIGHT_TO_LEFT,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_SINGLE_PAGE_SCROLLING,
+    EWK_CONTEXT_MENU_ITEM_TAG_PDF_FACING_PAGES_SCROLLING,
+    EWK_CONTEXT_MENU_ITEM_TAG_INSPECT_ELEMENT,
+    EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_DEFAULT,
+    EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_LEFT_TO_RIGHT,
+    EWK_CONTEXT_MENU_ITEM_TAG_TEXT_DIRECTION_RIGHT_TO_LEFT,
+    EWK_CONTEXT_MENU_ITEM_TAG_CORRECT_SPELLING_AUTOMATICALLY,
+    EWK_CONTEXT_MENU_ITEM_TAG_SUBSTITUTIONS_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_SHOW_SUBSTITUTIONS,
+    EWK_CONTEXT_MENU_ITEM_TAG_SMART_COPY_PASTE,
+    EWK_CONTEXT_MENU_ITEM_TAG_SMART_QUOTES,
+    EWK_CONTEXT_MENU_ITEM_TAG_SMART_DASHES,
+    EWK_CONTEXT_MENU_ITEM_TAG_SMART_LINKS,
+    EWK_CONTEXT_MENU_ITEM_TAG_TEXT_REPLACEMENT,
+    EWK_CONTEXT_MENU_ITEM_TAG_TRANSFORMATIONS_MENU,
+    EWK_CONTEXT_MENU_ITEM_TAG_MAKE_UPPER_CASE,
+    EWK_CONTEXT_MENU_ITEM_TAG_MAKE_LOWER_CASE,
+    EWK_CONTEXT_MENU_ITEM_TAG_CAPITALIZE,
+    EWK_CONTEXT_MENU_ITEM_TAG_CHANGE_BACK,
+    EWK_CONTEXT_MENU_ITEM_TAG_OPEN_MEDIA_IN_NEW_WINDOW,
+    EWK_CONTEXT_MENU_ITEM_TAG_COPY_MEDIA_LINK_TO_CLIPBOARD,
+    EWK_CONTEXT_MENU_ITEM_TAG_TOGGLE_MEDIA_CONTROLS,
+    EWK_CONTEXT_MENU_ITEM_TAG_TOGGLE_MEDIA_LOOP,
+    EWK_CONTEXT_MENU_ITEM_TAG_ENTER_VIDEO_FULLSCREEN,
+    EWK_CONTEXT_MENU_ITEM_TAG_MEDIA_PLAY_PAUSE,
+    EWK_CONTEXT_MENU_ITEM_TAG_MEDIA_MUTE,
+    EWK_CONTEXT_MENU_ITEM_TAG_DICTATION_ALTERNATIVE,
+    EWK_CONTEXT_MENU_ITEM_TAG_SELECT_ALL,
+    EWK_CONTEXT_MENU_ITEM_TAG_SELECT_WORD,
+    EWK_CONTEXT_MENU_ITEM_TAG_TEXT_SELECTION_MODE,
+    EWK_CONTEXT_MENU_ITEM_TAG_CLIPBOARD,
+    EWK_CONTEXT_MENU_ITEM_TAG_DRAG,
+    EWK_CONTEXT_MENU_ITEM_TAG_TRANSLATE,
+    EWK_CONTEXT_MENU_ITEM_TAG_COPY_LINK_DATA,
+    EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG = 10000
+};
+/** Creates a type name for Ewk_Context_Menu_Item_Tag */
+typedef uint32_t Ewk_Context_Menu_Item_Tag;
+
+/**
+ * \enum    _Ewk_Context_Menu_Item_Type
+ * @brief   Defines the types of the items for the context menu.
+ * @info    Keep this in sync with WKContextMenuItemTypes.h
+ */
+enum _Ewk_Context_Menu_Item_Type {
+    EWK_CONTEXT_MENU_ITEM_TYPE_ACTION,
+    EWK_CONTEXT_MENU_ITEM_TYPE_CHECKABLE_ACTION,
+    EWK_CONTEXT_MENU_ITEM_TYPE_SEPARATOR,
+    EWK_CONTEXT_MENU_ITEM_TYPE_SUBMENU
+};
+/** Creates a type name for _Ewk_Context_Menu_Item_Type */
+typedef enum _Ewk_Context_Menu_Item_Type Ewk_Context_Menu_Item_Type;
+
+/** Creates a type name for _Ewk_Context_Menu */
+typedef struct _Ewk_Context_Menu Ewk_Context_Menu;
+
+/** Creates a type name for _Ewk_Context_Menu_Item */
+typedef struct _Ewk_Context_Menu_Item Ewk_Context_Menu_Item;
+
+/**
+ * Counts the number of the context menu item.
+ *
+ * @param menu the context menu object
+ *
+ * @return number of current context menu item
+ */
+EAPI unsigned ewk_context_menu_item_count(Ewk_Context_Menu* menu);
+
+/**
+ * Returns the nth item in a context menu.
+ *
+ * @param menu The context menu object
+ * @param n The number of the item
+ *
+ * @return The nth item of context menu
+ */
+EAPI Ewk_Context_Menu_Item* ewk_context_menu_nth_item_get(Ewk_Context_Menu* menu, unsigned int n);
+
+/**
+ * Removes the context menu item from the context menu object.
+ *
+ * @param menu the context menu object
+ * @param item the context menu item to remove
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_menu_item_remove(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item* item);
+
+/**
+ * Adds the context menu item to the context menu object.
+ *
+ * @param menu the context menu object
+ * @param tag the tag of context menu item
+ * @param title the title of context menu item
+ * @param enabled the enabled of context menu item
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_menu_item_append_as_action(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item_Tag tag, const char* title, Eina_Bool enabled);
+
+/**
+ * Adds the context menu item to the context menu object.
+ *
+ * @param menu the context menu object
+ * @param tag the tag of context menu item
+ * @param title the title of context menu item
+ * @param icon_file the path of icon to be set on context menu item
+ * @param enabled the enabled of context menu item
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_context_menu_item_append(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item_Tag tag, const char* title, const char* icon_file, Eina_Bool enabled);
+
+/**
+ * Returns the tag of context menu item.
+ *
+ * @param item The context menu item object
+ *
+ * @return The tag of context menu item
+ */
+EAPI Ewk_Context_Menu_Item_Tag ewk_context_menu_item_tag_get(Ewk_Context_Menu_Item* item);
+
+/**
+ * Returns the type of context menu item.
+ *
+ * @param item The context menu item object
+ *
+ * @return The type of context menu item
+ */
+EAPI Ewk_Context_Menu_Item_Type ewk_context_menu_item_type_get(Ewk_Context_Menu_Item* item);
+
+/**
+ * Returns the item is enabled.
+ *
+ * @param item The context menu item object to get enabled state
+ *
+ * @return EINA_TRUE if it is enabled, @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_context_menu_item_enabled_get(const Ewk_Context_Menu_Item* item);
+
+/**
+ * Returns the link url string of context menu item.
+ *
+ * @param menu the context menu item object
+ *
+ * @return current link url string on success or @c 0 on failure
+ */
+EAPI const char* ewk_context_menu_item_link_url_get(Ewk_Context_Menu_Item* item);
+
+/**
+ * Returns the image url string of context menu item.
+ *
+ * @param menu the context menu item object
+ *
+ * @return current image url string on success or @c 0 on failure
+ */
+EAPI const char* ewk_context_menu_item_image_url_get(Ewk_Context_Menu_Item* item);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_context_menu_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.cc b/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.cc
new file mode 100644 (file)
index 0000000..52e3d79
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_cookie_manager.h"
+
+// TODO: remove dependency
+#include <../impl/API/ewk_cookie_manager_private.h>
+#include <../impl/cookie_manager.h>
+
+#include "public/ewk_log.h"
+#include "private/chromium_glue.h"
+
+#define EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager, ...)   \
+  if (!(manager)) {                                                      \
+    CRITICAL("ewk cookie manager is NULL.");                            \
+    return __VA_ARGS__;                                                 \
+  }                                                                     \
+  if (!((manager)->cookieManager())) {                                  \
+    CRITICAL("ewk cookie manager->cookieManager() is NULL.");           \
+    return __VA_ARGS__;                                                 \
+  }                                                                     \
+  CookieManager* cookie_manager = (manager)->cookieManager()
+
+
+void ewk_cookie_manager_persistent_storage_set(Ewk_Cookie_Manager* manager,
+                                               const char* file_name,
+                                               Ewk_Cookie_Persistent_Storage storage)
+{
+  EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
+  EINA_SAFETY_ON_NULL_RETURN(file_name);
+  std::string fileName(file_name);
+  switch(storage) {
+    case EWK_COOKIE_PERSISTENT_STORAGE_SQLITE:
+      cookie_manager->SetStoragePath(file_name, true, false);
+      break;
+    case EWK_COOKIE_PERSISTENT_STORAGE_TEXT:
+      cookie_manager->SetStoragePath(file_name, true);
+      break;
+    default:
+      //NOTREACHED() << "ewk_cookie_manager_persistent_storage_set invalid storage type";
+      break;
+  }
+}
+
+void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager* manager,
+                                          Ewk_Cookie_Accept_Policy policy)
+{
+  EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
+  cookie_manager->SetCookiePolicy(chromium_glue::to(policy));
+}
+
+void ewk_cookie_manager_async_accept_policy_get(const Ewk_Cookie_Manager* manager,
+                                                Ewk_Cookie_Manager_Async_Policy_Get_Cb callback,
+                                                void* data)
+{
+  EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
+  EINA_SAFETY_ON_NULL_RETURN(callback);
+
+  // WARNING (sns.park): 
+  // reinterpret_cast is potentially unsafe because enum values of ewk and chromium
+  // may diverge in the future. In other words, the below code is valid only under
+  // the assumption the enum values for Ewk_Cookie_Accept_Policy be aligned with
+  // tizen_webview::Cookie_Accept_Policy.
+  // TODO: replace reinterpret_cast with better solution
+  // assert the above assumption in private/api_static_check.cc
+  cookie_manager->GetAcceptPolicyAsync(reinterpret_cast<CookieManager::AsyncPolicyGetCb>(callback), data);
+}
+
+void ewk_cookie_manager_async_hostnames_with_cookies_get(const Ewk_Cookie_Manager* manager,
+                                                         Ewk_Cookie_Manager_Async_Hostnames_Get_Cb callback,
+                                                         void* data)
+{
+  EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
+  EINA_SAFETY_ON_NULL_RETURN(callback);
+  cookie_manager->GetHostNamesWithCookiesAsync(callback, data);
+}
+
+void ewk_cookie_manager_hostname_cookies_clear(Ewk_Cookie_Manager* manager,
+                                               const char* host_name)
+{
+  EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
+  EINA_SAFETY_ON_NULL_RETURN(host_name);
+  std::string url(host_name);
+  cookie_manager->DeleteCookiesAsync(url);
+}
+
+void ewk_cookie_manager_cookies_clear(Ewk_Cookie_Manager* manager)
+{
+  EWK_COOKIE_MANAGER_GET_OR_RETURN(manager, cookie_manager);
+  cookie_manager->DeleteCookiesAsync();
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h b/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h
new file mode 100644 (file)
index 0000000..d9b732b
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2009-2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_cookie_manager.h
+ * @brief   Describes the Ewk Cookie Manager API.
+ */
+
+#ifndef ewk_cookie_manager_h
+#define ewk_cookie_manager_h
+
+#include <Eina.h>
+#include "ewk_error.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for Ewk_Cookie_Manager */
+typedef struct Ewk_Cookie_Manager Ewk_Cookie_Manager;
+
+/**
+ * \enum    Ewk_Cookie_Accept_Policy
+ *
+ * @brief   Contains accept policies for the cookies.
+ */
+enum Ewk_Cookie_Accept_Policy {
+    /// Accepts every cookie sent from any page.
+    EWK_COOKIE_ACCEPT_POLICY_ALWAYS,
+    /// Rejects all cookies.
+    EWK_COOKIE_ACCEPT_POLICY_NEVER,
+    /// Accepts only cookies set by the main document loaded.
+    EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY
+};
+
+/// Creates a type name for the Ewk_Cookie_Accept_Policy.
+typedef enum Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy;
+
+/**
+ * \enum    Ewk_Cookie_Persistent_Storage
+ *
+ * @brief   Enum values to denote cookies persistent storage type.
+ */
+enum Ewk_Cookie_Persistent_Storage {
+    /// Cookies are stored in a text file in the Mozilla "cookies.txt" format.
+    EWK_COOKIE_PERSISTENT_STORAGE_TEXT,
+    /// Cookies are stored in a SQLite file in the current Mozilla format.
+    EWK_COOKIE_PERSISTENT_STORAGE_SQLITE
+};
+
+/// Creates a type name for the Ewk_Cookie_Persistent_Storage.
+typedef enum Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage;
+
+/**
+ * @typedef Ewk_Cookie_Manager_Async_Policy_Get_Cb Ewk_Cookie_Manager_Async_Policy_Get_Cb
+ * @brief Callback type for use with ewk_cookie_manager_async_accept_policy_get
+ */
+typedef void (*Ewk_Cookie_Manager_Async_Policy_Get_Cb)(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info);
+
+/**
+ * @typedef Ewk_Cookie_Manager_Async_Hostnames_Get_Cb Ewk_Cookie_Manager_Async_Hostnames_Get_Cb
+ * @brief Callback type for use with ewk_cookie_manager_async_hostnames_with_cookies_get
+ *
+ * @note The @a hostnames list items are guaranteed to be eina_stringshare. Whenever possible
+ * save yourself some cpu cycles and use eina_stringshare_ref() instead of eina_stringshare_add()
+ * or strdup().
+ */
+typedef void (*Ewk_Cookie_Manager_Async_Hostnames_Get_Cb)(Eina_List *hostnames, Ewk_Error *error, void *event_info);
+
+
+/**
+ * Set the @a filename where non-session cookies are stored persistently using @a storage as the format to read/write the cookies.
+ *
+ * Cookies are initially read from @filename to create an initial set of cookies.
+ * Then, non-session cookies will be written to @filename.
+ *
+ * By default, @a manager doesn't store the cookies persistenly, so you need to call this
+ * method to keep cookies saved across sessions.
+ *
+ * @param cookie_manager The cookie manager to update.
+ * @param filename the filename to read to/write from.
+ * @param storage the type of storage.
+ */
+EAPI void ewk_cookie_manager_persistent_storage_set(Ewk_Cookie_Manager *manager, const char *filename, Ewk_Cookie_Persistent_Storage storage);
+
+/**
+ * Set @a policy as the cookie acceptance policy for @a manager.
+ *
+ * By default, only cookies set by the main document loaded are accepted.
+ *
+ * @param manager The cookie manager to update.
+ * @param policy a #Ewk_Cookie_Accept_Policy
+ */
+
+EAPI void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager *manager, Ewk_Cookie_Accept_Policy policy);
+
+/**
+ * Asynchronously get the cookie acceptance policy of @a manager.
+ *
+ * By default, only cookies set by the main document loaded are accepted.
+ *
+ * @param manager The cookie manager to query.
+ * @param callback The function to call when the policy is received or an error occured.
+ * @param data User data (may be @c NULL).
+ */
+EAPI void ewk_cookie_manager_async_accept_policy_get(const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Async_Policy_Get_Cb callback, void *data);
+
+/**
+ * Asynchronously get the list of host names for which @a manager contains cookies.
+ *
+ * @param manager The cookie manager to query.
+ * @param callback The function to call when the host names have been received.
+ * @param data User data (may be @c NULL).
+ */
+EAPI void ewk_cookie_manager_async_hostnames_with_cookies_get(const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Async_Hostnames_Get_Cb callback, void *data);
+
+/**
+ * Remove all cookies of @a manager for the given @a hostname.
+ *
+ * @param manager The cookie manager to update.
+ * @param hostname A host name.
+ */
+EAPI void ewk_cookie_manager_hostname_cookies_clear(Ewk_Cookie_Manager *manager, const char *hostname);
+
+/**
+ * Delete all cookies of @a manager.
+ *
+ * @param manager The cookie manager to update.
+ */
+EAPI void ewk_cookie_manager_cookies_clear(Ewk_Cookie_Manager *manager);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_cookie_manager_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_custom_handlers.cc b/tizen_src/ewk/efl_integration/public/ewk_custom_handlers.cc
new file mode 100644 (file)
index 0000000..31ef42c
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+    Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_custom_handlers.h"
+
+#include <tizen_webview/public/tw_custom_handlers.h>
+
+#include "private/chromium_glue.h"
+
+struct _Ewk_Custom_Handlers_Data : public tizen_webview::Custom_Handlers_Data
+{
+};
+
+Eina_Stringshare* ewk_custom_handlers_data_target_get(const Ewk_Custom_Handlers_Data* customHandlersData)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(customHandlersData, 0);
+  return customHandlersData->getTarget();
+}
+
+Eina_Stringshare* ewk_custom_handlers_data_base_url_get(const Ewk_Custom_Handlers_Data* customHandlersData)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(customHandlersData, 0);
+  return customHandlersData->getBaseUrl();
+}
+
+Eina_Stringshare* ewk_custom_handlers_data_url_get(const Ewk_Custom_Handlers_Data* customHandlersData)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(customHandlersData, 0);
+  return customHandlersData->getUrl();
+}
+
+Eina_Stringshare* ewk_custom_handlers_data_title_get(const Ewk_Custom_Handlers_Data* customHandlersData)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(customHandlersData, 0);
+  return customHandlersData->getTitle();
+}
+
+void ewk_custom_handlers_data_result_set(Ewk_Custom_Handlers_Data* customHandlersData, Ewk_Custom_Handlers_State result)
+{
+  EINA_SAFETY_ON_NULL_RETURN(customHandlersData);
+  customHandlersData->setResult(chromium_glue::to(result));
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_custom_handlers.h b/tizen_src/ewk/efl_integration/public/ewk_custom_handlers.h
new file mode 100644 (file)
index 0000000..787192f
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+    Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+/**
+ * @file    ewk_custom_handlers.h
+ * @brief   Custom scheme and content handlers. (http://www.w3.org/TR/html5/webappapis.html#custom-handlers)
+ */
+
+#ifndef ewk_custom_handlers_h
+#define ewk_custom_handlers_h
+
+#include <Eina.h>
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Custom_Handlers_Data Ewk_Custom_Handlers_Data;
+
+/// Defines the handler states.
+enum _Ewk_Custom_Handlers_State {
+    /// Indicates that no attempt has been made to register the given handler.
+    EWK_CUSTOM_HANDLERS_NEW,
+    /// Indicates that the given handler has been registered or that the site is blocked from registering the handler.
+    EWK_CUSTOM_HANDLERS_REGISTERED,
+    /// Indicates that the given handler has been offered but was rejected.
+    EWK_CUSTOM_HANDLERS_DECLINED
+};
+
+/// Creates a type name for @a _Ewk_Custom_Handlers_State.
+typedef enum _Ewk_Custom_Handlers_State Ewk_Custom_Handlers_State;
+
+/**
+ * Get target(scheme or mime type) of custom handlers.
+ *
+ * @param data custom handlers's structure.
+ *
+ * @return @c target (scheme or mime type).
+ */
+EAPI Eina_Stringshare* ewk_custom_handlers_data_target_get(const Ewk_Custom_Handlers_Data* data);
+
+/**
+ * Get base url of custom handlers.
+ *
+ * @param data custom handlers's structure.
+ *
+ * @return @c base url.
+ */
+EAPI Eina_Stringshare* ewk_custom_handlers_data_base_url_get(const Ewk_Custom_Handlers_Data* data);
+
+/**
+ * Get url of custom handlers.
+ *
+ * @param data custom handlers's structure.
+ *
+ * @return @c url.
+ */
+EAPI Eina_Stringshare* ewk_custom_handlers_data_url_get(const Ewk_Custom_Handlers_Data* data);
+
+/**
+ * Get title of custom handlers.
+ *
+ * @param data custom handlers's structure.
+ *
+ * @return @c title.
+ */
+EAPI Eina_Stringshare* ewk_custom_handlers_data_title_get(const Ewk_Custom_Handlers_Data* data);
+
+/**
+ * Set result of isProtocolRegistered API.
+ *
+ * @param data custom handlers's structure
+ * @param result(Ewk_Custom_Handlers_State) of isProtocolRegistered and isContentRegistered API
+ */
+EAPI void ewk_custom_handlers_data_result_set(Ewk_Custom_Handlers_Data* data, Ewk_Custom_Handlers_State result);
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_custom_handlers_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc b/tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc
new file mode 100644 (file)
index 0000000..0526fc1
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_dispatcher.h"
+#include <assert.h>
+
+// // TODO: remove dependency to chromium internal
+#include <base/message_loop/message_loop_proxy.h>
+#include <base/bind.h>
+#include <base/location.h>
+
+using namespace base;
+
+static scoped_refptr<MessageLoopProxy> g_message_loop;
+
+void ewk_dispatcher_touch()
+{
+  // Check: "Message loop initialized twice."
+  //DCHECK(!g_message_loop);
+  g_message_loop = MessageLoopProxy::current();
+}
+
+void ewk_dispatcher_dispatch(ewk_dispatch_callback cb, void *user_data, unsigned delay)
+{
+  // Check: "Message loop not initialized."
+  //DCHECK(!!g_message_loop);
+  // Check: "Callback not provided."
+  //DCHECK(!!cb);
+
+  if (delay) {
+    g_message_loop->PostDelayedTask(FROM_HERE,
+                                    Bind(cb, user_data),
+                                    TimeDelta::FromMilliseconds(delay));
+  } else {
+    g_message_loop->PostTask(FROM_HERE,
+                             Bind(cb, user_data));
+  }
+}
+
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_dispatcher.h b/tizen_src/ewk/efl_integration/public/ewk_dispatcher.h
new file mode 100644 (file)
index 0000000..0fb09ea
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_chromium_h
+#define ewk_chromium_h
+
+#include "ewk_export.h"
+
+typedef void (*ewk_dispatch_callback)(void *);
+
+/**
+ * Call once from the thread you want the dispatcher work on.
+ * It should be main thread usually.
+ *
+ */
+EAPI void ewk_dispatcher_touch();
+
+EAPI void ewk_dispatcher_dispatch(ewk_dispatch_callback cb, void *user_data, unsigned delay);
+
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_enums.h b/tizen_src/ewk/efl_integration/public/ewk_enums.h
new file mode 100644 (file)
index 0000000..e6f6649
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_enums_h
+#define ewk_enums_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// #if OS(TIZEN)
+/// Represents types of gesture.
+enum _Ewk_Gesture_Type {
+    EWK_GESTURE_TAP,
+    EWK_GESTURE_LONG_PRESS,
+    EWK_GESTURE_PAN,
+    EWK_GESTURE_FLICK,
+    EWK_GESTURE_PINCH
+};
+/// Creates a type name for @a _Ewk_Gesture_Type.
+typedef enum _Ewk_Gesture_Type Ewk_Gesture_Type;
+// #endif // #if OS(TIZEN)
+
+//#if ENABLE(TIZEN_ORIENTATION_EVENTS)
+enum _Ewk_Screen_Orientation {
+    EWK_SCREEN_ORIENTATION_PORTRAIT_PRIMARY = 1,
+    EWK_SCREEN_ORIENTATION_LANDSCAPE_PRIMARY = 1 << 1,
+    EWK_SCREEN_ORIENTATION_PORTRAIT_SECONDARY = 1 << 2,
+    EWK_SCREEN_ORIENTATION_LANDSCAPE_SECONDARY = 1 << 3
+};
+typedef enum _Ewk_Screen_Orientation Ewk_Screen_Orientation;
+//#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_enums_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_error.cc b/tizen_src/ewk/efl_integration/public/ewk_error.cc
new file mode 100644 (file)
index 0000000..ceaa3aa
--- /dev/null
@@ -0,0 +1,72 @@
+/* 
+ * Copyright (C) 2012 Intel Corporation.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above copyright 
+ *    notice, this list of conditions and the following disclaimer in the 
+ *    documentation and/or other materials provided with the distribution. 
+ * 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' 
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
+ * THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "ewk_error.h"
+
+#include "net/base/net_errors.h"
+
+// TODO: remove dependency
+#include <../impl/API/ewk_error_private.h>
+
+#include "private/ewk_private.h"
+
+Ewk_Error_Type ewk_error_type_get(const Ewk_Error* error)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(error, EWK_ERROR_TYPE_NONE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(error->domain, EWK_ERROR_TYPE_NONE);
+
+  // TODO: right now no other Ewk_Error domain is used
+  if (strcmp(error->domain, net::kErrorDomain) == 0) {
+    return EWK_ERROR_TYPE_NETWORK;
+  }
+
+  LOG_EWK_API_MOCKUP("Unknown error domain: %s", error->domain);
+  return EWK_ERROR_TYPE_NONE;
+}
+
+const char* ewk_error_url_get(const Ewk_Error* error)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+  return error->url;
+}
+
+int ewk_error_code_get(const Ewk_Error* error)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+  return error->error_code;
+}
+
+const char* ewk_error_description_get(const Ewk_Error* error)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+  return error->description;
+}
+
+const char* ewk_error_domain_get(const Ewk_Error* error)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_error.h b/tizen_src/ewk/efl_integration/public/ewk_error.h
new file mode 100644 (file)
index 0000000..6601b8a
--- /dev/null
@@ -0,0 +1,272 @@
+/* 
+ * Copyright (C) 2012 Intel Corporation.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met: 
+ * 1. Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer. 
+ * 2. Redistributions in binary form must reproduce the above copyright 
+ *    notice, this list of conditions and the following disclaimer in the 
+ *    documentation and/or other materials provided with the distribution. 
+ * 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' 
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
+ * THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+/**
+ * @file    ewk_error.h
+ * @brief   Describes the Web Error API.
+ */
+
+#ifndef ewk_error_h
+#define ewk_error_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for @a Ewk_Error. */
+typedef struct _Ewk_Error Ewk_Error;
+
+/// Creates a type name for Ewk_Error_Type.
+typedef enum {
+    EWK_ERROR_TYPE_NONE,
+    EWK_ERROR_TYPE_INTERNAL,
+    EWK_ERROR_TYPE_NETWORK,
+    EWK_ERROR_TYPE_POLICY,
+    EWK_ERROR_TYPE_PLUGIN,
+    EWK_ERROR_TYPE_DOWNLOAD,
+    EWK_ERROR_TYPE_PRINT
+} Ewk_Error_Type;
+
+typedef enum {
+    EWK_ERROR_CODE_UNKNOWN,    /**< Unknown */
+    EWK_ERROR_CODE_CANCELED,   /**< User canceled */
+    EWK_ERROR_CODE_CANT_SUPPORT_MIMETYPE,  /**< Can't show page for this MIME Type */
+    EWK_ERROR_CODE_FAILED_FILE_IO, /**< Error */
+    EWK_ERROR_CODE_CANT_CONNECT,   /**< Cannot connect to Network */
+    EWK_ERROR_CODE_CANT_LOOKUP_HOST,   /**< Fail to look up host from DNS */
+    EWK_ERROR_CODE_FAILED_TLS_HANDSHAKE,   /**< Fail to SSL/TLS handshake */
+    EWK_ERROR_CODE_INVALID_CERTIFICATE,    /**< Received certificate is invalid */
+    EWK_ERROR_CODE_REQUEST_TIMEOUT,    /**< Connection timeout */
+    EWK_ERROR_CODE_TOO_MANY_REDIRECTS, /**< Too many redirects */
+    EWK_ERROR_CODE_TOO_MANY_REQUESTS,  /**< Too many requests during this load */
+    EWK_ERROR_CODE_BAD_URL,    /**< Malformed url */
+    EWK_ERROR_CODE_UNSUPPORTED_SCHEME, /**< Unsupported scheme */
+    EWK_ERROR_CODE_AUTHENTICATION, /**< User authentication failed on server */
+    EWK_ERROR_CODE_INTERNAL_SERVER, /**< Web server has internal server error */
+    EWK_ERROR_CODE_CANNOTSHOWMIMETYPE = 100,
+    EWK_ERROR_CODE_CANNOTSHOWURL,
+    EWK_ERROR_CODE_FRAMELOADINTERRUPTEDBYPOLICYCHANGE,
+    EWK_ERROR_CODE_CANNOTUSERESTRICTEDPORT,
+    EWK_ERROR_CODE_CANNOTFINDPLUGIN = 200,
+    EWK_ERROR_CODE_CANNOTLOADPLUGIN,
+    EWK_ERROR_CODE_JAVAUNAVAILABLE,
+    EWK_ERROR_CODE_PLUGINCANCELLEDCONNECTION,
+    EWK_ERROR_CODE_PLUGINWILLHANDLELOAD,
+} Ewk_Error_Code;
+
+typedef enum {
+    EWK_ERROR_NETWORK_STATUS_NONE,
+
+    /* Transport Errors */
+    EWK_ERROR_NETWORK_STATUS_CANCELLED = 1,
+    EWK_ERROR_NETWORK_STATUS_CANT_RESOLVE,
+    EWK_ERROR_NETWORK_STATUS_CANT_RESOLVE_PROXY,
+    EWK_ERROR_NETWORK_STATUS_CANT_CONNECT,
+    EWK_ERROR_NETWORK_STATUS_CANT_CONNECT_PROXY,
+    EWK_ERROR_NETWORK_STATUS_SSL_FAILED,
+    EWK_ERROR_NETWORK_STATUS_IO_ERROR,
+    EWK_ERROR_NETWORK_STATUS_MALFORMED,
+    EWK_ERROR_NETWORK_STATUS_TRY_AGAIN,
+    EWK_ERROR_NETWORK_STATUS_TOO_MANY_REDIRECTS,
+    EWK_ERROR_NETWORK_STATUS_TLS_FAILED,
+
+    /* HTTP Status Codes */
+    EWK_ERROR_NETWORK_STATUS_CONTINUE = 100,
+    EWK_ERROR_NETWORK_STATUS_SWITCHING_PROTOCOLS,
+    EWK_ERROR_NETWORK_STATUS_PROCESSING,
+
+    EWK_ERROR_NETWORK_STATUS_OK = 200,
+    EWK_ERROR_NETWORK_STATUS_CREATED,
+    EWK_ERROR_NETWORK_STATUS_ACCEPTED,
+    EWK_ERROR_NETWORK_STATUS_NON_AUTHORITATIVE,
+    EWK_ERROR_NETWORK_STATUS_NO_CONTENT,
+    EWK_ERROR_NETWORK_STATUS_RESET_CONTENT,
+    EWK_ERROR_NETWORK_STATUS_PARTIAL_CONTENT,
+    EWK_ERROR_NETWORK_STATUS_MULTI_STATUS,
+
+    EWK_ERROR_NETWORK_STATUS_MULTIPLE_CHOICES = 300,
+    EWK_ERROR_NETWORK_STATUS_MOVED_PERMANENTLY,
+    EWK_ERROR_NETWORK_STATUS_FOUND = 302,
+    EWK_ERROR_NETWORK_STATUS_MOVED_TEMPORARILY = 302,
+    EWK_ERROR_NETWORK_STATUS_SEE_OTHER,
+    EWK_ERROR_NETWORK_STATUS_NOT_MODIFIED,
+    EWK_ERROR_NETWORK_STATUS_USE_PROXY,
+    EWK_ERROR_NETWORK_STATUS_NOT_APPEARING_IN_THIS_PROTOCOL,
+    EWK_ERROR_NETWORK_STATUS_TEMPORARY_REDIRECT,
+
+    EWK_ERROR_NETWORK_STATUS_BAD_REQUEST = 400,
+    EWK_ERROR_NETWORK_STATUS_UNAUTHORIZED,
+    EWK_ERROR_NETWORK_STATUS_PAYMENT_REQUIRED,
+    EWK_ERROR_NETWORK_STATUS_FORBIDDEN,
+    EWK_ERROR_NETWORK_STATUS_NOT_FOUND,
+    EWK_ERROR_NETWORK_STATUS_METHOD_NOT_ALLOWED,
+    EWK_ERROR_NETWORK_STATUS_NOT_ACCEPTABLE,
+    EWK_ERROR_NETWORK_STATUS_PROXY_AUTHENTICATION_REQUIRED,
+    EWK_ERROR_NETWORK_STATUS_PROXY_UNAUTHORIZED = EWK_ERROR_NETWORK_STATUS_PROXY_AUTHENTICATION_REQUIRED,
+    EWK_ERROR_NETWORK_STATUS_REQUEST_TIMEOUT,
+    EWK_ERROR_NETWORK_STATUS_CONFLICT,
+    EWK_ERROR_NETWORK_STATUS_GONE,
+    EWK_ERROR_NETWORK_STATUS_LENGTH_REQUIRED,
+    EWK_ERROR_NETWORK_STATUS_PRECONDITION_FAILED,
+    EWK_ERROR_NETWORK_STATUS_REQUEST_ENTITY_TOO_LARGE,
+    EWK_ERROR_NETWORK_STATUS_REQUEST_URI_TOO_LONG,
+    EWK_ERROR_NETWORK_STATUS_UNSUPPORTED_MEDIA_TYPE,
+    EWK_ERROR_NETWORK_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE,
+    EWK_ERROR_NETWORK_STATUS_INVALID_RANGE = EWK_ERROR_NETWORK_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE,
+    EWK_ERROR_NETWORK_STATUS_EXPECTATION_FAILED,
+    EWK_ERROR_NETWORK_STATUS_UNPROCESSABLE_ENTITY = 422,
+    EWK_ERROR_NETWORK_STATUS_LOCKED,
+    EWK_ERROR_NETWORK_STATUS_FAILED_DEPENDENCY,
+
+    EWK_ERROR_NETWORK_STATUS_INTERNAL_SERVER_ERROR = 500,
+    EWK_ERROR_NETWORK_STATUS_NOT_IMPLEMENTED,
+    EWK_ERROR_NETWORK_STATUS_BAD_GATEWAY,
+    EWK_ERROR_NETWORK_STATUS_SERVICE_UNAVAILABLE,
+    EWK_ERROR_NETWORK_STATUS_GATEWAY_TIMEOUT,
+    EWK_ERROR_NETWORK_STATUS_HTTP_VERSION_NOT_SUPPORTED,
+    EWK_ERROR_NETWORK_STATUS_INSUFFICIENT_STORAGE = 507,
+    EWK_ERROR_NETWORK_STATUS_NOT_EXTENDED = 510
+} Ewk_Error_Network_Status;
+
+typedef enum {
+    EWK_ERROR_IO_CODE_FAILED,
+    EWK_ERROR_IO_CODE_NOT_FOUND,
+    EWK_ERROR_IO_CODE_EXISTS,
+    EWK_ERROR_IO_CODE_IS_DIRECTORY,
+    EWK_ERROR_IO_CODE_NOT_DIRECTORY,
+    EWK_ERROR_IO_CODE_NOT_EMPTY,
+    EWK_ERROR_IO_CODE_NOT_REGULAR_FILE,
+    EWK_ERROR_IO_CODE_NOT_SYMBOLIC_LINK,
+    EWK_ERROR_IO_CODE_NOT_MOUNTABLE_FILE,
+    EWK_ERROR_IO_CODE_FILENAME_TOO_LONG,
+    EWK_ERROR_IO_CODE_INVALID_FILENAME,
+    EWK_ERROR_IO_CODE_TOO_MANY_LINKS,
+    EWK_ERROR_IO_CODE_NO_SPACE,
+    EWK_ERROR_IO_CODE_INVALID_ARGUMENT,
+    EWK_ERROR_IO_CODE_PERMISSION_DENIED,
+    EWK_ERROR_IO_CODE_NOT_SUPPORTED,
+    EWK_ERROR_IO_CODE_NOT_MOUNTED,
+    EWK_ERROR_IO_CODE_ALREADY_MOUNTED,
+    EWK_ERROR_IO_CODE_CLOSED,
+    EWK_ERROR_IO_CODE_CANCELLED,
+    EWK_ERROR_IO_CODE_PENDING,
+    EWK_ERROR_IO_CODE_READ_ONLY,
+    EWK_ERROR_IO_CODE_CANT_CREATE_BACKUP,
+    EWK_ERROR_IO_CODE_WRONG_ETAG,
+    EWK_ERROR_IO_CODE_TIMED_OUT,
+    EWK_ERROR_IO_CODE_WOULD_RECURSE,
+    EWK_ERROR_IO_CODE_BUSY,
+    EWK_ERROR_IO_CODE_WOULD_BLOCK,
+    EWK_ERROR_IO_CODE_HOST_NOT_FOUND,
+    EWK_ERROR_IO_CODE_WOULD_MERGE,
+    EWK_ERROR_IO_CODE_FAILED_HANDLED,
+    EWK_ERROR_IO_CODE_TOO_MANY_OPEN_FILES,
+    EWK_ERROR_IO_CODE_NOT_INITIALIZED,
+    EWK_ERROR_IO_CODE_ADDRESS_IN_USE,
+    EWK_ERROR_IO_CODE_PARTIAL_INPUT,
+    EWK_ERROR_IO_CODE_INVALID_DATA,
+    EWK_ERROR_IO_CODE_DBUS_ERROR,
+    EWK_ERROR_IO_CODE_HOST_UNREACHABLE,
+    EWK_ERROR_IO_CODE_NETWORK_UNREACHABLE,
+    EWK_ERROR_IO_CODE_CONNECTION_REFUSED,
+    EWK_ERROR_IO_CODE_PROXY_FAILED,
+    EWK_ERROR_IO_CODE_PROXY_AUTH_FAILED,
+    EWK_ERROR_IO_CODE_PROXY_NEED_AUTH,
+    EWK_ERROR_IO_CODE_PROXY_NOT_ALLOWED
+} Ewk_Error_Io_Code;
+
+/**
+ * Query type for this error.
+ *
+ * @param error error object to query.
+ *
+ * @return the error type, that may be @c NULL. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup().
+ */
+EAPI Ewk_Error_Type ewk_error_type_get(const Ewk_Error *error);
+
+/**
+ * Query failing URL for this error.
+ *
+ * URL that failed loading.
+ *
+ * @param error error object to query.
+ *
+ * @return the URL pointer, that may be @c NULL. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup().
+ */
+EAPI const char *ewk_error_url_get(const Ewk_Error *error);
+
+/**
+ * Query HTTP error code.
+ *
+ * @param error error object to query.
+ *
+ * #if PLATFORM(TIZEN)
+ * @note If ewk_error_domain_get returns "WebKitErrorDomain", the error code represents Ewk_Error_Code.
+ *       If "soup_http_error_quark", it represents Ewk_Error_Network_Status.
+ *       If "g-io-error-quark", it represents Ewk_Error_Io_Code.
+ * #endif
+ *
+ * @return the HTTP error code.
+ */
+EAPI int ewk_error_code_get(const Ewk_Error *error);
+
+/**
+ * Query description for this error.
+ *
+ * @param error error object to query.
+ *
+ * @return the description pointer, that may be @c NULL. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup().
+ */
+EAPI const char *ewk_error_description_get(const Ewk_Error *error);
+
+/**
+ * Returns domain from Ewk_Error.
+ *
+ * @param error Ewk_Error object received from "load,error" evas object smart callback
+ *
+ * @return @c domain string on success or empty string on failure
+ */
+EAPI const char* ewk_error_domain_get(const Ewk_Error* error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_error_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_export.h b/tizen_src/ewk/efl_integration/public/ewk_export.h
new file mode 100644 (file)
index 0000000..af9609c
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EWK_EXPORT_H_
+#define EWK_EXPORT_H_
+
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#if defined(WIN32)
+#if defined(EFLWEBVIEW_IMPLEMENTATION)
+#define EAPI __declspec(dllexport)
+#else
+#define EAPI __declspec(dllimport)
+#endif  // defined(CONTENT_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#if defined(EFLWEBVIEW_IMPLEMENTATION)
+#define EAPI __attribute__((visibility("default")))
+#else
+#define EAPI
+#endif
+#endif
+
+#endif  // CONTENT_COMMON_CONTENT_EXPORT_H_
diff --git a/tizen_src/ewk/efl_integration/public/ewk_favicon_database.cc b/tizen_src/ewk/efl_integration/public/ewk_favicon_database.cc
new file mode 100644 (file)
index 0000000..a97b621
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_favicon_database.h"
+#include "private/ewk_private.h"
+
+#if defined(OS_TIZEN_TV)
+Evas_Object* ewk_favicon_database_icon_get(Ewk_Favicon_Database* ewkIconDatabase, const char* pageURL, Evas* evas)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+
+void ewk_favicon_database_icon_change_callback_add(Ewk_Favicon_Database* ewkIconDatabase, Ewk_Favicon_Database_Icon_Change_Cb callback, void* userData)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_favicon_database.h b/tizen_src/ewk/efl_integration/public/ewk_favicon_database.h
new file mode 100644 (file)
index 0000000..9d63d57
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_favicon_database.h
+ * @brief   Describes the Ewk Favicon Database API.
+ */
+
+#ifndef ewk_favicon_database_h
+#define ewk_favicon_database_h
+
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for @a Ewk_Favicon_Database. */
+typedef struct EwkFaviconDatabase Ewk_Favicon_Database;
+
+/**
+ * @typedef Ewk_Favicon_Database_Icon_Change_Cb Ewk_Favicon_Database_Icon_Change_Cb
+ * @brief Callback type for use with ewk_favicon_database_icon_change_callback_add and ewk_favicon_database_icon_change_callback_del
+ */
+typedef void (*Ewk_Favicon_Database_Icon_Change_Cb)(const char *page_url, void *event_info);
+
+/**
+ * Retrieves from the database the favicon for the given @a page_url
+ *
+ * @param database database object to query
+ * @param page_url URL of the page to get the favicon for
+ * @param evas The canvas to add the favicon to
+ *
+ * @return The favicon as an Evas_Object if successful, @c NULL otherwise.
+ * The returned Evas_Object needs to be freed after use.
+ */
+EAPI Evas_Object *ewk_favicon_database_icon_get(Ewk_Favicon_Database *database, const char *page_url, Evas *evas);
+
+/**
+ * Add (register) a callback function to a icon change event
+ *
+ * @param database database object to register the callback
+ * @param callback callback function to be called when an icon changes
+ * @param data the data pointer that was to be passed to the callback
+ */
+EAPI void ewk_favicon_database_icon_change_callback_add(Ewk_Favicon_Database *database, Ewk_Favicon_Database_Icon_Change_Cb callback, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_favicon_database_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_frame.cc b/tizen_src/ewk/efl_integration/public/ewk_frame.cc
new file mode 100644 (file)
index 0000000..d55c7e0
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_frame.h"
+
+#if !defined(EWK_BRINGUP)
+// TODO: remove dependency
+#include <tizen_webview/public/tw_frame.h>
+#endif
+
+#include "private/ewk_private.h"
+
+namespace {
+#if !defined(EWK_BRINGUP)
+tizen_webview::Frame* ToImpl(void* data)
+{
+  return static_cast<tizen_webview::Frame*>(data);
+}
+#endif
+} // namespace
+
+Eina_Bool ewk_frame_can_show_mime_type(Ewk_Frame_Ref frame, char* mimeType)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+Eina_Bool ewk_frame_is_main_frame(Ewk_Frame_Ref frame)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(frame, EINA_FALSE);
+#if !defined(EWK_BRINGUP)
+  return ToImpl(frame)->IsMainFrame() ? EINA_TRUE : EINA_FALSE;
+#else
+  LOG_EWK_API_MOCKUP();
+  return EINA_FALSE;
+#endif
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_frame.h b/tizen_src/ewk/efl_integration/public/ewk_frame.h
new file mode 100644 (file)
index 0000000..6a07e97
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_frame_h
+#define ewk_frame_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void* Ewk_Frame_Ref;
+
+/**
+ * Callback for ewk_frame_source_get
+ *
+ * @param frame frame object to get the frame source
+ * @param source frame source on success, or NULL on failure
+ * @param user_data user data
+ */
+typedef void (*Ewk_Frame_Source_Get_Callback)(Ewk_Frame_Ref frame, const char* source, void* user_data);
+
+/**
+ * Gets whether a MIME type can be displayed in the frame.
+ *
+ * @param frame frame object
+ * @param mime_type a mime type
+ *
+ * @return @c EINA_TRUE if the MIME type can be displayed or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_frame_can_show_mime_type(Ewk_Frame_Ref frame, char* mime_type);
+
+/**
+ * Gets whether the frame is main frame.
+ *
+ * @param frame frame object
+ *
+ * @return @c EINA_TRUE if the frame is main frame or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_frame_is_main_frame(Ewk_Frame_Ref frame);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_frame_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_geolocation.cc b/tizen_src/ewk/efl_integration/public/ewk_geolocation.cc
new file mode 100644 (file)
index 0000000..8649512
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "public/ewk_geolocation.h"
+
+// TODO: remove dependency
+#include <../impl/API/ewk_geolocation_private.h>
+
+#include "public/ewk_security_origin.h"
+#include "private/ewk_security_origin_private.h"
+
+const Ewk_Security_Origin* ewk_geolocation_permission_request_origin_get(const Ewk_Geolocation_Permission_Request* permissionRequest)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, 0);
+    return static_cast<const Ewk_Security_Origin*>(permissionRequest->origin);
+}
+
+Eina_Bool ewk_geolocation_permission_request_set(Ewk_Geolocation_Permission_Request* permissionRequest, Eina_Bool allow)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, false);
+    permissionRequest->isDecided = true;
+
+    //Calling the geolocation callback function
+    permissionRequest->callback.Run(allow);
+    delete permissionRequest;
+    return true;
+}
+
+void ewk_geolocation_permission_request_suspend(Ewk_Geolocation_Permission_Request* permissionRequest)
+{
+    EINA_SAFETY_ON_NULL_RETURN(permissionRequest);
+    permissionRequest->isSuspended = true;
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_geolocation.h b/tizen_src/ewk/efl_integration/public/ewk_geolocation.h
new file mode 100644 (file)
index 0000000..14f2541
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_geolocation_h
+#define ewk_geolocation_h
+
+#include <Eina.h>
+#include "ewk_security_origin.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Geolocation_Permission_Request Ewk_Geolocation_Permission_Request;
+
+/**
+ * Requests for getting origin of geolocation permission request.
+ *
+ * @param request Ewk_Geolocation_Permission_Request object to get origin
+ *
+ * @return security origin of geolocation permission data
+ */
+EAPI const Ewk_Security_Origin *ewk_geolocation_permission_request_origin_get(const Ewk_Geolocation_Permission_Request *request);
+
+/**
+ * Request to allow / deny the geolocation permission request
+ *
+ * @param request permission request to allow or deny permission
+ * @param allow allow or deny permission for geolocation
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_geolocation_permission_request_set(Ewk_Geolocation_Permission_Request *request, Eina_Bool allow);
+
+/**
+ * Suspend the operation for permission request.
+ *
+ * This suspends the operation for permission request.
+ * This is very useful to decide the policy from the additional UI operation like the popup.
+ *
+ * @param request Ewk_Geolocation_Permission_Request object to suspend permission request
+ */
+EAPI void ewk_geolocation_permission_request_suspend(Ewk_Geolocation_Permission_Request *request);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_geolocation_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_history.cc b/tizen_src/ewk/efl_integration/public/ewk_history.cc
new file mode 100644 (file)
index 0000000..e895228
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#if !defined(EWK_BRINGUP)
+
+#include "ewk_history.h"
+#include "private/ewk_private.h"
+#include "private/ewk_history_private.h"
+#include "Eina.h"
+
+int ewk_history_back_list_length_get(Ewk_History* history)
+{
+  // returning -1 here would be better to indicate the error
+  // but we need to stick to the WebKit-EFL implementation
+  EINA_SAFETY_ON_NULL_RETURN_VAL(history, 0);
+  history->GetBackListLength();
+}
+
+int ewk_history_forward_list_length_get(Ewk_History* history)
+{
+  // returning -1 here would be better to indicate the error
+  // but we need to stick to the WebKit-EFL implementation
+  EINA_SAFETY_ON_NULL_RETURN_VAL(history, 0);
+  return history->GetForwardListLength();
+}
+
+Ewk_History_Item* ewk_history_nth_item_get(Ewk_History* history, int index)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(history, NULL);
+  return chromium_glue::from(history->GetItemAtIndex(index));
+}
+
+const char* ewk_history_item_uri_get(Ewk_History_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
+  // GetURL().spec() returns const reference
+  return item->GetURL().spec().c_str();
+}
+
+const char* ewk_history_item_title_get(Ewk_History_Item* item)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
+  // GetTitle() return const reference
+  return item->GetTitle().c_str();
+}
+
+void ewk_history_free(Ewk_History* history)
+{
+  EINA_SAFETY_ON_NULL_RETURN(history);
+  delete history;
+}
+
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_history.h b/tizen_src/ewk/efl_integration/public/ewk_history.h
new file mode 100644 (file)
index 0000000..dfd050f
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_history.h
+ * @brief   Describes the history(back & forward list) API of visited page.
+ */
+
+#ifndef ewk_history
+#define ewk_history
+
+#if !defined(EWK_BRINGUP)
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for _Ewk_History */
+typedef struct _Ewk_History Ewk_History;
+
+/** Creates a type name for _Ewk_History_Item */
+typedef struct _Ewk_History_Item Ewk_History_Item;
+
+/**
+ * Get the whole length of back list.
+ *
+ * @param history to get the whole back list
+ *
+ * @return number of elements in whole list.
+ */
+EAPI int ewk_history_back_list_length_get(Ewk_History* history);
+
+/**
+ * Get the whole length of forward list.
+ *
+ * @param history to get the whole forward list
+ *
+ * @return number of elements in whole list.
+ */
+EAPI int ewk_history_forward_list_length_get(Ewk_History* history);
+
+/**
+ * Get the item at a given index relative to the current item.
+ *
+ * @param history which history instance to query.
+ * @param index position of item to get.
+ *
+ * @note The back list item in case of index < 0, the current item in case of index == 0, the forward list item in case of index > 0.
+ *
+ * @return the item at a given index relative to the current item.
+ */
+EAPI Ewk_History_Item* ewk_history_nth_item_get(Ewk_History* history, int index);
+
+/**
+ * Query URI for given list item.
+ *
+ * @param item history item to query.
+ *
+ * @return the URI pointer, that may be @c NULL.
+ */
+EAPI const char* ewk_history_item_uri_get(Ewk_History_Item* item);
+
+/**
+ * Query title for given list item.
+ *
+ * @param item history item to query.
+ *
+ * @return the title pointer, that may be @c NULL.
+ */
+EAPI const char* ewk_history_item_title_get(Ewk_History_Item* item);
+
+/**
+ * Free given history instance.
+ *
+ * @param history what to free.
+ */
+EAPI void ewk_history_free(Ewk_History* history);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // EWK_BRINGUP
+
+#endif // ewk_history
diff --git a/tizen_src/ewk/efl_integration/public/ewk_hit_test.cc b/tizen_src/ewk/efl_integration/public/ewk_hit_test.cc
new file mode 100644 (file)
index 0000000..9cdc4a8
--- /dev/null
@@ -0,0 +1,102 @@
+#include "public/ewk_hit_test.h"
+
+#include "tizen_webview/public/tw_hit_test.h"
+
+// TODO: remove dependency
+#include <../impl/eweb_view.h>
+#include <../impl/web_contents_delegate_efl.h>
+
+#include "public/ewk_view.h"
+#include "private/chromium_glue.h"
+#include "private/ewk_hit_test_private.h"
+
+using namespace tizen_webview;
+
+void ewk_hit_test_free(Ewk_Hit_Test* hitTest)
+{
+  delete hitTest;
+}
+
+Ewk_Hit_Test_Result_Context ewk_hit_test_result_context_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT);
+  return chromium_glue::from(hitTest->GetResultContext());
+}
+
+const char* ewk_hit_test_link_uri_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetLinkUri();
+}
+
+const char* ewk_hit_test_link_title_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetLinkTitle();
+}
+
+const char* ewk_hit_test_link_label_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetLinkLabel();
+}
+
+const char* ewk_hit_test_image_uri_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetImageUri();
+}
+
+const char* ewk_hit_test_media_uri_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetMediaUri();
+}
+
+const char* ewk_hit_test_tag_name_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetNodeTagName();
+}
+
+const char* ewk_hit_test_node_value_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetNodeValue();
+}
+
+Eina_Hash* ewk_hit_test_attribute_hash_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetNodeAttributeHash();
+}
+
+void* ewk_hit_test_image_buffer_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetImageBuffer();
+}
+
+unsigned int ewk_hit_test_image_buffer_length_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetImageBufferLength();
+}
+
+const char* ewk_hit_test_image_file_name_extension_get(Ewk_Hit_Test* hitTest)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hitTest, 0);
+  return hitTest->GetImageFilenameExtension();
+}
+
+int FOR_TESTING_ewk_hit_test_image_width_get(Ewk_Hit_Test* hit_test)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hit_test, 0);
+  return hit_test->GetImageWidth();
+}
+
+int FOR_TESTING_ewk_hit_test_image_height_get(Ewk_Hit_Test* hit_test)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(hit_test, 0);
+  return hit_test->GetImageHeight();
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_hit_test.h b/tizen_src/ewk/efl_integration/public/ewk_hit_test.h
new file mode 100644 (file)
index 0000000..5d2b819
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_hit_test_h
+#define ewk_hit_test_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Ewk_Hit_Test_Mode:
+ * @EWK_HIT_TEST_MODE_DEFAULT: link data.
+ * @EWK_HIT_TEST_MODE_NODE_DATA: extra node data(tag name, node value, attribute infomation, etc).
+ * @EWK_HIT_TEST_MODE_IMAGE_DATA: extra image data(image data, image data length, image file name exteionsion, etc).
+ * @EWK_HIT_TEST_MODE_ALL: all data.
+ *
+ * Enum values with flags representing the hit test mode.
+ */
+
+typedef enum {
+    EWK_HIT_TEST_MODE_DEFAULT = 1 << 1,
+    EWK_HIT_TEST_MODE_NODE_DATA = 1 << 2,
+    EWK_HIT_TEST_MODE_IMAGE_DATA = 1 << 3,
+    EWK_HIT_TEST_MODE_ALL = EWK_HIT_TEST_MODE_DEFAULT | EWK_HIT_TEST_MODE_NODE_DATA | EWK_HIT_TEST_MODE_IMAGE_DATA
+} Ewk_Hit_Test_Mode;
+
+/**
+ * Ewk_Hit_Test_Result_Context:
+ * @EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT: anywhere in the document.
+ * @EWK_HIT_TEST_RESULT_CONTEXT_LINK: a hyperlink element.
+ * @EWK_HIT_TEST_RESULT_CONTEXT_IMAGE: an image element.
+ * @EWK_HIT_TEST_RESULT_CONTEXT_MEDIA: a video or audio element.
+ * @EWK_HIT_TEST_RESULT_CONTEXT_SELECTION: the area is selected by the user.
+ * @EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE: the area is editable by the user.
+ * @EWK_HIT_TEST_RESULT_CONTEXT_TEXT: the area is text.
+ *
+ * Enum values with flags representing the context of a #Ewk_Hit_Test.
+ */
+typedef enum {
+    EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT = 1 << 1,
+    EWK_HIT_TEST_RESULT_CONTEXT_LINK = 1 << 2,
+    EWK_HIT_TEST_RESULT_CONTEXT_IMAGE = 1 << 3,
+    EWK_HIT_TEST_RESULT_CONTEXT_MEDIA = 1 << 4,
+    EWK_HIT_TEST_RESULT_CONTEXT_SELECTION = 1 << 5,
+    EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE = 1 << 6,
+    EWK_HIT_TEST_RESULT_CONTEXT_TEXT = 1 << 7
+} Ewk_Hit_Test_Result_Context;
+
+/** Creates a type name for _Ewk_Hit_Test */
+typedef struct Ewk_Hit_Test Ewk_Hit_Test;
+
+/**
+ * Frees hit test instance created by ewk_view_hit_test_new().
+ *
+ * @param hit_test instance
+ */
+EAPI void ewk_hit_test_free(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the context of  the hit test
+ *
+ * @param hit_test instance
+ * @return a bitmask of the hit test context on success, @c EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT otherwise.
+ */
+EAPI Ewk_Hit_Test_Result_Context ewk_hit_test_result_context_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the link uri string of the hit test
+ *
+ * @param hit_test instance
+ * @return the URI of the link element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_link_uri_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the link title string of the hit test
+ *
+ * @param hit_test instance
+ * @return the title of the link element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_link_title_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the link label string of the hit test
+ *
+ * @param hit_test instance
+ * @return the label of the link element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_link_label_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the image uri string of the hit test
+ *
+ * @param hit_test instance
+ * @return the URI of the image element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_image_uri_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the media uri string of the hit test
+ *
+ * @param hit_test instance
+ * @return the URI of the media element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_media_uri_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the tag name string of hit element of the hit test
+ *
+ * @param hit_test instance
+ * @return the tag name of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_tag_name_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the node value string of hit element of the hit test
+ *
+ * @param hit_test instance
+ * @return the node value of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_node_value_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the attribute data of hit element of the hit test
+ *
+ * @param hit_test instance
+ * @return the attribute data of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI Eina_Hash* ewk_hit_test_attribute_hash_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the image buffer of hit element of the hit test
+ *
+ * @param hit_test instance
+ * @return the image buffer of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI void* ewk_hit_test_image_buffer_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the image buffer length of hit element of the hit test
+ *
+ * @param hit_test instance
+ * @return the image buffer length of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
+ * Buffer length is truncated to 32 bit.
+ */
+EAPI unsigned int ewk_hit_test_image_buffer_length_get(Ewk_Hit_Test* hit_test);
+
+/**
+ * Gets the image fiile name extension string of hit element of the hit test
+ *
+ * @param hit_test instance
+ * @return the image fiile name extension of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
+ */
+EAPI const char* ewk_hit_test_image_file_name_extension_get(Ewk_Hit_Test* hit_test);
+
+// API to test image saving functionality. Not to be used.
+EAPI int FOR_TESTING_ewk_hit_test_image_width_get(Ewk_Hit_Test* hit_test);
+EAPI int FOR_TESTING_ewk_hit_test_image_height_get(Ewk_Hit_Test* hit_test);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_hit_test_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_intercept_request.cc b/tizen_src/ewk/efl_integration/public/ewk_intercept_request.cc
new file mode 100644 (file)
index 0000000..9a089d0
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_intercept_request.h"
+#include "private/ewk_private.h"
+
+
+Eina_Bool ewk_intercept_request_ignore(Ewk_Intercept_Request* interceptRequest)
+{
+  LOG_EWK_API_MOCKUP();
+  return true;
+}
+
+const char* ewk_intercept_request_url_get (Ewk_Intercept_Request* interceptRequest)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+const char* ewk_intercept_request_http_method_get (Ewk_Intercept_Request* interceptRequest)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+const char* ewk_intercept_request_body_get (Ewk_Intercept_Request* interceptRequest)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+const Eina_Hash* ewk_intercept_request_headers_get (Ewk_Intercept_Request* interceptRequest)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+Eina_Bool ewk_intercept_request_response_set (Ewk_Intercept_Request* interceptRequest, const char* headers, const char* body, int length)
+{
+  LOG_EWK_API_MOCKUP();
+  return true;
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_intercept_request.h b/tizen_src/ewk/efl_integration/public/ewk_intercept_request.h
new file mode 100644 (file)
index 0000000..9de21e7
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_intercept_request_h
+#define ewk_intercept_request_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Intercept_Request Ewk_Intercept_Request;
+
+/**
+ * When application doesn't have a response for intercept request url, it
+ * calls this api which notifies with FALSE value to the resource handle
+ * indicates to continue with normal load procedure for this resource.
+ *
+ * @param interceptRequest intercept request instance received from "intercept,request" evas object smart callback
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_intercept_request_ignore(Ewk_Intercept_Request* interceptRequest);
+
+/**
+ * Returns url from Intercept Request object.
+ *
+ * @param interceptRequest intercept request instance received from "intercept,request" evas object smart callback
+ *
+ * @return @c url string on success or empty string on failure
+ */
+EAPI const char* ewk_intercept_request_url_get (Ewk_Intercept_Request* interceptRequest);
+
+/**
+ * Returns method for the url from Intercept Request object.
+ *
+ * @param interceptRequest intercept request instance received from "intercept,request" evas object smart callback
+ *
+ * @return @c method string on success or empty string on failure
+ */
+EAPI const char* ewk_intercept_request_http_method_get (Ewk_Intercept_Request* interceptRequest);
+
+/**
+ * Returns request body for the url from Intercept Request object.
+ *
+ * @param interceptRequest intercept request instance received from "intercept,request" evas object smart callback
+ *
+ * @return @c body string on success or empty string on failure
+ */
+EAPI const char* ewk_intercept_request_body_get (Ewk_Intercept_Request* interceptRequest);
+
+/**
+ * Returns request headers for the intercept Request.
+ *
+ * @param intercpetRequest intercept request instance received from "intercept, request" evas object smart callback
+ *
+ * @return @c header string on success or empty string on failure
+*/
+EAPI const Eina_Hash* ewk_intercept_request_headers_get (Ewk_Intercept_Request* interceptRequest);
+
+/**
+ * When application has the response headers, body for the intercept request url, it call this api to set those.
+ *
+ * @param interceptRequest intercept request instance received from "intercept,request" evas object smart callback
+ * @param headers response headers for the intercept request
+ * @param body response body for the intercept request
+ * @param length of response body
+ * @return @c EINA_TRUE on success or EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_intercept_request_response_set (Ewk_Intercept_Request* interceptRequest, const char* headers, const char* body, int length);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_intercept_request_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_ipc_message.cc b/tizen_src/ewk/efl_integration/public/ewk_ipc_message.cc
new file mode 100644 (file)
index 0000000..e4e1e99
--- /dev/null
@@ -0,0 +1,90 @@
+#include "ewk_ipc_message.h"
+
+#include <tizen_webview/public/tw_wrt.h>
+
+#include "private/ewk_context_private.h"
+#include "private/ewk_wrt_private.h"
+
+// TODO(sns.park):
+// The API description is unclear about who will delete it (via eina_stringshare_del()).
+// Better to give clear description about the ownership/lifetime of the returned string.
+// More Better is to replace Eina_Stringshare* with simple const char* (like webkit2),
+// and give documentation saying "returned string is valid as long as |data| is valid"
+
+Eina_Stringshare *ewk_ipc_wrt_message_data_type_get(const Ewk_IPC_Wrt_Message_Data *data)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
+    return eina_stringshare_add(data->GetType());
+}
+
+Eina_Bool ewk_ipc_wrt_message_data_type_set(Ewk_IPC_Wrt_Message_Data *data, const char *type)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, false);
+    data->SetType(type);
+    return true;
+}
+
+Eina_Stringshare *ewk_ipc_wrt_message_data_value_get(const Ewk_IPC_Wrt_Message_Data *data)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
+    return eina_stringshare_add(data->GetValue());
+}
+
+Eina_Bool ewk_ipc_wrt_message_data_value_set(Ewk_IPC_Wrt_Message_Data *data, const char *value)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, false);
+    data->SetValue(value);
+    return true;
+}
+
+Eina_Stringshare *ewk_ipc_wrt_message_data_id_get(const Ewk_IPC_Wrt_Message_Data *data)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
+    return eina_stringshare_add(data->GetId());
+}
+
+Eina_Bool ewk_ipc_wrt_message_data_id_set(Ewk_IPC_Wrt_Message_Data *data, const char *id)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, false);
+    data->SetId(id);
+    return true;
+}
+
+Eina_Stringshare *ewk_ipc_wrt_message_data_reference_id_get(const Ewk_IPC_Wrt_Message_Data *data)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
+    return eina_stringshare_add(data->GetReferenceId());
+}
+
+Eina_Bool ewk_ipc_wrt_message_data_reference_id_set(Ewk_IPC_Wrt_Message_Data *data, const char *reference_id)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(data, false);
+    data->SetReferenceId(reference_id);
+    return true;
+}
+
+Eina_Bool ewk_ipc_plugins_message_send(int routingId, const Ewk_IPC_Wrt_Message_Data* data)
+{
+    return tizen_webview::WrtPluginsIpc::SendMessage(routingId, *data);
+}
+
+Eina_Bool ewk_ipc_wrt_message_send(Ewk_Context* context, const Ewk_IPC_Wrt_Message_Data* data)
+{
+    return tizen_webview::WrtIpc::SendMessage(context, *data);
+}
+
+Eina_Bool ewk_ipc_plugins_sync_message_send(int routingId, Ewk_IPC_Wrt_Message_Data* data)
+{
+    return tizen_webview::WrtPluginsIpc::SendSyncMessage(routingId, data);
+}
+
+
+Ewk_IPC_Wrt_Message_Data *ewk_ipc_wrt_message_data_new()
+{
+    return new Ewk_IPC_Wrt_Message_Data();
+}
+
+void ewk_ipc_wrt_message_data_del(Ewk_IPC_Wrt_Message_Data *data)
+{
+    delete data;
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_ipc_message.h b/tizen_src/ewk/efl_integration/public/ewk_ipc_message.h
new file mode 100644 (file)
index 0000000..554c08b
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_ipc_message.h
+ * @brief   Custom support for ipc messages
+ */
+
+#ifndef EWK_IPC_MESSAGE_H
+#define EWK_IPC_MESSAGE_H
+
+#include <Eina.h>
+#include "ewk_export.h"
+#include "ewk_context.h"
+
+typedef struct Ewk_Wrt_Message_Data Ewk_IPC_Wrt_Message_Data;
+
+/*
+ * Create new Ewk_Wrt_Message_Data object. It has to freed by the caller
+ * using ewk_ipc_wrt_message_data_del()
+ */
+EAPI Ewk_IPC_Wrt_Message_Data* ewk_ipc_wrt_message_data_new();
+
+/*
+ * Delete the Ewk_Wrt_Message_Object passed by the caller.
+ */
+EAPI void ewk_ipc_wrt_message_data_del(Ewk_IPC_Wrt_Message_Data* data);
+
+/*
+ * Set message type
+ *
+ * @return false if NULL string was provided, true otherwise
+ */
+EAPI Eina_Bool ewk_ipc_wrt_message_data_type_set(Ewk_IPC_Wrt_Message_Data *data, const char *type);
+
+/*
+ * Get the type of given message. The string should be released with eina_stringshare_del()
+ *
+ * @return true on success, false in case provided data structure is NULL
+ */
+EAPI Eina_Stringshare* ewk_ipc_wrt_message_data_type_get(const Ewk_IPC_Wrt_Message_Data *data);
+
+/*
+ * Set message value
+ *
+ * @return false if NULL string was provided, true otherwise
+ */
+EAPI Eina_Bool ewk_ipc_wrt_message_data_value_set(Ewk_IPC_Wrt_Message_Data *data, const char *value);
+
+/*
+ * Get message value. The string should be released with eina_stringshare_del()
+ *
+ * @return true on success, false in case provided data structure is NULL
+ */
+EAPI Eina_Stringshare* ewk_ipc_wrt_message_data_value_get(const Ewk_IPC_Wrt_Message_Data *data);
+
+/*
+ * Set message ID
+ *
+ * @return false if NULL string was provided, true otherwise
+ */
+EAPI Eina_Bool ewk_ipc_wrt_message_data_id_set(Ewk_IPC_Wrt_Message_Data *data, const char *id);
+
+/*
+ * Get message ID. The string should be released with eina_stringshare_del()
+ *
+ * @return true on success, false in case provided data structure is NULL
+ */
+EAPI Eina_Stringshare* ewk_ipc_wrt_message_data_id_get(const Ewk_IPC_Wrt_Message_Data *data);
+
+/*
+ * Get message reference ID
+ *
+ * @return false if NULL string was provided, true otherwise
+ */
+EAPI Eina_Bool ewk_ipc_wrt_message_data_reference_id_set(Ewk_IPC_Wrt_Message_Data *data, const char *reference_id);
+
+/*
+ * Set message reference ID. The string should be released with eina_stringshare_del()
+ *
+ * @return true on success, false in case provided data structure is NULL
+ */
+EAPI Eina_Stringshare* ewk_ipc_wrt_message_data_reference_id_get(const Ewk_IPC_Wrt_Message_Data *data);
+
+/**
+ *  Send IPC message to Wrt
+ *
+ *  Plugins -> Wrt (Renderer->Browser)
+ */
+EAPI Eina_Bool ewk_ipc_plugins_message_send(int routingId, const Ewk_IPC_Wrt_Message_Data* data);
+
+/**
+ *   Send IPC message to Plugins
+ *
+ *   Wrt -> Plugins (Browser->Renderer)
+ *   //TODO - it is always send to all rendereres - it need to be modified
+ */
+EAPI Eina_Bool ewk_ipc_wrt_message_send(Ewk_Context* context, const Ewk_IPC_Wrt_Message_Data* data);
+
+
+/**
+ *  Send Synchronous IPC message to Wrt
+ *
+ *  Plugins -> Wrt (answer: -> Plugins) (Renderer->Browser -> Renderer)
+ *
+ *  If success the value member will be set by the handler
+ */
+EAPI Eina_Bool ewk_ipc_plugins_sync_message_send(int routingId, Ewk_IPC_Wrt_Message_Data* data);
+
+
+#endif // EWK_IPC_MESSAGE_H
diff --git a/tizen_src/ewk/efl_integration/public/ewk_log.h b/tizen_src/ewk/efl_integration/public/ewk_log.h
new file mode 100644 (file)
index 0000000..d9d49d6
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_log.h
+ * @brief   flags related to logging functions.
+ */
+
+#ifndef ewk_log_h
+#define ewk_log_h
+
+#include <eina_log.h>
+
+extern int _ewk_log_dom;
+
+#define CRITICAL(...) EINA_LOG_DOM_CRIT(_ewk_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_ewk_log_dom, __VA_ARGS__)
+#define WARN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__)
+#define INFO(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(_ewk_log_dom, __VA_ARGS__)
+
+#endif //ewk_log.h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_main.cc b/tizen_src/ewk/efl_integration/public/ewk_main.cc
new file mode 100644 (file)
index 0000000..4281575
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2013 Samsung Electronics
+ * Copyright (C) 2012 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_main.h"
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Ecore_IMF.h>
+#include <Edje.h>
+#include <Eina.h>
+#include <Evas.h>
+
+#ifdef HAVE_ECORE_X
+#include <Ecore_X.h>
+#endif
+
+#include "public/ewk_log.h"
+#include "private/webview_delegate_ewk.h"
+#include "private/ewk_private.h"
+
+// TODO: remove dependency
+#include <../impl/command_line_efl.h>
+#include <../impl/eweb_context.h>
+#include <../impl/ewk_global_data.h>
+
+static int _ewkInitCount = 0;
+
+/////////////////////////////////////////////////////////////////////////////
+//private function declaration here
+static void _ewk_init_web_engine(void);
+static void _ewk_shutdown_web_engine(void);
+
+/**
+ * \var     _ewk_log_dom
+ * @brief   the log domain identifier that is used with EINA's macros
+ */
+int _ewk_log_dom = -1;
+
+int ewk_init(void)
+{
+  if (_ewkInitCount)
+      return ++_ewkInitCount;
+
+  if (!eina_init())
+      goto error_eina;
+
+  _ewk_log_dom = eina_log_domain_register("ewebview-blink", EINA_COLOR_ORANGE);
+  if (_ewk_log_dom < 0) {
+      EINA_LOG_CRIT("could not register log domain 'ewebview-blink'");
+      goto error_log_domain;
+  }
+
+  if (!evas_init()) {
+      CRITICAL("could not init evas.");
+      goto error_evas;
+  }
+
+  if (!ecore_init()) {
+      CRITICAL("could not init ecore.");
+      goto error_ecore;
+  }
+
+  if (!ecore_evas_init()) {
+      CRITICAL("could not init ecore_evas.");
+      goto error_ecore_evas;
+  }
+
+  if (!ecore_imf_init()) {
+      CRITICAL("could not init ecore_imf.");
+      goto error_ecore_imf;
+  }
+
+#ifdef HAVE_ECORE_X
+  if (!ecore_x_init(0)) {
+      CRITICAL("could not init ecore_x.");
+      goto error_ecore_x;
+  }
+#endif
+
+  if (!edje_init()) {
+      CRITICAL("Could not init edje.");
+      goto error_edje;
+  }
+
+  // FIXME: do we need glib integration like WebKit?
+#if 0
+#if !GLIB_CHECK_VERSION(2, 35, 0)
+  g_type_init();
+#endif
+
+  if (!ecore_main_loop_glib_integrate()) {
+      WARN("Ecore was not compiled with GLib support, some plugins will not "
+          "work (ie: Adobe Flash)");
+  }
+#endif
+
+  _ewk_init_web_engine();
+  return ++_ewkInitCount;
+
+error_edje:
+#ifdef HAVE_ECORE_X
+  ecore_x_shutdown();
+error_ecore_x:
+#else
+  ecore_imf_shutdown();
+#endif
+error_ecore_imf:
+  ecore_evas_shutdown();
+error_ecore_evas:
+  ecore_shutdown();
+error_ecore:
+  evas_shutdown();
+error_evas:
+  eina_log_domain_unregister(_ewk_log_dom);
+  _ewk_log_dom = -1;
+error_log_domain:
+  eina_shutdown();
+error_eina:
+  return 0;
+}
+
+int ewk_shutdown(void)
+{
+  if (--_ewkInitCount)
+      return _ewkInitCount;
+
+  _ewk_shutdown_web_engine();
+
+  edje_shutdown();
+#ifdef HAVE_ECORE_X
+  ecore_x_shutdown();
+#endif
+  ecore_imf_shutdown();
+  ecore_evas_shutdown();
+  ecore_shutdown();
+  evas_shutdown();
+  eina_log_domain_unregister(_ewk_log_dom);
+  _ewk_log_dom = -1;
+  eina_shutdown();
+
+  return 0;
+}
+
+void ewk_set_arguments(int argc, char** argv)
+{
+    CommandLineEfl::Init(argc, argv);
+}
+
+void ewk_home_directory_set(const char* path)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+//Private functions implementations for ewk_main module
+
+//Initialize web engine
+void _ewk_init_web_engine()
+{
+  if(!WebViewDelegate::IsDelegateRegistered()) {
+    WebViewDelegate::RegisterDelegate(
+      const_cast<WebViewDelegateEwk*>(&WebViewDelegateEwk::GetInstance()));
+  }
+}
+
+void _ewk_shutdown_web_engine(void)
+{
+    //TODO: any web engine destroy to be done here
+    CommandLineEfl::Shutdown();
+    if (EwkGlobalData::GetInstance()) {
+      delete EwkGlobalData::GetInstance();
+    }
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_main.h b/tizen_src/ewk/efl_integration/public/ewk_main.h
new file mode 100644 (file)
index 0000000..f6ffa62
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2013 Samsung Electronics
+ * Copyright (C) 2012 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file    ewk_main.h
+ * @brief   The general initialization of WebKit2-EFL, not tied to any view object.
+ */
+
+#ifndef ewk_main_h
+#define ewk_main_h
+
+#include <Eina.h>
+
+#include "ewk_export.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Initializes WebKit's instance.
+ *
+ * - initializes components needed by EFL,
+ * - increases a reference count of WebKit's instance.
+ *
+ * @return a reference count of WebKit's instance on success or 0 on failure
+ */
+EAPI int ewk_init(void);
+
+/**
+ * Decreases a reference count of WebKit's instance, possibly destroying it.
+ *
+ * If the reference count reaches 0 WebKit's instance is destroyed.
+ *
+ * @return a reference count of WebKit's instance
+ */
+EAPI int ewk_shutdown(void);
+
+/**
+ * Set argument count and argument vector.
+ */
+EAPI void ewk_set_arguments(int argc, char** argv);
+
+// #if ENABLE(TIZEN_WEBKIT2_SET_HOME_DIRECTORY)
+EAPI void ewk_home_directory_set(const char* path);
+// #endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_main_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_notification.cc b/tizen_src/ewk/efl_integration/public/ewk_notification.cc
new file mode 100644 (file)
index 0000000..db4ee18
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_notification.h"
+#include <Evas.h>
+
+// TODO: remove dependency
+#include <../impl/eweb_view.h>
+#include <../impl/browser_context_efl.h>
+
+#include "private/ewk_context_private.h"
+#include "private/ewk_security_origin_private.h"
+#include "private/ewk_notification_private.h"
+#include "private/ewk_private.h"
+
+
+const char *ewk_notification_body_get(const Ewk_Notification *ewk_notification)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(ewk_notification, 0);
+  return ewk_notification->GetBody();
+}
+
+void ewk_notification_clicked(Ewk_Context *context, uint64_t notification_id)
+{
+#if !defined(EWK_BRINGUP)
+#warning "[M38] TODO: Fix and re-enable notifications (edit efl_integration/public/ewk_notifications.cc)"
+  EINA_SAFETY_ON_NULL_RETURN(context);
+  context->browser_context()->GetNotificationController()->NotifyNotificationClicked(notification_id);
+#endif
+}
+
+const char *ewk_notification_icon_url_get(const Ewk_Notification *ewk_notification)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(ewk_notification, 0);
+  return ewk_notification->GetIconUrl();
+}
+
+uint64_t ewk_notification_id_get(const Ewk_Notification *ewk_notification)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(ewk_notification, 0);
+  return ewk_notification->GetID();
+}
+
+const Ewk_Security_Origin *ewk_notification_permission_request_origin_get(
+    const Ewk_Notification_Permission_Request *request)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+  return static_cast<const Ewk_Security_Origin*>(request->GetSecurityOrigin());
+}
+
+void ewk_notification_permission_request_set(Ewk_Notification_Permission_Request *request, Eina_Bool allowed)
+{
+#if !defined(EWK_BRINGUP)
+#warning "[M38] TODO: Fix and re-enable notifications (edit efl_integration/public/ewk_notifications.cc)"
+  EINA_SAFETY_ON_NULL_RETURN(request);
+  EWebView* view = EWebView::FromEvasObject(request->GetWebviewEvasObject());
+  if (view)
+    view->context()->browser_context()->GetNotificationController()->SetPermissionForNotification(request, allowed);
+  delete request;
+#endif
+}
+
+void ewk_notification_permission_request_suspend(Ewk_Notification_Permission_Request *request)
+{
+  EINA_SAFETY_ON_NULL_RETURN(request);
+  request->SetSuspend(true);
+}
+
+void ewk_notification_policies_removed(Ewk_Context* ewkContext, Eina_List* origins)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+const Ewk_Security_Origin *ewk_notification_security_origin_get(const Ewk_Notification *ewk_notification)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(ewk_notification, 0);
+  return static_cast<const Ewk_Security_Origin*>(ewk_notification->GetSecurityOrigin());
+}
+
+void ewk_notification_showed(Ewk_Context *context, uint64_t notification_id)
+{
+  // No Matching content API
+}
+
+const char *ewk_notification_title_get(const Ewk_Notification *ewk_notification)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(ewk_notification, 0);
+  return ewk_notification->GetTitle();
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_notification.h b/tizen_src/ewk/efl_integration/public/ewk_notification.h
new file mode 100644 (file)
index 0000000..bef1c2f
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_notification_h
+#define ewk_notification_h
+
+#include <Eina.h>
+#include "ewk_context.h"
+#include "ewk_security_origin.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _Ewk_Notification_Permission {
+    const char* origin;
+    Eina_Bool allowed;
+};
+
+typedef struct Ewk_Notification Ewk_Notification;
+typedef struct _Ewk_Notification_Permission Ewk_Notification_Permission;
+typedef struct Ewk_Notification_Permission_Request Ewk_Notification_Permission_Request;
+
+/**
+ * Requests for getting body of notification.
+ *
+ * @param ewk_notification pointer of notificaion data
+ *
+ * @return body of notification
+ *         Lifetime only valid as long as @a ewk_notification is valid.
+ */
+EAPI const char *ewk_notification_body_get(const Ewk_Notification *ewk_notification);
+
+/**
+ * Notify that notification is clicked.
+ *
+ * @param context context object
+ * @param notification_id identifier of notification
+ */
+EAPI void ewk_notification_clicked(Ewk_Context *context, uint64_t notification_id);
+
+/**
+ * Requests for getting icon url of notification.
+ *
+ * @param ewk_notification pointer of notification data
+ *
+ * @return icon url of notification
+ *         Lifetime only valid as long as @a ewk_notification is valid.
+ */
+EAPI const char *ewk_notification_icon_url_get(const Ewk_Notification *ewk_notification);
+
+/**
+ * Requests for getting id of notification.
+ *
+ * @param ewk_notification pointer of notification data
+ *
+ * @return id of notification
+ */
+EAPI uint64_t ewk_notification_id_get(const Ewk_Notification *ewk_notification);
+
+/**
+ * Requests for getting origin of notification permission request.
+ *
+ * @param request Ewk_Notification_Permission_Request object to get origin for notification permission request
+ *
+ * @return security origin of notification permission request
+ *         Lifetime only valid as long as @a ewk_notification is valid.
+ */
+EAPI const Ewk_Security_Origin *ewk_notification_permission_request_origin_get(const Ewk_Notification_Permission_Request *request);
+
+/**
+ * Sets permission of notification.
+ *
+ * @param request Ewk_Notification_Permission_Request object to allow/deny notification permission
+ *        request is freed in this function.
+ * @param allowed @c EINA_TRUE if permission is allowed, @c EINA_FALSE if permission is denied
+ */
+EAPI void ewk_notification_permission_request_set(Ewk_Notification_Permission_Request *request, Eina_Bool allowed);
+
+/**
+ * Suspend the operation for permission request.
+ *
+ * This suspends the operation for permission request.
+ * This is very useful to decide the policy from the additional UI operation like the popup.
+ *
+ * @param request Ewk_Notification_Permission_Request object to suspend notification permission request
+ */
+EAPI void ewk_notification_permission_request_suspend(Ewk_Notification_Permission_Request *request);
+
+/**
+ * Notify that notification policies are removed.
+ *
+ * @param context context object
+ * @param origins list of security origins(made by UAs)
+ */
+EAPI void ewk_notification_policies_removed(Ewk_Context *context, Eina_List *origins);
+
+/**
+ * Requests for getting security origin of notification.
+ *
+ * @param ewk_notification pointer of notification data
+ *
+ * @return security origin of notification
+ *         Lifetime only valid as long as @a ewk_notification is valid.
+ */
+EAPI const Ewk_Security_Origin *ewk_notification_security_origin_get(const Ewk_Notification *ewk_notification);
+
+/**
+ * Notify that notification is showed.
+ *
+ * @param context context object
+ * @param notification_id identifier of notification
+ */
+EAPI void ewk_notification_showed(Ewk_Context *context, uint64_t notification_id);
+
+/**
+ * Requests for getting title of notification.
+ *
+ * @param ewk_notification pointer of notification data
+ *
+ * @return title of notification
+ *         Lifetime only valid as long as @a ewk_notification is valid.
+ */
+EAPI const char *ewk_notification_title_get(const Ewk_Notification *ewk_notification);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_notification_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_object.cc b/tizen_src/ewk/efl_integration/public/ewk_object.cc
new file mode 100644 (file)
index 0000000..d8ec397
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this item of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this item of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_object.h"
+#include "private/ewk_private.h"
+
+#if defined(OS_TIZEN_TV)
+Ewk_Object* ewk_object_ref(Ewk_Object* object)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+
+void ewk_object_unref(Ewk_Object* object)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_object.h b/tizen_src/ewk/efl_integration/public/ewk_object.h
new file mode 100644 (file)
index 0000000..8e75d32
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * copyright (C) 2012 Intel Corporation. All rights reserved.
+ * copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_object.h
+ * @brief   Describes the Ewk Ref Counted API.
+ */
+
+#ifndef ewk_object_h
+#define ewk_object_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for Ewk_Object */
+typedef struct EwkObject Ewk_Object;
+
+/**
+ * Increases the reference count of the given Ewk_Object.
+ *
+ * @param object the Ewk_Object instance to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
+ */
+EAPI Ewk_Object *ewk_object_ref(Ewk_Object *object);
+
+/**
+ * Decreases the reference count of the given Ewk_Object, possibly freeing it.
+ *
+ * When the reference count reaches 0, the item is freed.
+ *
+ * @param object the Ewk_Object instance to decrease the reference count
+ */
+EAPI void ewk_object_unref(Ewk_Object *object);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_object_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_page_group.cc b/tizen_src/ewk/efl_integration/public/ewk_page_group.cc
new file mode 100644 (file)
index 0000000..5308b6f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_page_group.h"
+#include "private/ewk_private.h"
+
+#if defined(OS_TIZEN_TV)
+Ewk_Page_Group* ewk_page_group_create(const char* identifier)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_page_group.h b/tizen_src/ewk/efl_integration/public/ewk_page_group.h
new file mode 100644 (file)
index 0000000..b6da853
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_page_group.h
+ * @brief   Describes the Ewk Page Group API.
+ */
+
+#ifndef ewk_page_group_h
+#define ewk_page_group_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Declare Ewk_Page_Group as Ewk_Object.
+ *
+ * @see Ewk_Object
+ */
+typedef struct EwkObject Ewk_Page_Group;
+
+/**
+ * Creates a new Ewk_Page_Group.
+ *
+ * The returned Ewk_Page_Group object @b should be unref'ed after use.
+ *
+ * @return Ewk_Page_Group object on success or @c NULL on failure
+ *
+ * @see ewk_object_unref
+ */
+EAPI Ewk_Page_Group *ewk_page_group_create(const char *identifier);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_page_group_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.cc
new file mode 100644 (file)
index 0000000..770adcc
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_policy_decision.h"
+
+#if !defined(EWK_BRINGUP)
+#include <tizen_webview/public/tw_frame.h>
+#endif
+// TODO: remove dependency
+#include <../impl/web_contents_delegate_efl.h>
+
+#include "private/chromium_glue.h"
+#include "private/ewk_policy_decision_private.h"
+#include "private/ewk_private.h"
+
+const char* ewk_policy_decision_cookie_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetCookie();
+}
+
+const char* ewk_policy_decision_userid_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetAuthUser();
+}
+
+const char* ewk_policy_decision_password_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetAuthPassword();
+}
+
+const char* ewk_policy_decision_url_get(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetUrl();
+}
+
+const char* ewk_policy_decision_scheme_get(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetScheme();
+}
+
+const char* ewk_policy_decision_host_get(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetHost();
+}
+
+const char* ewk_policy_decision_http_method_get(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+#if !defined(EWK_BRINGUP)
+  return policyDecision->GetHttpMethod();
+#else
+  return NULL;
+#endif
+}
+
+Ewk_Policy_Decision_Type ewk_policy_decision_type_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EWK_POLICY_DECISION_USE);
+  return chromium_glue::from(policyDecision->GetDecisionType());
+}
+
+const char* ewk_policy_decision_response_mime_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetResponseMime();
+}
+
+const Eina_Hash* ewk_policy_decision_response_headers_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return policyDecision->GetResponseHeaders();
+}
+
+int ewk_policy_decision_response_status_code_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, 0);
+  return policyDecision->GetResponseStatusCode();
+}
+
+Eina_Bool ewk_policy_decision_suspend(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EINA_FALSE);
+  policyDecision->Suspend();
+  // It is already suspended. We don't need to take any action here.
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_policy_decision_use(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EINA_FALSE);
+  policyDecision->Use();
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_policy_decision_ignore(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EINA_FALSE);
+  policyDecision->Ignore();
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_policy_decision_download(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EINA_FALSE);
+  policyDecision->Download();
+  return EINA_TRUE;
+}
+
+Ewk_Policy_Navigation_Type ewk_policy_decision_navigation_type_get(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EWK_POLICY_NAVIGATION_TYPE_OTHER);
+  return chromium_glue::from(policyDecision->GetNavigationType());
+}
+
+Ewk_Frame_Ref ewk_policy_decision_frame_get(Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, NULL);
+  return static_cast<Ewk_Frame_Ref>(policyDecision->GetFrameRef());
+}
+
+Eina_Bool ewk_policy_decision_is_main_frame(const Ewk_Policy_Decision* policyDecision)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(policyDecision, EINA_FALSE);
+#if !defined(EWK_BRINGUP)
+  return policyDecision->GetFrameRef()->IsMainFrame() ? EINA_TRUE : EINA_FALSE;
+#else
+  return EINA_TRUE;
+#endif
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.h b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.h
new file mode 100644 (file)
index 0000000..26e15be
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_policy_decision_h
+#define ewk_policy_decision_h
+
+#include <Eina.h>
+
+#include "ewk_export.h"
+#include "ewk_frame.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \enum   Ewk_Policy_Decision_Type
+ * @brief   Provides option to policy decision type.
+ */
+enum _Ewk_Policy_Decision_Type {
+    EWK_POLICY_DECISION_USE,
+    EWK_POLICY_DECISION_DOWNLOAD,
+    EWK_POLICY_DECISION_IGNORE
+};
+typedef enum _Ewk_Policy_Decision_Type Ewk_Policy_Decision_Type;
+
+typedef struct Ewk_Policy_Decision Ewk_Policy_Decision;
+
+enum _Ewk_Policy_Navigation_Type {
+    EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED = 0,
+    EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED = 1,
+    EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD = 2,
+    EWK_POLICY_NAVIGATION_TYPE_RELOAD = 3,
+    EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED = 4,
+    EWK_POLICY_NAVIGATION_TYPE_OTHER = 5
+};
+typedef enum _Ewk_Policy_Navigation_Type Ewk_Policy_Navigation_Type;
+
+/**
+ * Returns cookie from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c cookie string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_cookie_get(const Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Returns user id for Authorization from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c user id string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_userid_get(const Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Returns password for Authorization from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c password string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_password_get(const Ewk_Policy_Decision* policy_decision);
+
+// This is not const, because we populate url from GURL on the fly.
+/**
+ * Returns url from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c url string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_url_get(Ewk_Policy_Decision* policy_decision);
+
+// This is not const, because we populate url from GURL on the fly.
+/**
+ * Returns scheme from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c scheme string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_scheme_get(Ewk_Policy_Decision* policy_decision);
+
+// This is not const, because we populate url from GURL on the fly.
+/**
+ * Returns host from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c host string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_host_get(Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Returns http method from Policy Decision object.
+ *
+ * @param policy_decision policy decsision object
+ *
+ * @return @c http method string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_http_method_get(Ewk_Policy_Decision* policyDecision);
+
+/**
+ * Returns mimetype for response data from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c mimetype string on success or empty string on failure
+ */
+EAPI const char* ewk_policy_decision_response_mime_get(const Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Returns http headers for response data from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c http headers on success or NULL on failure
+ */
+EAPI const Eina_Hash* ewk_policy_decision_response_headers_get(const Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Returns http status code from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c http status code number
+ */
+EAPI int ewk_policy_decision_response_status_code_get(const Ewk_Policy_Decision* policyDecision);
+
+/**
+ * Returns policy type from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c policy type
+ */
+EAPI Ewk_Policy_Decision_Type ewk_policy_decision_type_get(const Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Suspend the operation for policy decision.
+ *
+ * This suspends the operation for policy decision when the signal for policy is emitted.
+ * This is very useful to decide the policy from the additional UI operation like the popup.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_policy_decision_suspend(Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Accept the action which triggers this decision.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_policy_decision_use(Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Ignore the action which triggers this decision.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_policy_decision_ignore(Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Cause a download from this decision.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_policy_decision_download(Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Returns navigation type from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c navigation type
+ */
+EAPI Ewk_Policy_Navigation_Type ewk_policy_decision_navigation_type_get(const Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Gets the frame reference from Policy Decision object.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return frame reference on success, or NULL on failure
+ */
+EAPI Ewk_Frame_Ref ewk_policy_decision_frame_get(Ewk_Policy_Decision* policy_decision);
+
+/**
+ * Checks if frame requested in policy decision is main frame.
+ *
+ * @param policy_decision policy decision object
+ *
+ * @return @c EINA_TRUE or @c EINA_FALSE
+ */
+EAPI Eina_Bool ewk_policy_decision_is_main_frame(const Ewk_Policy_Decision* policy_decision);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_policy_decision_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_popup_menu_item.cc b/tizen_src/ewk/efl_integration/public/ewk_popup_menu_item.cc
new file mode 100644 (file)
index 0000000..bdbe2a0
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_popup_menu_item.h"
+#include "private/ewk_private.h"
+
+Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item* item)
+{
+  LOG_EWK_API_MOCKUP();
+  return EWK_POPUP_MENU_UNKNOWN;
+}
+
+const char* ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item* item)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item* item)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_popup_menu_item.h b/tizen_src/ewk/efl_integration/public/ewk_popup_menu_item.h
new file mode 100644 (file)
index 0000000..d0fdb63
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_popup_menu_item.h
+ * @brief   Describes the Ewk Popup Menu Item API.
+ */
+
+#ifndef ewk_popup_menu_item_h
+#define ewk_popup_menu_item_h
+
+#include <Eina.h>
+#include "ewk_view.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Enum values containing type of popup menu item. */
+typedef enum {
+    EWK_POPUP_MENU_SEPARATOR,
+    EWK_POPUP_MENU_ITEM,
+    EWK_POPUP_MENU_UNKNOWN = -1
+} Ewk_Popup_Menu_Item_Type;
+
+/** Creates a type name for Ewk_Popup_Menu_Item */
+typedef struct Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
+
+/**
+ * Returns type of the popup menu item.
+ *
+ * @param item the popup menu item instance
+ *
+ * @return the type of the @a item or @c EWK_POPUP_MENU_UNKNOWN in case of error.
+ */
+EAPI Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item *item);
+
+/**
+ * Returns text of the popup menu item.
+ *
+ * @param item the popup menu item instance
+ *
+ * @return the text of the @a item or @c NULL in case of error. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup()
+ */
+EAPI const char *ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item *item);
+    
+/**
+ * Returns whether the popup menu item is selected or not.
+ *
+ * @param item the popup menu item instance
+ *
+ * @return @c EINA_TRUE if the popup menu item is selected, @c EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item *item);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_popup_menu_item_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_quota_permission_request.cc b/tizen_src/ewk/efl_integration/public/ewk_quota_permission_request.cc
new file mode 100644 (file)
index 0000000..feff033
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#if !defined(EWK_BRINGUP)
+
+#include "ewk_quota_permission_request.h"
+#include "private/ewk_quota_permission_request_private.h"
+
+EAPI Eina_Stringshare* ewk_quota_permission_request_origin_protocol_get(const Ewk_Quota_Permission_Request* request)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+  return request->GetProtocol();
+}
+
+EAPI Eina_Stringshare* ewk_quota_permission_request_origin_host_get(const Ewk_Quota_Permission_Request* request)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+  return request->GetHost();
+}
+
+EAPI uint16_t ewk_quota_permission_request_origin_port_get(const Ewk_Quota_Permission_Request* request)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+  return static_cast<uint16_t>(request->GetPort());
+}
+
+EAPI int64_t ewk_quota_permission_request_quota_get(const Ewk_Quota_Permission_Request* request)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+  return request->GetQuota();
+}
+
+EAPI Eina_Bool ewk_quota_permission_request_is_persistent_get(const Ewk_Quota_Permission_Request* request)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(request, EINA_FALSE);
+  return request->IsPersistent() ? EINA_TRUE : EINA_FALSE;
+}
+
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_quota_permission_request.h b/tizen_src/ewk/efl_integration/public/ewk_quota_permission_request.h
new file mode 100644 (file)
index 0000000..6817842
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_quota_permission_request_h
+#define ewk_quota_permission_request_h
+
+#if !defined(EWK_BRINGUP)
+
+#include <stdint.h>
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Quota_Permission_Request Ewk_Quota_Permission_Request;
+
+/**
+ * Requests for getting protocol of quota permission request
+ *
+ * @param request quota permission request
+ *
+ * @return protocol of security origin
+ */
+EAPI Eina_Stringshare* ewk_quota_permission_request_origin_protocol_get(const Ewk_Quota_Permission_Request* request);
+
+/**
+ * Requests for getting host of quota permission request
+ *
+ * @param request quota permission request
+ *
+ * @return host of security origin
+ */
+EAPI Eina_Stringshare* ewk_quota_permission_request_origin_host_get(const Ewk_Quota_Permission_Request* request);
+
+/**
+ * Requests for getting port of quota permission request
+ *
+ * @param request quota permission request
+ *
+ * @return port of security origin
+ */
+EAPI uint16_t ewk_quota_permission_request_origin_port_get(const Ewk_Quota_Permission_Request* request);
+
+/**
+ * Requests for getting new quota size of quota permission request
+ *
+ * @param request quota permission request
+ *
+ * @return protocol of security origin
+ */
+EAPI int64_t ewk_quota_permission_request_quota_get(const Ewk_Quota_Permission_Request* request);
+
+/**
+ * Requests for checking if storage type of quota permission request is persistent
+ *
+ * @param request quota permission request
+ *
+ * @return @c EINA_TRUE if storage is persistent, otherwise @c EINA_FALSE
+ */
+EAPI Eina_Bool ewk_quota_permission_request_is_persistent_get(const Ewk_Quota_Permission_Request* request);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // EWK_BRINGUP
+#endif // ewk_quota_permission_request_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_security_origin.cc b/tizen_src/ewk/efl_integration/public/ewk_security_origin.cc
new file mode 100644 (file)
index 0000000..674e23c
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_security_origin.h"
+#include "private/ewk_security_origin_private.h"
+
+/*
+ *
+ * @param origin security origin
+ *
+ * @return host of security origin
+ */
+Eina_Stringshare* ewk_security_origin_host_get(const Ewk_Security_Origin* origin)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0);
+    return origin->GetHost();
+}
+
+/**
+ * Requests for getting host of security origin.
+ *
+ * @param origin security origin
+ *
+ * @return protocol of security origin
+ */
+Eina_Stringshare* ewk_security_origin_protocol_get(const Ewk_Security_Origin* origin)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0);
+    return origin->GetProtocol();
+}
+
+/**
+ * Requests for getting host of security origin.
+ *
+ * @param origin security origin
+ *
+ * @return port of security origin
+ */
+uint16_t ewk_security_origin_port_get(const Ewk_Security_Origin* origin)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0);
+    return static_cast<uint16_t>(origin->GetPort());
+}
+
diff --git a/tizen_src/ewk/efl_integration/public/ewk_security_origin.h b/tizen_src/ewk/efl_integration/public/ewk_security_origin.h
new file mode 100644 (file)
index 0000000..769ae48
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_security_origin_h
+#define ewk_security_origin_h
+
+#include <stdint.h>
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_Security_Origin Ewk_Security_Origin;
+
+/**
+ * Requests for getting host of security origin.
+ *
+ * @param origin security origin
+ *
+ * @return host of security origin
+ */
+EAPI Eina_Stringshare* ewk_security_origin_host_get(const Ewk_Security_Origin* origin);
+
+/**
+ * Requests for getting host of security origin.
+ *
+ * @param origin security origin
+ *
+ * @return host of security origin
+ */
+EAPI Eina_Stringshare* ewk_security_origin_protocol_get(const Ewk_Security_Origin* origin);
+
+/**
+ * Requests for getting host of security origin.
+ *
+ * @param origin security origin
+ *
+ * @return host of security origin
+ */
+EAPI uint16_t ewk_security_origin_port_get(const Ewk_Security_Origin* origin);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_security_origin_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.cc b/tizen_src/ewk/efl_integration/public/ewk_settings.cc
new file mode 100644 (file)
index 0000000..460247a
--- /dev/null
@@ -0,0 +1,751 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_settings.h"
+
+#include <tizen_webview/public/tw_webview.h>
+
+// TODO: remove dependency
+#include <ui/events/gestures/gesture_configuration.h>
+#include <../impl/API/ewk_settings_private.h>
+// TODO: move non-ewk header file to other location
+#include "public/text_encoding_map_efl.h"
+#include "eweb_view.h"
+
+#include "private/chromium_glue.h"
+#include "private/ewk_private.h"
+#include "private/ewk_private.h"
+#include "private/ewk_view_private.h"
+
+using tizen_webview::WebView;
+namespace {
+
+void ewkUpdateWebkitPreferences(Evas_Object *ewkView)
+{
+  WebView* impl = WebView::FromEvasObject(ewkView);
+  assert(impl);
+
+  bool autoSelectWord = ewk_settings_select_word_automatically_get(impl->GetSettings());
+  // TODO(sns.park) : remove dependency to chromium internals
+  if(autoSelectWord){
+#if !defined(EWK_BRINGUP)
+    ui::GestureConfiguration::set_double_tap_to_zoom_enabled(false);
+#endif
+  }
+  else{
+#if !defined(EWK_BRINGUP)
+    ui::GestureConfiguration::set_double_tap_to_zoom_enabled(true);
+#endif
+  }
+  impl->UpdateWebKitPreferences();
+}
+
+}
+
+Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+#if !defined(EWK_BRINGUP)
+#warning "[M38] fullscreen_enabled flag has been deleted from webpreference.h"
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().fullscreen_enabled = enable;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+#else
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings* settings)
+{
+#if !defined(EWK_BRINGUP)
+#warning "[M38] fullscreen_enabled flag has been deleted from webpreference.h"
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->getPreferences().fullscreen_enabled;
+#else
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_javascript_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().javascript_enabled = enable;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_javascript_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->getPreferences().javascript_enabled;
+}
+
+Eina_Bool ewk_settings_loads_images_automatically_set(Ewk_Settings* settings, Eina_Bool automatic)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().loads_images_automatically = automatic;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_loads_images_automatically_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->getPreferences().loads_images_automatically;
+}
+
+Eina_Bool ewk_settings_plugins_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().plugins_enabled = enable;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_plugins_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->getPreferences().plugins_enabled;
+}
+
+Eina_Bool ewk_settings_auto_fitting_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  // FIXME: To be implemented when the functionality is required.
+  // To be added in WebkitPreferences -> WebSettings -> Settings
+  settings->setAutoFitting(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_auto_fitting_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  // FIXME: To be implemented when the functionality is required.
+  // To be added in WebkitPreferences -> WebSettings -> Settings
+  return settings->autoFitting();
+}
+
+Eina_Bool ewk_settings_force_zoom_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  settings->getPreferences().force_enable_zoom = enable;
+#endif
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_force_zoom_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  return settings->getPreferences().force_enable_zoom;
+#else
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_font_default_size_set(Ewk_Settings* settings, int size)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().default_font_size = size;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+int ewk_settings_font_default_size_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->getPreferences().default_font_size;
+}
+
+Eina_Bool ewk_settings_scripts_window_open_set(Ewk_Settings* settings, Eina_Bool allow)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().javascript_can_open_windows_automatically = allow;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_scripts_window_open_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->getPreferences().javascript_can_open_windows_automatically;
+}
+
+Eina_Bool ewk_settings_compositing_borders_visible_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  /*
+  This API is impossible to implement in same manner as it was in webkit-efl
+  for few reasons: chromium made compositing-borders-visible setting global - it
+  is either enabled or disabled for whole process, it requires application restart
+  because it is controled by command line switch. It must be provided before
+  spawning any renderer/zygote processes
+  */
+
+  LOG_EWK_API_MOCKUP("Not implement by difference of webkit2 and chromium's behavior");
+  return false;
+}
+
+Eina_Bool ewk_settings_default_encoding_set(Ewk_Settings* settings, const char* encoding)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(encoding, false);
+  settings->getPreferences().default_encoding = std::string(encoding);
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_is_encoding_valid(const char* encoding)
+{
+  return TextEncodingMapEfl::isTextEncodingValid(encoding);
+}
+
+const char* ewk_settings_default_encoding_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, 0);
+  return settings->getPreferences().default_encoding.c_str();
+}
+
+Eina_Bool ewk_settings_private_browsing_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  // This API is not supported by blink engine because it does not support toggling of private browsing mode
+  // Chromium allows to create new WebContext with private browsing enabled for whole lifespan of WebContext
+  // To support private browsing we need to add new ewk API that allows us to create either context or view with
+  // private browsing enabled
+  LOG_EWK_API_MOCKUP("Not supported by chromium");
+  return EINA_FALSE;
+}
+
+Eina_Bool ewk_settings_private_browsing_enabled_get(const Ewk_Settings* settings)
+{
+  // This API is not supported by blink engine because it does not support toggling of private browsing mode
+  // Chromium allows to create new WebContext with private browsing enabled for whole lifespan of WebContext
+  // To support private browsing we need to add new ewk API that allows us to create either context or view with
+  // private browsing enabled
+  LOG_EWK_API_MOCKUP("Not supported by chromium");
+  return EINA_FALSE;
+}
+
+Eina_Bool ewk_settings_editable_link_behavior_set(Ewk_Settings* settings, Ewk_Editable_Link_Behavior behavior)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  settings->getPreferences().editable_link_behavior = static_cast<webkit_glue::EditableLinkBehavior>(behavior);
+#endif
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_load_remote_images_set(Ewk_Settings* settings, Eina_Bool loadRemoteImages)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  // FIXME: To be implemented when the functionality is required.
+  // To be added in WebkitPreferences -> WebSettings -> Settings
+  settings->setLoadRemoteImages(loadRemoteImages);
+  return true;
+}
+
+Eina_Bool ewk_settings_load_remote_images_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  // FIXME: To be implemented when the functionality is required.
+  // To be added in WebkitPreferences -> WebSettings -> Settings
+  return settings->loadRemoteImages();
+}
+
+Eina_Bool ewk_settings_scan_malware_enabled_set(Ewk_Settings* settings, Eina_Bool scanMalwareEnabled)
+{
+  // API is postponed. Possibly chromium's mechanism may be reused.
+  LOG_EWK_API_MOCKUP("Not Supported yet");
+  return false;
+}
+
+Eina_Bool ewk_settings_spdy_enabled_set(Ewk_Settings* settings, Eina_Bool spdyEnabled)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
+  settings->setSpdyEnabled(spdyEnabled);
+
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_settings_performance_features_enabled_set(Ewk_Settings* settings, Eina_Bool spdyEnabled)
+{
+  (void) settings;
+  (void) spdyEnabled;
+  // This function was used to set some libsoup settings.
+  // Chromium doesn't use libsoup.
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+  return EINA_FALSE;
+}
+
+void ewk_settings_link_magnifier_enabled_set(Ewk_Settings* settings, Eina_Bool enabled)
+{
+  EINA_SAFETY_ON_NULL_RETURN(settings);
+  EWK_VIEW_IMPL_GET_OR_RETURN(settings->getEvasObject(), webview);
+
+  webview->SetLinkMagnifierEnabled(enabled);
+}
+
+Eina_Bool ewk_settings_link_magnifier_enabled_get(const Ewk_Settings *settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
+  EWK_VIEW_IMPL_GET_OR_RETURN(const_cast<Ewk_Settings *>(settings)->getEvasObject(), webview, EINA_FALSE);
+
+  return webview->GetLinkMagnifierEnabled();
+}
+
+Eina_Bool ewk_settings_link_effect_enabled_set(Ewk_Settings* settings, Eina_Bool linkEffectEnabled)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+    settings->setLinkEffectEnabled(linkEffectEnabled);
+    return true;
+}
+
+Eina_Bool ewk_settings_link_effect_enabled_get(const Ewk_Settings* settings)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+    return settings->linkEffectEnabled();
+}
+
+Eina_Bool ewk_settings_uses_encoding_detector_set(Ewk_Settings* settings, Eina_Bool use)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  settings->getPreferences().uses_encoding_detector = use;
+#endif
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_uses_encoding_detector_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  return settings->getPreferences().uses_encoding_detector;
+#else
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_default_keypad_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+    settings->setEnableDefaultKeypad(enable);
+
+    return true;
+}
+
+Eina_Bool ewk_settings_default_keypad_enabled_get(const Ewk_Settings* settings)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+    return settings->defaultKeypadEnabled();
+}
+
+Eina_Bool ewk_settings_uses_keypad_without_user_action_set(Ewk_Settings* settings, Eina_Bool use)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setUseKeyPadWithoutUserAction(use);
+  return true;
+}
+
+Eina_Bool ewk_settings_uses_keypad_without_user_action_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->useKeyPadWithoutUserAction();
+}
+
+Eina_Bool ewk_settings_text_zoom_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setTextZoomEnabled(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_text_zoom_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->textZoomEnabled();
+}
+
+Eina_Bool ewk_settings_autofill_password_form_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setAutofillPasswordForm(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_autofill_password_form_enabled_get(Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->autofillPasswordForm();
+}
+
+Eina_Bool ewk_settings_form_candidate_data_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setFormCandidateData(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_form_candidate_data_enabled_get(Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->formCandidateData();
+}
+
+Eina_Bool ewk_settings_form_profile_data_enabled_set(Ewk_Settings *settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setAutofillProfileForm(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_form_profile_data_enabled_get(const Ewk_Settings *settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->autofillProfileForm();
+}
+
+Eina_Bool ewk_settings_current_legacy_font_size_mode_set(Ewk_Settings *settings, Ewk_Legacy_Font_Size_Mode mode)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+  settings->setCurrentLegacyFontSizeMode(chromium_glue::to(mode));
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Ewk_Legacy_Font_Size_Mode ewk_settings_current_legacy_font_size_mode_get(const Ewk_Settings *settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH);
+  return chromium_glue::from(settings->currentLegacyFontSizeMode());
+}
+
+Eina_Bool ewk_settings_paste_image_uri_mode_set(Ewk_Settings *settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  // FIXME: To be implemented when the functionality is required.
+  // To be added in WebkitPreferences -> WebSettings -> Settings
+  settings->setPasteImageUriEnabled(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_paste_image_uri_mode_get(const Ewk_Settings *settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  // FIXME: To be implemented when the functionality is required.
+  // To be added in WebkitPreferences -> WebSettings -> Settings
+  return settings->pasteImageUriEnabled();
+}
+
+
+Eina_Bool ewk_settings_text_selection_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setTextSelectionEnabled(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_text_selection_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->textSelectionEnabled();
+}
+
+Eina_Bool ewk_settings_clear_text_selection_automatically_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setAutoClearTextSelection(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_clear_text_selection_automatically_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->autoClearTextSelection();
+}
+
+Eina_Bool ewk_settings_text_autosizing_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
+  settings->getPreferences().text_autosizing_enabled = enable;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen Mobile Browser");
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_text_autosizing_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
+  return settings->getPreferences().text_autosizing_enabled;
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen Mobile Browser");
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_text_autosizing_font_scale_factor_set(Ewk_Settings* settings, double factor)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  settings->getPreferences().font_scale_factor = factor;
+#endif
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+double ewk_settings_text_autosizing_font_scale_factor_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, -1.0);
+#if !defined(EWK_BRINGUP)
+  return settings->getPreferences().font_scale_factor;
+#else
+  return false;
+#endif
+}
+
+Eina_Bool ewk_settings_edge_effect_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setEdgeEffectEnabled(enable);
+  return true;
+}
+
+Eina_Bool ewk_settings_edge_effect_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->edgeEffectEnabled();
+}
+
+void ewk_settings_text_style_state_enabled_set(Ewk_Settings* settings, Eina_Bool enabled)
+{
+  EINA_SAFETY_ON_NULL_RETURN(settings);
+  settings->setTextStyleStateState(enabled);
+}
+
+Eina_Bool ewk_settings_text_style_state_enabled_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->textStyleStateState();
+}
+
+Eina_Bool ewk_settings_select_word_automatically_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->setAutoSelectWord(enable);
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_select_word_automatically_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  return settings->autoSelectWord();
+}
+
+Ewk_List_Style_Position ewk_settings_initial_list_style_position_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EWK_LIST_STYLE_POSITION_OUTSIDE);
+  // TODO: To be used when the functionality is required.
+#if !defined(EWK_BRINGUP)
+  return static_cast<Ewk_List_Style_Position>(settings->getPreferences().initial_list_style_position);
+#else
+  return static_cast<Ewk_List_Style_Position>(0);
+#endif
+}
+
+Eina_Bool ewk_settings_initial_list_style_position_set(Ewk_Settings* settings, Ewk_List_Style_Position style)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  settings->getPreferences().initial_list_style_position = static_cast<webkit_glue::ListStylePosition>(style);
+#endif
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+  return true;
+}
+
+Eina_Bool ewk_settings_webkit_text_size_adjust_enabled_set(Ewk_Settings* settings, Eina_Bool enabled)
+{
+  // Chromium does not support CSS property "-webkit-text-size-adjust"
+  // and this API was created to disable this property.
+  // There is no need to implement this API.
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+  return false;
+}
+
+// TODO: this API is gone in newer versions of webkit-efl
+void ewk_settings_detect_contents_automatically_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN(settings);
+#if !defined(EWK_BRINGUP)
+  settings->setDetectContentsEnabled(enable);
+#endif
+}
+
+Eina_Bool ewk_settings_detect_contents_automatically_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+#if !defined(EWK_BRINGUP)
+  return settings->getDetectContentsEnabled();
+#else
+  return EINA_FALSE;
+#endif
+}
+
+void ewk_settings_cache_builder_enabled_set(Ewk_Settings *settings, Eina_Bool enabled)
+{
+#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
+  EINA_SAFETY_ON_NULL_RETURN(settings);
+  settings->setCacheBuilder(enabled);
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+#endif
+}
+
+int ewk_settings_default_font_size_get(const Ewk_Settings* settings)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, 0);
+  return settings->getPreferences().default_font_size;
+}
+
+Eina_Bool ewk_settings_default_font_size_set(Ewk_Settings* settings, int size)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  settings->getPreferences().default_font_size = size;
+  return true;
+}
+
+Eina_Bool ewk_settings_default_text_encoding_name_set(Ewk_Settings* settings, const char* encoding)
+{
+#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(encoding, false);
+  settings->setDefaultTextEncoding(encoding);
+  return true;
+#else
+  LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+  return false;
+#endif
+}
+
+#if defined(OS_TIZEN_TV)
+Eina_Bool ewk_settings_encoding_detector_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return false;
+}
+
+Eina_Bool ewk_settings_scripts_can_open_windows_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return false;
+}
+#endif // OS_TIZEN_TV
+
+namespace {
+#define EXTRA_FEATURE_FUNCTIONS(VALNAME) \
+  void Ewk_Extra_Feature_Set_ ## VALNAME(Ewk_Settings* settings, Eina_Bool value) \
+  { \
+    EINA_SAFETY_ON_NULL_RETURN(settings); \
+    settings->set ## VALNAME ## Enabled(value == EINA_TRUE); \
+  } \
+  Eina_Bool Ewk_Extra_Feature_Get_ ## VALNAME(const Ewk_Settings* settings) \
+  { \
+    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE); \
+    return settings->get ## VALNAME ## Enabled() ? EINA_TRUE : EINA_FALSE; \
+  }
+
+#define EWK_EXTRA_FEATURE(NAME, VALNAME) {NAME, Ewk_Extra_Feature_Set_## VALNAME, Ewk_Extra_Feature_Get_ ## VALNAME}
+
+#if !defined(EWK_BRINGUP)
+  EXTRA_FEATURE_FUNCTIONS(LongPress)
+  EXTRA_FEATURE_FUNCTIONS(LinkMagnifier)
+  EXTRA_FEATURE_FUNCTIONS(DetectContents)
+  EXTRA_FEATURE_FUNCTIONS(WebLogin)
+  EXTRA_FEATURE_FUNCTIONS(DoubleTap)
+  EXTRA_FEATURE_FUNCTIONS(Zoom)
+  EXTRA_FEATURE_FUNCTIONS(OpenPanel)
+  EXTRA_FEATURE_FUNCTIONS(AllowRestrictedURL)
+  EXTRA_FEATURE_FUNCTIONS(URLBarHide)
+#endif
+
+  typedef struct {
+    const char* name;
+    void (*set)(Ewk_Settings*, Eina_Bool enable);
+    Eina_Bool (*get)(const Ewk_Settings*);
+  } Ewk_Extra_Feature;
+
+  static Ewk_Extra_Feature extra_features[] = {
+#if !defined(EWK_BRINGUP)
+    EWK_EXTRA_FEATURE("longpress,enable", LongPress),
+    EWK_EXTRA_FEATURE("link,magnifier", LinkMagnifier),
+    EWK_EXTRA_FEATURE("detect,contents", DetectContents),
+    EWK_EXTRA_FEATURE("web,login", WebLogin),
+    EWK_EXTRA_FEATURE("doubletap,enable", DoubleTap),
+    EWK_EXTRA_FEATURE("zoom,enable", Zoom),
+    EWK_EXTRA_FEATURE("openpanel,enable", OpenPanel),
+    EWK_EXTRA_FEATURE("allow,restrictedurl", AllowRestrictedURL),
+    EWK_EXTRA_FEATURE("urlbar,hide", URLBarHide),
+#endif
+    {NULL, NULL, NULL}
+  };
+
+  Ewk_Extra_Feature* find_extra_feature(const char*feature)
+  {
+    for(Ewk_Extra_Feature *feat = extra_features; feat->name != NULL; feat++) {
+      if (strcasecmp(feat->name, feature) == 0) {
+        return feat;
+      }
+    }
+
+    return NULL;
+  }
+}
+
+Eina_Bool ewk_settings_extra_feature_get(const Ewk_Settings* settings, const char* feature)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(feature, EINA_FALSE);
+  Ewk_Extra_Feature *feat = find_extra_feature(feature);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(feat, EINA_FALSE);
+  return feat->get(settings);
+}
+
+void ewk_settings_extra_feature_set(Ewk_Settings* settings, const char* feature, Eina_Bool enable)
+{
+  EINA_SAFETY_ON_NULL_RETURN(settings);
+  EINA_SAFETY_ON_NULL_RETURN(feature);
+  Ewk_Extra_Feature *feat = find_extra_feature(feature);
+  EINA_SAFETY_ON_NULL_RETURN(feat);
+  feat->set(settings, enable);
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.h b/tizen_src/ewk/efl_integration/public/ewk_settings.h
new file mode 100644 (file)
index 0000000..01520d0
--- /dev/null
@@ -0,0 +1,885 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_settings.h
+ * @brief   Describes the settings API.
+ *
+ * @note The ewk_settings is for setting the preference of specific ewk_view.
+ * We can get the ewk_settings from ewk_view using ewk_view_settings_get() API.
+ */
+
+#ifndef ewk_settings_h
+#define ewk_settings_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for Ewk_Settings */
+typedef struct Ewk_Settings Ewk_Settings;
+
+/**
+ * Creates a type name for the callback function used to notify the client when
+ * the continuous spell checking setting was changed by WebKit.
+ *
+ * @param enable @c EINA_TRUE if continuous spell checking is enabled or @c EINA_FALSE if it's disabled
+ */
+typedef void (*Ewk_Settings_Continuous_Spell_Checking_Change_Cb)(Eina_Bool enable);
+
+/**
+ * \enum    _Ewk_Editable_Link_Behavior
+ *
+ * @brief   Editable link behavior mode (Must remain in sync with WKEditableLinkBehavior)
+ */
+enum _Ewk_Editable_Link_Behavior {
+    EWK_EDITABLE_LINK_BEHAVIOR_DEFAULT,
+    EWK_EDITABLE_LINK_BEHAVIOR_ALWAYS_LIVE,
+    EWK_EDITABLE_LINK_BEHAVIOR_ONLY_LIVE_WITH_SHIFTKEY,
+    EWK_EDITABLE_LINK_BEHAVIOR_LIVE_WHEN_NOT_FOCUSED,
+    EWK_EDITABLE_LINK_BEHAVIOR_NEVER_LIVE
+};
+typedef enum _Ewk_Editable_Link_Behavior Ewk_Editable_Link_Behavior;
+
+enum _Ewk_Legacy_Font_Size_Mode {
+    EWK_LEGACY_FONT_SIZE_MODE_ALWAYS,
+    EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH,
+    EWK_LEGACY_FONT_SIZE_MODE_NEVER
+};
+
+typedef enum _Ewk_Legacy_Font_Size_Mode Ewk_Legacy_Font_Size_Mode;
+
+enum _Ewk_List_Style_Position {
+    EWK_LIST_STYLE_POSITION_OUTSIDE, /**< Default WebKit value. */
+    EWK_LIST_STYLE_POSITION_INSIDE
+};
+typedef enum _Ewk_List_Style_Position Ewk_List_Style_Position;
+
+/*
+ * Enables/disables the Javascript Fullscreen API. The Javascript API allows
+ * to request full screen mode, for more information see:
+ * http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
+ *
+ * Default value for Javascript Fullscreen API setting is @c EINA_TRUE .
+ *
+ * @param settings settings object to enable Javascript Fullscreen API
+ * @param enable @c EINA_TRUE to enable Javascript Fullscreen API or
+ *               @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns whether the Javascript Fullscreen API is enabled or not.
+ *
+ * @param settings settings object to query whether Javascript Fullscreen API is enabled
+ *
+ * @return @c EINA_TRUE if the Javascript Fullscreen API is enabled
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Enables/disables the javascript executing.
+ *
+ * @param settings settings object to set javascript executing
+ * @param enable @c EINA_TRUE to enable javascript executing
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_javascript_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns the javascript can be executable or not.
+ *
+ * @param settings settings object to query if the javascript can be executed
+ *
+ * @return @c EINA_TRUE if the javascript can be executed
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_javascript_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Enables/disables auto loading of the images.
+ *
+ * @param settings settings object to set auto loading of the images
+ * @param automatic @c EINA_TRUE to enable auto loading of the images,
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_loads_images_automatically_set(Ewk_Settings *settings, Eina_Bool automatic);
+
+/**
+ * Returns the images can be loaded automatically or not.
+ *
+ * @param settings settings object to get auto loading of the images
+ *
+ * @return @c EINA_TRUE if the images are loaded automatically,
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_loads_images_automatically_get(const Ewk_Settings *settings);
+
+/**
+ * Requests enables/disables the plug-ins.
+ *
+ * @param settings settings object to set the plug-ins
+ * @param enable @c EINA_TRUE to enable the plug-ins
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_plugins_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returs enables/disables the plug-ins.
+ *
+ * @param settings settings object to set the plug-ins
+*
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_plugins_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests setting of auto fit.
+ *
+ * @param settings settings object to fit to width
+ * @param enable to fit to width.
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_auto_fitting_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns the auto fit status.
+ *
+ * @param settings settings object to fit to width
+ *
+ * @return @c EINA_TRUE if enable auto fit or @c EINA_FALSE.
+ */
+EAPI Eina_Bool ewk_settings_auto_fitting_get(const Ewk_Settings *settings);
+
+/**
+ * Requests setting of force zoom.
+ *
+ * @param settings settings object to enable force zoom
+ * @param enable to force zoom
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_force_zoom_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns the force zoom status.
+ *
+ * @param settings settings object to enable force zoom
+ *
+ * @return @c EINA_TRUE if enable force zoom or @c EINA_FALSE.
+ */
+EAPI Eina_Bool ewk_settings_force_zoom_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to set the default font size.
+ *
+ * @param settings settings object to set the default font size
+ * @param size a new default font size to set
+ *
+ * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_settings_font_default_size_set(Ewk_Settings *settings, int size);
+
+/**
+ * Returns the default font size.
+ *
+ * @param settings settings object to set the default font size
+ *
+ * @return @c default font size.
+ */
+EAPI int ewk_settings_font_default_size_get(const Ewk_Settings *settings);
+
+/**
+ * Requests enables/disables if the scripts can open the new windows.
+ *
+ * @param settings settings object to set if the scripts can open the new windows
+ * @param allow @c EINA_TRUE if the scripts can open the new windows
+ *        @c EINA_FALSE if not
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (scripts are disabled)
+ */
+EAPI Eina_Bool ewk_settings_scripts_window_open_set(Ewk_Settings *settings, Eina_Bool allow);
+
+/**
+ * Returns enables/disables if the scripts can open the new windows.
+ *
+ * @param settings settings object to set if the scripts can open the new windows
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (scripts are disabled)
+ */
+EAPI Eina_Bool ewk_settings_scripts_window_open_get(const Ewk_Settings *settings);
+
+/**
+ * Requests for drawing layer borders.
+ *
+ * @param settings settings object to drawing layer borders.
+ * @param enable EINA_TRUE to draw layer borders.
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+
+EAPI Eina_Bool ewk_settings_compositing_borders_visible_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Checks whether WebKit supports the @a encoding.
+ *
+ * @param encoding the encoding string to check whether WebKit supports it
+ *
+ * @return @c EINA_TRUE if WebKit supports @a encoding or @c EINA_FALSE if not or
+ *      on failure
+ */
+EAPI Eina_Bool ewk_settings_is_encoding_valid(const char* encoding);
+
+/**
+ * Requests to set default text encoding name.
+ *
+ * @param settings settings object to set default text encoding name
+ * @param encoding default text encoding name
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_default_encoding_set(Ewk_Settings *settings, const char* encoding);
+
+/**
+ * Returns default text encoding name.
+ *
+ * @param settings settings object to query default text encoding nae
+ *
+ * @return default text encoding name
+ */
+EAPI const char* ewk_settings_default_encoding_get(const Ewk_Settings *settings);
+
+/**
+ * Requests enables/disables private browsing.
+ *
+ * @param settings settings object to set private browsing
+ * @param enable @c EINA_TRUE to enable private browsing
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_private_browsing_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns enables/disables private browsing.
+ *
+ * @param settings settings object to query if private browsing was enabled
+ *
+ * @return @c EINA_TRUE if private browsing was enabled
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_private_browsing_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to set editable link behavior.
+ *
+ * @param settings settings object to set editable link behavior
+ * @param behavior editable link behaviro
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_editable_link_behavior_set(Ewk_Settings *settings, Ewk_Editable_Link_Behavior behavior);
+
+/**
+ * Requests to set the load remote images enable/disable
+ *
+ * @param settings settings object to set load remote images
+ *
+ * @param loadRemoteImages @c EINA_TRUE to enable the load remote images
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_load_remote_images_set(Ewk_Settings *settings, Eina_Bool loadRemoteImages);
+/**
+ * Returns enable/disable the load remote images
+ *
+ * @param settings settings object to get editable link behavior
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_load_remote_images_get(const Ewk_Settings *settings);
+
+/**
+ * Sets link magnifier enabled.
+ *
+ * @param settings settings object
+ * @param enabled link magnifier enabled
+ */
+EAPI void ewk_settings_link_magnifier_enabled_set(Ewk_Settings *settings, Eina_Bool enabled);
+
+/**
+ * Gets link magnifier enabled.
+ *
+ * @param settings settings object
+ *
+ * @return @c EINA_TRUE if link magnifier enabled, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_settings_link_magnifier_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to enable/disable link effect
+ *
+ * @param settings settings object to enable/disable link effect
+ *
+ * @param linkEffectEnabled @c EINA_TRUE to enable the link effect
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_link_effect_enabled_set(Ewk_Settings *settings, Eina_Bool linkEffectEnabled);
+
+/**
+ * Returns enable/disable link effect
+ *
+ * @param settings settings object to get whether link effect is enabled or disabled
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_link_effect_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to set the scan malware enable/disable.
+ *
+ * @param settings settings object to set scan malware
+ *
+ * @param scan_malware_enabled @c EINA_TRUE to enable the scan malware
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_scan_malware_enabled_set(Ewk_Settings *settings, Eina_Bool scan_malware_enabled);
+
+/**
+ * Requests to set the spdy enable/disable.
+ *
+ * @param settings settings object to set spdy on soup
+ *
+ * @param spdy_enabled @c EINA_TRUE to enable the spdy on soup
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_spdy_enabled_set(Ewk_Settings *settings, Eina_Bool spdy_enabled);
+
+/**
+ * Requests to set the performance features of soup enable/disable.
+ *
+ * @param settings settings object to set performance features on soup
+ *
+ * @param spdy_enabled @c EINA_TRUE to enable the performance features on soup
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_performance_features_enabled_set(Ewk_Settings *settings, Eina_Bool performance_features_enabled);
+
+/**
+ * Requests to set using encoding detector.
+ *
+ * @param settings settings object to set using encoding detector
+ * @param use use encoding detector
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_uses_encoding_detector_set(Ewk_Settings *settings, Eina_Bool use);
+
+/**
+ * Returns uses encoding detector.
+ *
+ * @param settings settings object to query uses encoding detector
+ *
+ * @return uses encoding detector
+ */
+EAPI Eina_Bool ewk_settings_uses_encoding_detector_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to set using default keypad (default value : true)
+ *
+ * @param settings settings object to use default keypad
+ * @param enable @c EINA_TRUE to use default keypad  @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_default_keypad_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns enable/disable using default keypad
+ *
+ * @param settings settings object to use default keypad
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_default_keypad_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to set using keypad without user action (default value : true)
+ *
+ * @param settings settings object using keypad without user action
+ * @param enable @c EINA_TRUE to use without user action @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_uses_keypad_without_user_action_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns using keypad without user action
+ *
+ * @param settings settings object using keypad without user action
+ * @param settings settings object to query using keypad without user action
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_uses_keypad_without_user_action_get(const Ewk_Settings *settings);
+
+
+/**
+ * Requests setting use of text zoom.
+ *
+ * @param settings settings object to text zoom
+ * @param enable to text zoom.
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_text_zoom_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns whether text zoom is enabled or not.
+ *
+ * @param settings settings object to text zoom
+ *
+ * @return @c EINA_TRUE if enable text zoom or @c EINA_FALSE.
+ */
+EAPI Eina_Bool ewk_settings_text_zoom_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests enable/disable password form autofill
+ *
+ * @param setting setting object to set password form autofill
+ * @param enable @c EINA_TRUE to enable password form autofill
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_autofill_password_form_enabled_set(Ewk_Settings* settings, Eina_Bool enable);
+
+/**
+ * Returns if password form autofill is enabled or disabled.
+ *
+ * @param setting setting object to get password form autofill
+ *
+ * @return @c EINA_TRUE if password form autofill is enabled
+ *         @c EINA_FALSE if password form autofill is disabled
+ */
+EAPI Eina_Bool ewk_settings_autofill_password_form_enabled_get(Ewk_Settings* settings);
+
+/**
+ * Requests enable/disable form candidate data for autofill
+ *
+ * @param setting setting object to set form candidate data for autofill
+ * @param enable @c EINA_TRUE to enable form candidate data for autofill
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_form_candidate_data_enabled_set(Ewk_Settings* settings, Eina_Bool enable);
+
+/**
+ * Returns if form candidate data for autofill is enabled or disabled.
+ *
+ * @param setting setting object to get form candidate data for autofill
+ *
+ * @return @c EINA_TRUE if form candidate data for autofill is enabled
+ *         @c EINA_FALSE if form candidate data for autofill is disabled
+ */
+EAPI Eina_Bool ewk_settings_form_candidate_data_enabled_get(Ewk_Settings* settings);
+
+/**
+ * Enables/disables form autofill profile feature.
+ *
+ * By default, form autofill profile is disabled.
+ *
+ * @param settings settings object to set the form autofill profile
+ * @param enable @c EINA_TRUE to enable the text autosizing
+ *               @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ *
+ * @see ewk_settings_form_profile_data_enabled_get()
+ */
+EAPI Eina_Bool ewk_settings_form_profile_data_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns whether the autofill_text feature is enabled.
+ *
+ * @param settings settings object to query whether autofill_text feature is enabled
+ *
+ * @return @c EINA_TRUE if the autofill_text feature is enabled
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_form_profile_data_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests enable/disable text selection by default WebKit.
+ *
+ * @param settings setting object to set text selection by default WebKit
+ * @param enable @c EINA_TRUE to enable text selection by default WebKit
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_text_selection_enabled_set(Ewk_Settings* settings, Eina_Bool enable);
+
+/**
+ * Returns if text selection by default WebKit is enabled or disabled.
+ *
+ * @param settings setting object to get text selection by default WebKit
+ *
+ * @return @c EINA_TRUE if text selection by default WebKit is enabled
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_text_selection_enabled_get(const Ewk_Settings* settings);
+
+/**
+ * Requests enables/disables to clear text selection when webview lose focus
+ *
+ * @param settings setting object to set to clear text selection when webview lose focus
+ * @param enable @c EINA_TRUE to clear text selection when webview lose focus
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_clear_text_selection_automatically_set(Ewk_Settings* settings, Eina_Bool enable);
+
+/**
+ * Returns whether text selection is cleared when webview lose focus or not.
+ *
+ * @param settings setting object to get whether text selection is cleared when webview lose focus or not
+ *
+ * @return @c EINA_TRUE if text selection is cleared when webview lose focus
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_clear_text_selection_automatically_get(const Ewk_Settings* settings);
+
+/**
+ * Enables/disables text autosizing.
+ *
+ * By default, the text autosizing is disabled.
+ *
+ * @param settings settings object to set the text autosizing
+ * @param enable @c EINA_TRUE to enable the text autosizing
+ *               @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ *
+ * @see ewk_settings_text_autosizing_enabled_get()
+ */
+EAPI Eina_Bool ewk_settings_text_autosizing_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns whether the text autosizing is enabled.
+ *
+ * The text autosizing is a feature which adjusts the font size of text in wide
+ * columns, and makes text more legible.
+ *
+ * @param settings settings object to query whether text autosizing is enabled
+ *
+ * @return @c EINA_TRUE if the text autosizing is enabled
+ *         @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_text_autosizing_enabled_get(const Ewk_Settings *settings);
+
+
+/**
+ * Sets the scale factor for text autosizing.
+ *
+ * Default value is 1.0.
+ *
+ * @param settings settings object to set the text autosizing
+ * @param factor font scale factor for text autosizing
+ */
+EAPI Eina_Bool ewk_settings_text_autosizing_font_scale_factor_set(Ewk_Settings *settings, double factor);
+
+/**
+ * Gets the current scale factor for text autosizing.
+ *
+ * @param settings settings object to set scale factor for text autosizing
+ *
+ * @return the current font scale factor for text autosizing
+ */
+EAPI double ewk_settings_text_autosizing_font_scale_factor_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to enable/disable edge effect
+ *
+ * @param settings settings object to enable/disable edge effect
+ *
+ * @param enable @c EINA_TRUE to enable the edge effect
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_edge_effect_enabled_set(Ewk_Settings* settings, Eina_Bool enable);
+
+/**
+ * Returns enable/disable edge effect
+ *
+ * @param settings settings object to get whether edge effect is enabled or disabled
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_edge_effect_enabled_get(const Ewk_Settings* settings);
+
+/**
+ * Sets text style for selection mode enabled.
+ *
+ * @param settings settings object
+ * @param enabled text style for selection mode
+ */
+
+EAPI void ewk_settings_text_style_state_enabled_set(Ewk_Settings *settings, Eina_Bool enabled);
+/**
+ * Gets text style for selection mode enabled.
+ *
+ * @param settings settings object
+ *
+ * @return @c EINA_TRUE if text style for selection mode enabled, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_settings_text_style_state_enabled_get(const Ewk_Settings *settings);
+
+/**
+ * Requests to enable/disable to select word by double tap
+ *
+ * @param settings settings object to enable/disable to select word by double tap
+ * @param enable @c EINA_TRUE to select word by double tap
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_select_word_automatically_set(Ewk_Settings *settings, Eina_Bool enabled);
+
+/**
+ * Returns enable/disable text selection by double tap
+ *
+ * @param settings settings object to get whether word by double tap is selected
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_select_word_automatically_get(const Ewk_Settings *settings);
+
+/**
+ * Sets legacy font size mode
+ *
+ * @param settings settings object
+ * @param mode legacy font size mode
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_current_legacy_font_size_mode_set(Ewk_Settings *settings, Ewk_Legacy_Font_Size_Mode mode);
+
+/**
+ * Returns set legacy font size mode
+ *
+ * @param settings settings object
+ *
+ * @return @c Ewk_Legacy_Font_Size_Mode set legacy font size mode
+ */
+EAPI Ewk_Legacy_Font_Size_Mode ewk_settings_current_legacy_font_size_mode_get(const Ewk_Settings *settings);
+
+/**
+ * Sets to paste image as URI (default: paste as base64-encoded-data)
+ *
+ * @param settings settings object
+* @param enable @c EINA_TRUE to paste image as URI    @c EINA_FALSE to paste image as data
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_paste_image_uri_mode_set(Ewk_Settings *settings, Eina_Bool enabled);
+
+/**
+ * Returns whether  paste image as URI mode is enabled
+ *
+ * @param settings settings object
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_paste_image_uri_mode_get(const Ewk_Settings *settings);
+
+/**
+ * Gets the initial position value for the HTML list element <ul></ul>.
+ *
+ * @param settings setting object to get the initial position value
+ *
+ * @return the initial position value for the HTML list element.
+ */
+EAPI Ewk_List_Style_Position ewk_settings_initial_list_style_position_get(const Ewk_Settings* settings);
+
+/**
+ * Sets the initial position value for the HTML list element <ul></ul>.
+ *
+ * This value affect the lists that are going to be created,
+ * does not make sense to manipulate it for existed elements.
+ *
+ * @param settings setting object to set the initial list style position
+ * @param style a new style to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_initial_list_style_position_set(Ewk_Settings* settings, Ewk_List_Style_Position style);
+
+/**
+ * Enable or disable supporting of -webkit-text-size-adjust
+ *
+ * -webkit-text-size-adjust affects text size adjusting feature.
+ *
+ * @param settings setting object to set the support of -webkit-text-size-adjust
+ * @param enable @c EINA_TRUE to support -webkit-text-size-adjust, @c EINA_FALSE not to support
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_webkit_text_size_adjust_enabled_set(Ewk_Settings* settings, Eina_Bool enabled);
+
+/**
+ * Requests to enable/disable to detect email address when tapping on email address without link property
+ *
+ * @param settings settings object to enable/disable to detect email address when tapping on email address without link property
+ *
+ * @param enable @c EINA_TRUE to enable to detect email address when tapping on email address without link property
+ *        @c EINA_FALSE to disable
+ */
+EAPI void ewk_settings_detect_contents_automatically_set(Ewk_Settings* settings, Eina_Bool enable);
+
+/**
+ * Returns enable/disable to detect email address when tapping on email address without link property
+ *
+ * @param settings settings object to get whether email address is detected when tapping on email address without link property
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_detect_contents_automatically_get(const Ewk_Settings* settings);
+
+/**
+ * Sets cache builder mode enabled.
+ *
+ * @param settings settings object
+ * @param enabled cache builder mode
+ */
+EAPI void ewk_settings_cache_builder_enabled_set(Ewk_Settings *settings, Eina_Bool enabled);
+
+/**
+ * Returns the default font size.
+ *
+ * @param settings settings object to get the default font size
+ *
+ * @return @c the default font size or @c 0 on failure
+ */
+EAPI int ewk_settings_default_font_size_get(const Ewk_Settings *settings);
+
+/**
+ * Sets the default font size.
+ *
+ * By default, the default font size is @c 16.
+ *
+ * @param settings settings object to set the default font size
+ * @param size a new default font size to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_default_font_size_set(Ewk_Settings *settings, int size);
+
+/**
+ * Sets the default text encoding name.
+ *
+ * @param settings settings object to set default text encoding name
+ * @param encoding default text encoding name
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_default_text_encoding_name_set(Ewk_Settings *settings, const char *encoding);
+
+/**
+ * Enables/disables the encoding detector.
+ *
+ * By default, the encoding detector is disabled.
+ *
+ * @param settings settings object to set the encoding detector
+ * @param enable @c EINA_TRUE to enable the encoding detector,
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_encoding_detector_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Enables/disables if the scripts can open new windows.
+ *
+ * By default, the scripts can open new windows.
+ *
+ * @param settings settings object to set if the scripts can open new windows
+ * @param enable @c EINA_TRUE if the scripts can open new windows
+ *        @c EINA_FALSE if not
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (scripts are disabled)
+ */
+EAPI Eina_Bool ewk_settings_scripts_can_open_windows_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Requests enables/disables to the specific extra feature
+ *
+ * @param settings setting object to enable/disable the specific extra feature
+ * @param feature feature name
+ * @param enable @c EINA_TRUE to enable the specific extra feature
+ *        @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI void ewk_settings_extra_feature_set(Ewk_Settings* settings, const char* feature, Eina_Bool enable);
+
+/**
+ * Returns enable/disable to the specific extra feature
+ *
+ * @param settings settings object to get whether the specific extra feature is enabled or not.
+ * @param feature feature name
+ *
+ * @return @c EINA_TRUE on enable or @c EINA_FALSE on disable
+ */
+EAPI Eina_Bool ewk_settings_extra_feature_get(const Ewk_Settings* settings, const char* feature);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_settings_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_storage_manager.cc b/tizen_src/ewk/efl_integration/public/ewk_storage_manager.cc
new file mode 100644 (file)
index 0000000..4046b42
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "ewk_storage_manager.h"
+#include "private/ewk_private.h"
+
+#if defined(OS_TIZEN_TV)
+Eina_Bool ewk_storage_manager_entries_clear(Ewk_Storage_Manager* ewkStorageManager)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return false;
+}
+#endif // OS_TIZEN_TV
diff --git a/tizen_src/ewk/efl_integration/public/ewk_storage_manager.h b/tizen_src/ewk/efl_integration/public/ewk_storage_manager.h
new file mode 100644 (file)
index 0000000..6272762
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ /**
+  * @file   ewk_storage_manager.h
+  * @brief  Describes the Ewk Storage Manager API.
+  *
+  * Ewk Storage Manager manages web storage.
+  */
+
+#ifndef ewk_storage_manager_h
+#define ewk_storage_manager_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Creates a type name for Ewk_Storage_Manager. */
+typedef struct EwkStorageManager Ewk_Storage_Manager;
+
+/**
+ * Deletes all local storage.
+ *
+ * @param manager Ewk_Storage_Manager object
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_storage_manager_entries_clear(Ewk_Storage_Manager *manager);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_storage_manager_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_text_style.cc b/tizen_src/ewk/efl_integration/public/ewk_text_style.cc
new file mode 100644 (file)
index 0000000..d348160
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "ewk_text_style.h"
+
+#include <Eina.h>
+
+// TODO: remove dependency
+#include <../impl/API/ewk_text_style_private.h>
+
+Ewk_Text_Style_State ewk_text_style_underline_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.underline_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_italic_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.italic_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_bold_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.bold_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_ordered_list_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.order_list_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_unordered_list_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.un_order_list_state);
+}
+
+Eina_Bool ewk_text_style_position_get(Ewk_Text_Style* textStyle, Evas_Point* startPoint, Evas_Point* endPoint)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(startPoint, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(endPoint, false);
+  startPoint->x = textStyle->position.startPoint.x;
+  startPoint->y = textStyle->position.startPoint.y;
+
+  endPoint->x = textStyle->position.endPoint.x;
+  endPoint->y = textStyle->position.endPoint.y;
+
+  return true;
+}
+
+Eina_Bool ewk_text_style_bg_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, false);
+  if (r)
+    *r = textStyle->bgColor.r;
+  if (g)
+    *g = textStyle->bgColor.g;
+  if (b)
+    *b = textStyle->bgColor.b;
+  if (a)
+    *a = textStyle->bgColor.a;
+
+   return true;
+}
+
+Eina_Bool ewk_text_style_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, false);
+  if (r)
+    *r = textStyle->color.r;
+  if (g)
+    *g = textStyle->color.g;
+  if (b)
+    *b = textStyle->color.b;
+  if (a)
+    *a = textStyle->color.a;
+
+  return true;
+}
+
+Eina_Stringshare* ewk_text_style_font_size_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, 0);
+  return textStyle->fontSize;
+}
+
+Eina_Bool ewk_text_style_has_composition_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, false);
+  return textStyle->hasComposition;
+}
+
+Ewk_Text_Style_State ewk_text_style_align_center_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.text_align_center_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_align_left_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.text_align_left_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_align_right_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.text_align_right_state);
+}
+
+Ewk_Text_Style_State ewk_text_style_align_full_get(Ewk_Text_Style* textStyle)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(textStyle, EWK_TEXT_STYLE_STATE_FALSE);
+  return static_cast<Ewk_Text_Style_State>(textStyle->selectionParams.text_align_full_state);
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_text_style.h b/tizen_src/ewk/efl_integration/public/ewk_text_style.h
new file mode 100644 (file)
index 0000000..e482015
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_text_style_h
+#define ewk_text_style_h
+
+#include <Eina.h>
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    EWK_TEXT_STYLE_STATE_FALSE,
+    EWK_TEXT_STYLE_STATE_TRUE,
+    EWK_TEXT_STYLE_STATE_MIXED
+} Ewk_Text_Style_State;
+
+typedef struct _Ewk_Text_Style Ewk_Text_Style;
+
+EAPI Ewk_Text_Style_State ewk_text_style_underline_get(Ewk_Text_Style* text_style);
+EAPI Ewk_Text_Style_State ewk_text_style_italic_get(Ewk_Text_Style* text_style);
+EAPI Ewk_Text_Style_State ewk_text_style_bold_get(Ewk_Text_Style* text_style);
+EAPI Ewk_Text_Style_State ewk_text_style_ordered_list_get(Ewk_Text_Style* text_style);
+EAPI Ewk_Text_Style_State ewk_text_style_unordered_list_get(Ewk_Text_Style* text_style);
+EAPI Eina_Bool ewk_text_style_position_get(Ewk_Text_Style* text_style, Evas_Point* start_point, Evas_Point* end_point);
+EAPI Eina_Bool ewk_text_style_bg_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a);
+EAPI Eina_Bool ewk_text_style_color_get(Ewk_Text_Style* textStyle, int* r, int* g, int* b, int* a);
+EAPI const char* ewk_text_style_font_size_get(Ewk_Text_Style* textStyle);
+EAPI Eina_Bool ewk_text_style_has_composition_get(Ewk_Text_Style* textStyle);
+EAPI Ewk_Text_Style_State ewk_text_style_align_center_get(Ewk_Text_Style* textStyle);
+EAPI Ewk_Text_Style_State ewk_text_style_align_left_get(Ewk_Text_Style* textStyle);
+EAPI Ewk_Text_Style_State ewk_text_style_align_right_get(Ewk_Text_Style* textStyle);
+EAPI Ewk_Text_Style_State ewk_text_style_align_full_get(Ewk_Text_Style* textStyle);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_text_style_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_touch.h b/tizen_src/ewk/efl_integration/public/ewk_touch.h
new file mode 100644 (file)
index 0000000..4bae3e1
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_touch_h
+#define ewk_touch_h
+
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// Represents types of touch event.
+typedef enum {
+    EWK_TOUCH_START,
+    EWK_TOUCH_MOVE,
+    EWK_TOUCH_END,
+    EWK_TOUCH_CANCEL
+} Ewk_Touch_Event_Type;
+
+/// Creates a type name for Ewk_Touch_Point.
+typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
+
+/// Represents a touch point.
+struct _Ewk_Touch_Point {
+    int id; /**< identifier of the touch event */
+    int x; /**< the horizontal position of the touch event */
+    int y; /**< the vertical position of the touch event */
+    Evas_Touch_Point_State state; /**< state of the touch event */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_touch_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_user_media.cc b/tizen_src/ewk/efl_integration/public/ewk_user_media.cc
new file mode 100644 (file)
index 0000000..b1a0d7d
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+
+#include "ewk_user_media.h"
+// TODO: remove dependency
+#include <../impl/API/ewk_user_media_private.h>
+
+Eina_Bool ewk_user_media_permission_request_suspend(Ewk_User_Media_Permission_Request* permissionRequest)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, false);
+    permissionRequest->isSuspended = true;
+    return true;
+}
+
+void ewk_user_media_permission_request_set(Ewk_User_Media_Permission_Request *request, Eina_Bool allowed)
+{
+  if(request && request->web_contents){
+    request->web_contents->OnAccessRequestResponse(allowed);
+    delete request;
+  }
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_user_media.h b/tizen_src/ewk/efl_integration/public/ewk_user_media.h
new file mode 100644 (file)
index 0000000..fca0c47
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_user_media_h
+#define ewk_user_media_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Ewk_User_Media_Permission_Request Ewk_User_Media_Permission_Request;
+
+/**
+ * Sets the permission to access local media
+ *
+ * @param request Ewk_View_User_Media_Permission_Request object for userMedia permission
+ * @param allowed decided permission value from user
+ */
+EAPI void ewk_user_media_permission_request_set(Ewk_User_Media_Permission_Request *request, Eina_Bool allowed);
+
+/**
+ * Suspend the operation for user media permission
+ *
+ * @param request user media permission request object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_user_media_permission_request_suspend(Ewk_User_Media_Permission_Request *request);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_user_media_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc
new file mode 100644 (file)
index 0000000..078a9fa
--- /dev/null
@@ -0,0 +1,1063 @@
+/*
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2013 Samsung Electronics
+ * Copyright (C) 2012 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_view.h"
+
+#include <Evas.h>
+#include <tizen_webview/public/tw_webview.h>
+
+// TODO: remove dependency
+#include <ui/events/gestures/gesture_configuration.h>
+#if !defined(EWK_BRINGUP)
+#include <webkit/common/webpreferences.h>
+#else
+#include <content/public/common/web_preferences.h>
+#endif
+#include <../impl/eweb_view.h>
+#include <../impl/web_contents_delegate_efl.h>
+#include <../impl/cookie_manager.h>
+
+#include "public/ewk_back_forward_list.h"
+#include "public/ewk_context.h"
+#include "public/ewk_enums.h"
+#include "public/ewk_settings.h"
+#include "private/ewk_context_private.h"
+#include "private/ewk_hit_test_private.h"
+#include "private/ewk_notification_private.h"
+#include "private/ewk_private.h"
+#if !defined(EWK_BRINGUP)
+#include "private/ewk_quota_permission_request_private.h"
+#include "private/ewk_history_private.h"
+#endif
+#include "private/ewk_view_private.h"
+#include "private/chromium_glue.h"
+#include "private/ewk_view_private.h"
+
+using tizen_webview::WebView;
+using tizen_webview::WebContext;
+
+Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class* api)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(api, false);
+  return InitSmartClassInterface(*api);
+}
+
+// TODO: Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context, Ewk_Page_Group *pageGroup)
+
+Evas_Object* ewk_view_add_with_session_data(Evas* canvas, const char* data, unsigned length)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, NULL);
+
+  if (!length)
+    return NULL;
+
+  EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
+
+  Evas_Object* ret = ewk_view_add(canvas);
+
+  WebView *webView = GetWebViewFromEvasObject(ret);
+
+  if (!webView)
+    return ret;
+
+  if (webView->RestoreFromSessionData(data, length))
+    return ret;
+
+  evas_object_del(ret);
+
+  return NULL;
+}
+
+Evas_Object* ewk_view_add_with_context(Evas* e, Ewk_Context* context)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
+  return CreateWebViewAsEvasObject(context, e);
+}
+
+Evas_Object* ewk_view_add(Evas* e)
+{
+  // TODO: shouldn't this function create new EWebContext for each new EWebView?
+  // when using default context like that it makes unclear who should release
+  // default web context. It won't be released by destroyed eweb_view because
+  // ewk_context_default_get does AddRef
+  Ewk_Context* context = ewk_context_default_get();
+  return ewk_view_add_with_context(e, context);
+}
+
+Ewk_Context *ewk_view_context_get(const Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
+  return static_cast<Ewk_Context*>(impl->GetWebContext());
+}
+
+Eina_Bool ewk_view_url_set(Evas_Object* view, const char* url)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(url, false);
+  impl->SetURL(url);
+  return true;
+}
+
+const char* ewk_view_url_get(const Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
+  return impl->GetURL();
+}
+
+
+Eina_Bool ewk_view_reload(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  impl->Reload();
+  return true;
+}
+
+
+Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  impl->ReloadIgnoringCache();
+  return true;
+}
+
+Eina_Bool ewk_view_stop(Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  impl->Stop();
+  return true;
+}
+
+
+Ewk_Settings *ewk_view_settings_get(const Evas_Object *ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl,0);
+  return impl->GetSettings();
+}
+
+const char* ewk_view_title_get(const Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
+  return impl->GetTitle();
+}
+
+double ewk_view_load_progress_get(const Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, -1);
+  return impl->GetProgressValue();
+}
+
+Eina_Bool ewk_view_scale_set(const Evas_Object* view, double scale_factor, int x, int y)
+{
+  // TODO: We should implement AC in order to work this API normally.
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  impl->SetScale(scale_factor, x, y);
+  return EINA_TRUE;
+}
+
+double ewk_view_scale_get(const Evas_Object *view)
+{
+  // TODO: We should implement AC in order to work this API normally.
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, -1);
+  return impl->GetScale();
+}
+
+Eina_Bool ewk_view_back(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  return impl->GoBack();
+}
+
+Eina_Bool ewk_view_forward(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  return impl->GoForward();
+}
+
+Eina_Bool ewk_view_back_possible(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  return impl->CanGoBack();
+}
+
+Eina_Bool ewk_view_forward_possible(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  return impl->CanGoForward();
+}
+
+Eina_Bool ewk_view_web_login_request(Evas_Object* ewkView)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+Eina_Bool ewk_view_html_string_load(Evas_Object* view, const char* html, const char* base_uri, const char* unreachable_uri)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(html, EINA_FALSE);
+  impl->LoadHTMLString(html, base_uri, unreachable_uri);
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object *view, Eina_Bool enabled)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+
+  impl->SetMouseEventsEnabled(!!enabled);
+
+  return true;
+}
+
+Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+
+  return impl->MouseEventsEnabled();
+}
+
+Eina_Bool ewk_view_color_picker_color_set(Evas_Object* ewkView, int r, int g, int b, int a)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+double ewk_view_text_zoom_get(const Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, -1.0);
+  return impl->GetTextZoomFactor();
+}
+
+Eina_Bool ewk_view_text_zoom_set(Evas_Object* view, double text_zoom_level)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  if (ewk_settings_text_zoom_enabled_get(ewk_view_settings_get(view))) {
+   impl->SetTextZoomFactor(text_zoom_level);
+   return true;
+  }
+  return false;
+}
+
+void ewk_view_not_found_error_page_load(Evas_Object* ewkView, const char* errorUrl)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  std::string errorhtml = impl->GetErrorPage(std::string(errorUrl));
+
+   ewk_view_html_string_load(ewkView, errorhtml.c_str(), errorUrl, errorUrl);
+}
+
+void ewk_view_scale_range_get(Evas_Object* view, double* min_scale, double* max_scale)
+{
+  if (!min_scale && !max_scale)
+    return;
+
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  impl->GetPageScaleRange(min_scale, max_scale);
+}
+
+void ewk_view_suspend(Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->Suspend();
+}
+
+void ewk_view_resume(Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->Resume();
+}
+
+Eina_Bool ewk_view_url_request_set(Evas_Object* ewkView, const char* url, Ewk_Http_Method method, Eina_Hash* headers, const char* body)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(url, EINA_FALSE);
+  std::string str_method;
+  switch (method) {
+  case EWK_HTTP_METHOD_GET:
+    str_method = "GET";
+    break;
+  case EWK_HTTP_METHOD_HEAD:
+    str_method = "HEAD";
+    break;
+  case EWK_HTTP_METHOD_POST:
+    str_method = "POST";
+    break;
+  case EWK_HTTP_METHOD_PUT:
+    str_method = "PUT";
+    break;
+  case EWK_HTTP_METHOD_DELETE:
+    str_method = "DELETE";
+    break;
+  default:
+    return EINA_FALSE;
+  }
+  impl->UrlRequestSet(url, str_method, headers, body);
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_plain_text_set(Evas_Object* view, const char* plain_text)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(plain_text, EINA_FALSE);
+  impl->LoadPlainTextString(plain_text);
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_contents_set(Evas_Object* view, const char* contents, size_t contents_size, char* mime_type, char* encoding, char* base_uri)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(contents, EINA_FALSE);
+  impl->LoadData(contents, contents_size, mime_type, encoding, base_uri);
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_html_contents_set(Evas_Object* view, const char* html, const char* base_uri)
+{
+  return ewk_view_html_string_load(view, html, base_uri, NULL);
+}
+
+Eina_Bool ewk_view_page_visibility_state_set(Evas_Object* ewkView, Ewk_Page_Visibility_State page_visibility_state, Eina_Bool initial_state)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl,false);
+  switch (page_visibility_state) {
+    case EWK_PAGE_VISIBILITY_STATE_VISIBLE :
+      impl->Show();
+      break;
+    case EWK_PAGE_VISIBILITY_STATE_HIDDEN :
+      impl->Hide();
+      break;
+    default:
+      break;
+  }
+  return true;
+}
+
+Eina_Bool ewk_view_user_agent_set(Evas_Object* ewkView, const char* user_agent)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(user_agent, false);
+  if (0 != strcmp(user_agent, "")) //check for empty string
+    return impl->SetUserAgent(user_agent);
+  return false;
+}
+
+const char* ewk_view_user_agent_get(const Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, 0);
+  return impl->GetUserAgent();
+}
+
+Eina_Bool ewk_view_application_name_for_user_agent_set(Evas_Object* ewkView, const char* application_name)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(application_name, false);
+  if (0 != strcmp(application_name, "")) //check for empty string
+    return impl->SetUserAgentAppName(application_name);
+  return false;
+}
+
+const char* ewk_view_application_name_for_user_agent_get(const Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, 0);
+  return impl->GetUserAgentAppName();
+}
+
+Eina_Bool ewk_view_custom_header_add(const Evas_Object* ewkView, const char* name, const char* value)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(impl->GetWebContext(),EINA_FALSE);
+  return impl->GetWebContext()->HTTPCustomHeaderAdd(name, value);
+}
+
+Eina_Bool ewk_view_custom_header_remove(const Evas_Object* ewkView, const char* name)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(impl->GetWebContext(),EINA_FALSE);
+  return impl->GetWebContext()->HTTPCustomHeaderRemove(name);
+
+}
+
+Eina_Bool ewk_view_custom_header_clear(const Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(impl->GetWebContext(),EINA_FALSE);
+  impl->GetWebContext()->HTTPCustomHeaderClear();
+  return EINA_TRUE;
+}
+
+
+Eina_Bool ewk_view_visibility_set(const Evas_Object* view, Eina_Bool enable)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+
+  if (enable)
+    impl->Show();
+  else
+    impl->Hide();
+
+  return EINA_TRUE;
+}
+
+Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* view, Eina_Rectangle view_area, float scale_factor, Evas* canvas)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, NULL);
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, NULL);
+  // Zoom level equality (<=0.001) is sufficient compared to high precision std::numeric_value::epsilon.
+  if (!content::ZoomValuesEqual(scale_factor, 1.0)) {
+    LOG(ERROR) << "We only support scale factor of 1.0."
+               << "Scaling option will be supported after hardware acceleration is enabled.";
+    return NULL;
+  }
+  return impl->GetSnapshot(view_area);
+}
+
+unsigned int ewk_view_inspector_server_start(Evas_Object* ewkView, unsigned int port)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+  return impl->StartInspectorServer(port);
+}
+
+Eina_Bool ewk_view_inspector_server_stop(Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+  return impl->StopInspectorServer();
+}
+
+Evas_Object* ewk_view_cache_image_get(const Evas_Object* ewkView, const char* imageUrl, Evas* canvas)
+{
+  LOG_EWK_API_MOCKUP();
+       return NULL;
+}
+
+void ewk_view_scroll_by(Evas_Object* ewkView, int deltaX, int deltaY)
+{
+  int x, y;
+
+  if (EINA_TRUE == ewk_view_scroll_pos_get(ewkView, &x, &y)) {
+    ewk_view_scroll_set(ewkView, x + deltaX, y + deltaY);
+  }
+}
+
+Eina_Bool ewk_view_scroll_pos_get(Evas_Object* ewkView, int* x, int* y)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(x, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(y, EINA_FALSE);
+  impl->GetScrollPosition(x, y);
+  return true;
+}
+
+Eina_Bool ewk_view_scroll_set(Evas_Object* view, int x, int y)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  impl->SetScroll(x, y);
+
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_scroll_size_get(const Evas_Object* view, int* width, int* height)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  impl->GetScrollSize(width,height);
+  return EINA_TRUE;
+}
+
+void ewk_view_password_confirm_popup_callback_set(Evas_Object* view, Ewk_View_Password_Confirm_Popup_Callback callback, void* user_data)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_password_confirm_popup_reply(Evas_Object* ewkView, Ewk_Password_Popup_Option result)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_javascript_alert_callback_set(Evas_Object* view, Ewk_View_JavaScript_Alert_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  if (callback)
+    impl->SetJavaScriptAlertCallback(callback, user_data);
+}
+
+void ewk_view_javascript_alert_reply(Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  impl->JavaScriptAlertReply();
+}
+
+void ewk_view_javascript_confirm_callback_set(Evas_Object* view, Ewk_View_JavaScript_Confirm_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  if (callback)
+    impl->SetJavaScriptConfirmCallback(callback, user_data);
+}
+
+void ewk_view_javascript_confirm_reply(Evas_Object* view, Eina_Bool result)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  impl->JavaScriptConfirmReply(result);
+}
+
+void ewk_view_javascript_prompt_callback_set(Evas_Object* view, Ewk_View_JavaScript_Prompt_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  if (callback)
+    impl->SetJavaScriptPromptCallback(callback, user_data);
+}
+
+void ewk_view_javascript_prompt_reply(Evas_Object* view, const char* result)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  impl->JavaScriptPromptReply(result);
+}
+
+void ewk_view_before_unload_confirm_panel_callback_set(Evas_Object* ewkView, Ewk_View_Before_Unload_Confirm_Panel_Callback callback, void* userData)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_before_unload_confirm_panel_reply(Evas_Object* ewkView, Eina_Bool result)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+Eina_Bool ewk_view_web_application_capable_get(Evas_Object* ewkView, Ewk_Web_App_Capable_Get_Callback callback, void* userData)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  return impl->WebAppCapableGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
+}
+
+Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URL_Get_Callback callback, void* userData)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  return impl->WebAppIconUrlGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
+}
+
+Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URLs_Get_Callback callback, void* userData)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  return impl->WebAppIconUrlsGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
+}
+
+Eina_Bool ewk_view_command_execute(Evas_Object* view, const char* command, const char* value)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(command, false);
+  impl->ExecuteEditCommand(command, value);
+  return true;
+}
+
+Eina_Bool ewk_view_contents_size_get(Evas_Object* view, Evas_Coord* width, Evas_Coord* height)
+{
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  Eina_Rectangle contents_size = impl->GetContentsSize();
+
+  if (width)
+    *width = contents_size.w;
+  if (height)
+    *height = contents_size.h;
+
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_contents_pdf_get(Evas_Object* view, int width, int height, const char* fileName)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(fileName, EINA_FALSE);
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  return impl->SaveAsPdf(width, height, fileName);
+}
+
+Eina_Bool ewk_view_script_execute(Evas_Object* ewkView, const char* script, Ewk_View_Script_Execute_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(script, false);
+  // callback can be null, so do not test it for null
+  if (0 != strcmp(script, "")) //check for empty string
+    return impl->ExecuteJavaScript(script, callback, user_data);
+  return false;
+}
+
+
+Eina_Bool ewk_view_plain_text_get(Evas_Object* view, Ewk_View_Plain_Text_Get_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  return (impl->PlainTextGet(callback, user_data));
+}
+
+Eina_Bool ewk_view_mhtml_data_get(Evas_Object *view, Ewk_View_MHTML_Data_Get_Callback callback, void *user_data)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  return impl->GetMHTMLData(callback, user_data);
+}
+
+Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* ewkView, int x, int y, int hit_test_mode)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, 0);
+  return chromium_glue::from(impl->RequestHitTestDataAt(x, y,
+      chromium_glue::to(static_cast<Ewk_Hit_Test_Mode>(hit_test_mode))));
+}
+
+Eina_Bool ewk_view_hit_test_request(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_View_Hit_Test_Request_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, EINA_FALSE);
+#if !defined(EWK_BRINGUP)
+  return impl->AsyncRequestHitTestDataAt(x, y, chromium_glue::to(static_cast<Ewk_Hit_Test_Mode>(hit_test_mode)), chromium_glue::to(callback), user_data);
+#else
+  return EINA_FALSE;
+#endif
+}
+
+#if !defined(EWK_BRINGUP)
+Ewk_History* ewk_view_history_get(Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, NULL);
+  return chromium_glue::from(impl->GetBackForwardList());
+}
+#endif
+
+Eina_Bool ewk_view_notification_closed(Evas_Object* ewkView, Eina_List* notification_list)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+
+#if !defined(EWK_BRINGUP)
+#warning "[M38] Fix and re-enable notifications (edit efl_integration/public/ewk_view.cc)"
+  // copied from deleted NotificationControllerEfl::RemoveClosedNotifications()
+  if (!eina_list_count(notification_list))
+    return false;
+
+  assert(impl->GetWebContext());
+  assert(impl->GetWebContext()->browser_context());
+  assert(impl->GetWebContext()->browser_context()->GetNotificationController());
+  content::NotificationControllerEfl* controller =
+      impl->GetWebContext()->browser_context()->GetNotificationController();
+
+  Eina_List* notification_iterator = NULL;
+  void* notification_data = NULL;
+  EINA_LIST_FOREACH(notification_list, notification_iterator, notification_data) {
+    Ewk_Notification* notification =
+      static_cast<Ewk_Notification*>(notification_data);
+
+    if (notification) {
+      controller->DeleteNotification(notification->GetID(), true);
+      delete notification;
+    }
+  }
+#endif
+  return true;
+
+}
+
+Eina_Bool ewk_view_popup_menu_select(Evas_Object* ewkView, unsigned int selectedIndex)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object* ewkView, Eina_Inarray* changeList)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+/*
+ * Sends the new orientation of the device.
+ *
+ * If orientation value is changed, orientationchanged event will occur.
+ *
+ * @param view object to receive orientation event.
+ * @param orientation the new orientation of the device. (degree)
+ *
+ * orientation will be 0 degrees when the device is oriented to natural position,
+ *                     90 degrees when it's left side is at the top,
+ *                    -90 degrees when it's right side is at the top,
+ *                     180 degrees when it is upside down.
+ */
+void ewk_view_orientation_send(Evas_Object* ewkView, int orientation)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  //send to webview
+  impl->SendOrientationChangeEventIfNeeded(orientation);
+}
+
+void ewk_view_encoding_custom_set(Evas_Object* ewkView, const char* encoding)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->SetOverrideEncoding(std::string(encoding));
+}
+
+Eina_Bool ewk_view_text_selection_range_get(const Evas_Object* view, Eina_Rectangle* left_rect, Eina_Rectangle* right_rect)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  if (left_rect && right_rect && impl->GetSelectionRange(left_rect, right_rect)) {
+    Evas_Coord x, y;
+    evas_object_geometry_get(view, &x, &y, 0, 0);
+    left_rect->x += x;
+    left_rect->y += y;
+    right_rect->x += x;
+    right_rect->y += y;
+    return true;
+  }
+  return false;
+}
+
+Eina_Bool ewk_view_text_selection_clear(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  return impl->ClearSelection() ? EINA_TRUE : EINA_FALSE;
+}
+
+const char* ewk_view_text_selection_text_get(Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, NULL);
+  return impl->GetSelectedText();
+}
+
+void ewk_view_focused_input_element_value_set(Evas_Object* ewkView, const char* value)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+const char* ewk_view_focused_input_element_value_get(Evas_Object* ewkView)
+{
+  LOG_EWK_API_MOCKUP();
+  return NULL;
+}
+
+Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* ewkView)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+void ewk_view_vertical_panning_hold_set(Evas_Object* view, Eina_Bool hold)
+{
+  LOG_EWK_API_MOCKUP();
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  // FIX ME: Currently the pan support is not present.
+  // In WK2 panning was implemented with evas directly, here its with chorme gesture reconignation
+  // So paning is not present yet
+}
+
+void ewk_view_orientation_lock_callback_set(Evas_Object* ewkView, Ewk_Orientation_Lock_Cb func, void* data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  EINA_SAFETY_ON_NULL_RETURN(func);
+  impl->SetOrientationLockCallback(func, data);
+}
+
+
+void ewk_view_back_forward_list_clear(const Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
+  impl->BackForwardListClear();
+}
+
+Eina_Bool ewk_view_feed_touch_event(Evas_Object *view, Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+
+  impl->HandleTouchEvents(chromium_glue::to(type), points, modifiers);
+
+  return true;
+}
+
+Eina_Bool ewk_view_touch_events_enabled_set(Evas_Object *view, Eina_Bool enabled)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+
+  impl->SetTouchEventsEnabled(!!enabled);
+
+  return true;
+}
+
+Eina_Bool ewk_view_touch_events_enabled_get(const Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+
+  return impl->TouchEventsEnabled();
+}
+
+Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* o)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, NULL);
+#if !defined(EWK_BRINGUP)
+  return impl->GetMainFrame();
+#else
+  return NULL;
+#endif
+}
+
+Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object* ewkView, Eina_Bool visible)
+{
+  LOG_EWK_API_MOCKUP();
+  return false;
+}
+
+void ewk_view_content_security_policy_set(Evas_Object* ewkView, const char* policy, Ewk_CSP_Header_Type type)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  EINA_SAFETY_ON_NULL_RETURN(policy);
+  impl->SetContentSecurityPolicy(policy, chromium_glue::to(type));
+}
+
+void ewk_view_application_cache_permission_callback_set(Evas_Object* ewkView, Ewk_View_Applicacion_Cache_Permission_Callback callback, void* userData)
+{
+  // Chromium does not support this feature hence the comment
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+}
+
+void ewk_view_application_cache_permission_reply(Evas_Object* ewkView, Eina_Bool allow)
+{
+  // Chromium does not support this feature hence the comment
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+}
+
+void ewk_view_exceeded_indexed_database_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* userData)
+{
+  // Chromium does not support quota for Indexed DB only.
+  // IndexedDB uses temporary storage that is shared
+  // between other features.
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+}
+
+void ewk_view_exceeded_indexed_database_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
+{
+  // Chromium does not support quota for Indexed DB only.
+  // IndexedDB uses temporary storage that is shared
+  // between other features.
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+}
+
+Eina_Bool ewk_view_text_find(Evas_Object *view, const char *text, Ewk_Find_Options options, unsigned int max_match_count)
+{
+  // FIXME: We need to implement next options in Ewk_Find_Options struct. (refer to ewk_view.h)
+  //         - EWK_FIND_OPTIONS_AT_WORD_STARTS
+  //         - EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START
+  //         - EWK_FIND_OPTIONS_WRAP_AROUND
+  //         - EWK_FIND_OPTIONS_SHOW_OVERLAY
+  //         - EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR
+  //         - EWK_FIND_OPTIONS_SHOW_HIGHLIGHT (Currently there is no way to control this option. so it is always set)
+
+  // FIXME: Updating of max_match_count is not implemented.
+
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(text, EINA_FALSE);
+  impl->Find(text, chromium_glue::to(options));
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object *view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  impl->StopFinding();
+  return EINA_TRUE;
+}
+
+void ewk_view_exceeded_database_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Database_Quota_Callback callback, void* userData)
+{
+  // According to chromium source code:
+  // src/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp line 67
+  // Chromium does not allow users to manually change the quota for an origin (for now, at least).
+  // This API is impossible to implement right now
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+}
+
+void ewk_view_exceeded_database_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
+{
+  // According to chromium source code:
+  // src/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp line 67
+  // Chromium does not allow users to manually change the quota for an origin (for now, at least).
+  // This API is impossible to implement right now
+  LOG_EWK_API_MOCKUP("Not Supported by chromium");
+}
+
+void ewk_view_exceeded_local_file_system_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* userData)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_exceeded_local_file_system_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_intercept_request_callback_set (Evas_Object* ewkView, Ewk_View_Intercept_Request_Callback callback, void* user_data)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_unfocus_allow_callback_set(Evas_Object* ewkView, Ewk_View_Unfocus_Allow_Callback callback, void* user_data)
+{
+  LOG_EWK_API_MOCKUP();
+}
+
+void ewk_view_use_settings_font(Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->UseSettingsFont();
+}
+
+char* ewk_view_get_cookies_for_url(Evas_Object* view, const char* url)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
+  EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
+  std::string cookiesForURL;
+  cookiesForURL = impl->GetWebContext()->cookieManager()->GetCookiesForURL(std::string(url));
+  if (cookiesForURL.empty())
+    return NULL;
+  return strndup(cookiesForURL.c_str(), cookiesForURL.length());
+}
+
+Eina_Bool ewk_view_fullscreen_exit(Evas_Object* view)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  impl->ExitFullscreen();
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_draws_transparent_background_set(Evas_Object *view, Eina_Bool enabled)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+  impl->SetDrawsTransparentBackground(enabled);
+  return EINA_TRUE;
+}
+
+void ewk_view_browser_font_set(Evas_Object* ewkView)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->SetBrowserFont();
+}
+
+void ewk_view_session_data_get(Evas_Object* ewkView, const char** data, unsigned* length)
+{
+  EINA_SAFETY_ON_NULL_RETURN(data);
+  EINA_SAFETY_ON_NULL_RETURN(length);
+
+  WebView* impl = GetWebViewFromEvasObject(ewkView);
+  if (!impl) {
+    *data = NULL;
+    *length = 0;
+    return;
+  }
+
+  impl->GetSessionData(data, length);
+}
+
+Eina_Bool ewk_view_mode_set(Evas_Object* ewkView, Ewk_View_Mode view_mode)
+{
+ EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
+
+#if !defined(EWK_BRINGUP)
+#warning "[M38] view mode is not supported in M38"
+  switch (view_mode) {
+    case EWK_VIEW_MODE_WINDOWED:
+    case EWK_VIEW_MODE_FLOATING:
+    case EWK_VIEW_MODE_FULLSCREEN:
+    case EWK_VIEW_MODE_MAXIMIZED:
+    case EWK_VIEW_MODE_MINIMIZED:
+        impl->SetViewMode((int)view_mode);
+        break;
+    default:
+        return EINA_FALSE;
+    }
+#endif
+  return EINA_TRUE;
+}
+
+Eina_Bool ewk_view_split_scroll_overflow_enabled_set(Evas_Object* ewkView, const Eina_Bool enabled)
+{
+  LOG_EWK_API_MOCKUP("for browser");
+  return false;
+}
+
+#if defined(OS_TIZEN_TV)
+Ewk_Back_Forward_List* ewk_view_back_forward_list_get(const Evas_Object* ewkView)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return NULL;
+}
+#endif
+
+void ewk_view_draw_focus_ring_enable_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->setDrawFocusRing(enable);
+#else
+   LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
+#endif
+}
+
+#if defined(OS_TIZEN_TV)
+double ewk_view_page_zoom_get(const Evas_Object* ewkView)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return 0;
+}
+
+Eina_Bool ewk_view_page_zoom_set(Evas_Object* ewkView, double zoomFactor)
+{
+  LOG_EWK_API_MOCKUP("for Tizen TV Browser");
+  return false;
+}
+
+Evas_Object* ewk_view_smart_add(Evas* canvas, Evas_Smart* smart, Ewk_Context* context, Ewk_Page_Group* pageGroup)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
+  return CreateWebViewAsEvasObject(context, canvas, smart);
+}
+#endif // OS_TIZEN_TV
+
+#if !defined(EWK_BRINGUP)
+void ewk_view_quota_permission_request_callback_set(Evas_Object* ewkView, Ewk_Quota_Permission_Request_Callback callback, void* user_data)
+{
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->SetQuotaPermissionRequestCallback((tizen_webview::QuotaPermissionRequest_Cb)callback, user_data);
+}
+
+void ewk_view_quota_permission_request_reply(const Ewk_Quota_Permission_Request* request, const Eina_Bool allow)
+{
+  EINA_SAFETY_ON_NULL_RETURN(request);
+  Evas_Object* ewkView = request->getView();
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->QuotaRequestReply(request, allow == EINA_TRUE);
+}
+
+void ewk_view_quota_permission_request_cancel(const Ewk_Quota_Permission_Request* request)
+{
+  EINA_SAFETY_ON_NULL_RETURN(request);
+  Evas_Object* ewkView = request->getView();
+  EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
+  impl->QuotaRequestCancel(request);
+}
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.h b/tizen_src/ewk/efl_integration/public/ewk_view.h
new file mode 100644 (file)
index 0000000..214e646
--- /dev/null
@@ -0,0 +1,1666 @@
+/*
+   Copyright (C) 2011 Samsung Electronics
+   Copyright (C) 2012 Intel Corporation. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+/**
+ * @file    ewk_view.h
+ * @brief   WebKit main smart object.
+ *
+ * This object provides view related APIs of WebKit2 to EFL object.
+ *
+ * The following signals (see evas_object_smart_callback_add()) are emitted:
+ *
+ * - "back,forward,list,changed", void: reports that the view's back / forward list had changed.
+ * - "close,window", void: window is closed.
+ * - "create,window", Evas_Object**: a new window is created.
+ * - "download,cancelled", Ewk_Download_Job*: reports that a download was effectively cancelled.
+ * - "download,failed", Ewk_Download_Job_Error*: reports that a download failed with the given error.
+ * - "download,finished", Ewk_Download_Job*: reports that a download completed successfully.
+ * - "download,request", Ewk_Download_Job*: reports that a new download has been requested. The client should set the
+ *   destination path by calling ewk_download_job_destination_set() or the download will fail.
+ * - "form,submission,request", Ewk_Form_Submission_Request*: Reports that a form request is about to be submitted.
+ *   The Ewk_Form_Submission_Request passed contains information about the text fields of the form. This
+ *   is typically used to store login information that can be used later to pre-fill the form.
+ *   The form will not be submitted until ewk_form_submission_request_submit() is called.
+ *   It is possible to handle the form submission request asynchronously, by simply calling
+ *   ewk_form_submission_request_ref() on the request and calling ewk_form_submission_request_submit()
+ *   when done to continue with the form submission. If the last reference is removed on a
+ *   #Ewk_Form_Submission_Request and the form has not been submitted yet,
+ *   ewk_form_submission_request_submit() will be called automatically.
+ * - "icon,changed", void: reports that the view's favicon has changed.
+ * - "intent,request,new", Ewk_Intent*: reports new Web intent request.
+ * - "intent,service,register", Ewk_Intent_Service*: reports new Web intent service registration.
+ * - "load,error", const Ewk_Error*: reports main frame load failed.
+ * - "load,finished", void: reports load finished.
+ * - "load,progress", double*: load progress has changed (value from 0.0 to 1.0).
+ * - "load,provisional,failed", const Ewk_Error*: view provisional load failed.
+ * - "load,provisional,redirect", void: view received redirect for provisional load.
+ * - "load,provisional,started", void: view started provisional load.
+ * - "pageSave,success", void: page save operation was success.
+ * - "pageSave,error", void: page save operation has failed.
+ * - "policy,decision,navigation", Ewk_Navigation_Policy_Decision*: a navigation policy decision should be taken.
+ *   To make a policy decision asynchronously, simply increment the reference count of the
+ *   #Ewk_Navigation_Policy_Decision object using ewk_navigation_policy_decision_ref().
+ * - "policy,decision,new,window", Ewk_Navigation_Policy_Decision*: a new window policy decision should be taken.
+ *   To make a policy decision asynchronously, simply increment the reference count of the
+ *   #Ewk_Navigation_Policy_Decision object using ewk_navigation_policy_decision_ref().
+ * - "resource,request,failed", const Ewk_Resource_Load_Error*: a resource failed loading.
+ * - "resource,request,finished", const Ewk_Resource*: a resource finished loading.
+ * - "resource,request,new", const Ewk_Resource_Request*: a resource request was initiated.
+ * - "resource,request,response", Ewk_Resource_Load_Response*: a response to a resource request was received.
+ * - "resource,request,sent", const Ewk_Resource_Request*: a resource request was sent.
+ * - "text,found", unsigned int*: the requested text was found and it gives the number of matches.
+ * - "title,changed", const char*: title of the main frame was changed.
+ * - "tooltip,text,set", const char*: tooltip was set.
+ * - "tooltip,text,unset", void: tooltip was unset.
+ * - "url,changed", const char*: url of the main frame was changed.
+ * - "webprocess,crashed", Eina_Bool*: expects a @c EINA_TRUE if web process crash is handled; @c EINA_FALSE, otherwise.
+ *
+ *
+ * Tizen specific signals
+ * - "magnifier,show", void: magifier of text selection was showed.
+ * - "magnifier,hide", void: magifier of text selection was hidden.
+ */
+
+#ifndef ewk_view_h
+#define ewk_view_h
+
+//#include "ewk_back_forward_list.h"
+#include "ewk_context.h"
+//#include "ewk_download_job.h"
+//#include "ewk_error.h"
+//#include "ewk_intent.h"
+//#include "ewk_resource.h"
+#include "ewk_settings.h"
+#include "ewk_touch.h"
+//#include "ewk_url_request.h"
+//#include "ewk_url_response.h"
+#include <Evas.h>
+
+//#include "ewk_frame.h"
+#include "ewk_history.h"
+
+//#if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
+#include "ewk_export.h"
+#include "ewk_frame.h"
+#include "ewk_hit_test.h"
+#include "ewk_enums.h"
+
+#include "ewk_back_forward_list.h"
+#include "ewk_security_origin.h"
+//#include "ewk_web_application_icon_data.h"
+#include "ewk_intercept_request.h"
+#include "ewk_page_group.h"
+#include "ewk_window_features.h"
+#include "ewk_quota_permission_request.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// Enum values containing text directionality values.
+typedef enum {
+    EWK_TEXT_DIRECTION_RIGHT_TO_LEFT,
+    EWK_TEXT_DIRECTION_LEFT_TO_RIGHT
+} Ewk_Text_Direction;
+
+enum Ewk_Password_Popup_Option {
+    EWK_PASSWORD_POPUP_SAVE,
+    EWK_PASSWORD_POPUP_NOT_NOW,
+    EWK_PASSWORD_POPUP_NEVER,
+    EWK_PASSWORD_POPUP_OK = EWK_PASSWORD_POPUP_SAVE,
+    EWK_PASSWORD_POPUP_CANCEL =EWK_PASSWORD_POPUP_NOT_NOW
+};
+typedef enum Ewk_Password_Popup_Option Ewk_Password_Popup_Option;
+
+typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
+typedef struct Ewk_View_Smart_Class Ewk_View_Smart_Class;
+
+// #if PLATFORM(TIZEN)
+/// Creates a type name for _Ewk_Event_Gesture.
+typedef struct Ewk_Event_Gesture Ewk_Event_Gesture;
+
+/// Represents a gesture event.
+struct Ewk_Event_Gesture {
+    Ewk_Gesture_Type type; /**< type of the gesture event */
+    Evas_Coord_Point position; /**< position of the gesture event */
+    Evas_Point velocity; /**< velocity of the gesture event. The unit is pixel per second. */
+    double scale; /**< scale of the gesture event */
+    int count; /**< count of the gesture */
+    unsigned int timestamp; /**< timestamp of the gesture */
+};
+
+// #if ENABLE(TIZEN_FOCUS_UI)
+enum Ewk_Unfocus_Direction {
+    EWK_UNFOCUS_DIRECTION_NONE = 0,
+    EWK_UNFOCUS_DIRECTION_FORWARD,
+    EWK_UNFOCUS_DIRECTION_BACKWARD,
+    EWK_UNFOCUS_DIRECTION_UP,
+    EWK_UNFOCUS_DIRECTION_DOWN,
+    EWK_UNFOCUS_DIRECTION_LEFT,
+    EWK_UNFOCUS_DIRECTION_RIGHT,
+};
+typedef enum Ewk_Unfocus_Direction Ewk_Unfocus_Direction;
+// #endif
+
+// #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+/**
+ * \enum    Ewk_Input_Type
+ * @brief   Provides type of focused input element
+ */
+enum Ewk_Input_Type {
+    EWK_INPUT_TYPE_TEXT,
+    EWK_INPUT_TYPE_TELEPHONE,
+    EWK_INPUT_TYPE_NUMBER,
+    EWK_INPUT_TYPE_EMAIL,
+    EWK_INPUT_TYPE_URL,
+    EWK_INPUT_TYPE_PASSWORD,
+    EWK_INPUT_TYPE_COLOR,
+    EWK_INPUT_TYPE_DATE,
+    EWK_INPUT_TYPE_DATETIME,
+    EWK_INPUT_TYPE_DATETIMELOCAL,
+    EWK_INPUT_TYPE_MONTH,
+    EWK_INPUT_TYPE_TIME,
+    EWK_INPUT_TYPE_WEEK
+};
+typedef enum Ewk_Input_Type Ewk_Input_Type;
+// #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+
+// #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+/**
+ * \enum    Ewk_Selection_Handle_Type
+ * @brief   Provides type of selection handle
+ */
+enum Ewk_Selection_Handle_Type {
+    EWK_SELECTION_HANDLE_TYPE_LEFT,
+    EWK_SELECTION_HANDLE_TYPE_RIGHT,
+    EWK_SELECTION_HANDLE_TYPE_LARGE
+};
+typedef enum Ewk_Selection_Handle_Type Ewk_Selection_Handle_Type;
+// #endif // ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+// #endif // #if PLATFORM(TIZEN)
+
+enum Ewk_View_Mode {
+    EWK_VIEW_MODE_WINDOWED = 0,
+    EWK_VIEW_MODE_FLOATING,
+    EWK_VIEW_MODE_FULLSCREEN,
+    EWK_VIEW_MODE_MAXIMIZED,
+    EWK_VIEW_MODE_MINIMIZED
+};
+typedef enum Ewk_View_Mode Ewk_View_Mode;
+
+/// Ewk view's class, to be overridden by sub-classes.
+struct Ewk_View_Smart_Class {
+    Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */
+    unsigned long version;
+
+#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
+    Evas_Object* (*window_create)(Ewk_View_Smart_Data *sd, const Ewk_Window_Features *window_features); /**< creates a new window, requested by webkit */
+    void (*window_close)(Ewk_View_Smart_Data *sd); /**< closes a window */
+#endif // OS_TIZEN_TV
+
+    Eina_Bool (*popup_menu_show)(Ewk_View_Smart_Data *sd, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Eina_List* items, int selected_index);
+    Eina_Bool (*popup_menu_hide)(Ewk_View_Smart_Data *sd);
+    Eina_Bool (*popup_menu_update)(Ewk_View_Smart_Data *sd, Eina_Rectangle rect, Ewk_Text_Direction text_direction, Eina_List* items, int selected_index);
+
+    Eina_Bool (*text_selection_down)(Ewk_View_Smart_Data *sd, int x, int y);
+    Eina_Bool (*text_selection_up)(Ewk_View_Smart_Data *sd, int x, int y);
+
+    Eina_Bool (*input_picker_show)(Ewk_View_Smart_Data *sd, Ewk_Input_Type inputType, const char* inputValue);
+
+    Eina_Bool (*orientation_lock)(Ewk_View_Smart_Data* sd, int orientations);
+    void (*orientation_unlock)(Ewk_View_Smart_Data* sd);
+
+    // event handling:
+    //  - returns true if handled
+    //  - if overridden, have to call parent method if desired
+    Eina_Bool (*focus_in)(Ewk_View_Smart_Data *sd);
+    Eina_Bool (*focus_out)(Ewk_View_Smart_Data *sd);
+    Eina_Bool (*fullscreen_enter)(Ewk_View_Smart_Data *sd, Ewk_Security_Origin *origin);
+    Eina_Bool (*fullscreen_exit)(Ewk_View_Smart_Data *sd);
+    Eina_Bool (*mouse_wheel)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Wheel *ev);
+    Eina_Bool (*mouse_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Down *ev);
+    Eina_Bool (*mouse_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Up *ev);
+    Eina_Bool (*mouse_move)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Move *ev);
+    Eina_Bool (*key_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Down *ev);
+    Eina_Bool (*key_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Up *ev);
+
+    // color picker:
+    //   - Shows and hides color picker.
+    Eina_Bool (*input_picker_color_request)(Ewk_View_Smart_Data *sd, int r, int g, int b, int a);
+    Eina_Bool (*input_picker_color_dismiss)(Ewk_View_Smart_Data *sd);
+
+    // storage:
+    //   - Web database.
+    unsigned long long (*exceeded_database_quota)(Ewk_View_Smart_Data *sd, const char *databaseName, const char *displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
+
+    Eina_Bool (*formdata_candidate_show)(Ewk_View_Smart_Data *sd, int x, int y, int w, int h);
+    Eina_Bool (*formdata_candidate_hide)(Ewk_View_Smart_Data *sd);
+    Eina_Bool (*formdata_candidate_update_data)(Ewk_View_Smart_Data *sd, Eina_List *dataList);
+    Eina_Bool (*formdata_candidate_is_showing)(Ewk_View_Smart_Data *sd);
+
+    Eina_Bool (*gesture_start)(Ewk_View_Smart_Data *sd, const Ewk_Event_Gesture *ev);
+    Eina_Bool (*gesture_end)(Ewk_View_Smart_Data *sd, const Ewk_Event_Gesture *ev);
+    Eina_Bool (*gesture_move)(Ewk_View_Smart_Data *sd, const Ewk_Event_Gesture *ev);
+
+    void (*selection_handle_down)(Ewk_View_Smart_Data *sd, Ewk_Selection_Handle_Type handleType, int x, int y);
+    void (*selection_handle_move)(Ewk_View_Smart_Data *sd, Ewk_Selection_Handle_Type handleType, int x, int y);
+    void (*selection_handle_up)(Ewk_View_Smart_Data *sd, Ewk_Selection_Handle_Type handleType, int x, int y);
+
+    Eina_Bool (*window_geometry_set)(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height);
+    Eina_Bool (*window_geometry_get)(Ewk_View_Smart_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *width, Evas_Coord *height);
+};
+
+// #if PLATFORM(TIZEN)
+/**
+ * Callback for ewk_view_web_app_capable_get
+ *
+ * @param capable web application capable
+ * @param user_data user_data will be passsed when ewk_view_web_app_capable_get is called
+ */
+typedef void (*Ewk_Web_App_Capable_Get_Callback)(Eina_Bool capable, void* user_data);
+
+/**
+ * Callback for ewk_view_web_app_icon_get
+ *
+ * @param icon_url web application icon
+ * @param user_data user_data will be passsed when ewk_view_web_app_icon_get is called
+ */
+typedef void (*Ewk_Web_App_Icon_URL_Get_Callback)(const char* icon_url, void* user_data);
+
+/**
+ * Callback for ewk_view_web_app_icon_urls_get.
+ *
+ * @param icon_urls list of Ewk_Web_App_Icon_Data for web app
+ * @param user_data user_data will be passsed when ewk_view_web_app_icon_urls_get is called
+ */
+typedef void (*Ewk_Web_App_Icon_URLs_Get_Callback)(Eina_List *icon_urls, void *user_data);
+// #endif
+
+/**
+ * The version you have to put into the version field
+ * in the @a Ewk_View_Smart_Class structure.
+ */
+#define EWK_VIEW_SMART_CLASS_VERSION 1UL
+
+/**
+ * Initializer for whole Ewk_View_Smart_Class structure.
+ *
+ * @param smart_class_init initializer to use for the "base" field
+ * (Evas_Smart_Class).
+ *
+ * @see EWK_VIEW_SMART_CLASS_INIT_NULL
+ * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
+ * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
+ */
+#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION}
+
+/**
+* Initializer to zero a whole Ewk_View_Smart_Class structure.
+*
+* @see EWK_VIEW_SMART_CLASS_INIT_VERSION
+* @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
+* @see EWK_VIEW_SMART_CLASS_INIT
+*/
+#define EWK_VIEW_SMART_CLASS_INIT_NULL EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NULL)
+
+/**
+ * Initializer to zero a whole Ewk_View_Smart_Class structure and set
+ * name and version.
+ *
+ * Similar to EWK_VIEW_SMART_CLASS_INIT_NULL, but will set version field of
+ * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name
+ * to the specific value.
+ *
+ * It will keep a reference to name field as a "const char *", that is,
+ * name must be available while the structure is used (hint: static or global!)
+ * and will not be modified.
+ *
+ * @see EWK_VIEW_SMART_CLASS_INIT_NULL
+ * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
+ * @see EWK_VIEW_SMART_CLASS_INIT
+ */
+#define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
+
+typedef struct EwkViewImpl EwkViewImpl;
+/**
+ * @brief Contains an internal View data.
+ *
+ * It is to be considered private by users, but may be extended or
+ * changed by sub-classes (that's why it's in public header file).
+ */
+struct Ewk_View_Smart_Data {
+    Evas_Object_Smart_Clipped_Data base;
+    const Ewk_View_Smart_Class* api; /**< reference to casted class instance */
+    Evas_Object* self; /**< reference to owner object */
+    Evas_Object* image; /**< reference to evas_object_image for drawing web contents */
+    EwkViewImpl* priv; /**< should never be accessed, c++ stuff */
+    struct {
+        Evas_Coord x, y, w, h; /**< last used viewport */
+    } view;
+    struct { /**< what changed since last smart_calculate */
+        Eina_Bool any:1;
+
+        // WebKit use these but we don't. We should remove these if we are sure
+        // we do it right.
+        Eina_Bool size:1;
+        Eina_Bool position:1;
+    } changed;
+};
+
+/**
+ * Sets the smart class APIs, enabling view to be inherited.
+ *
+ * @param api class definition to set, all members with the
+ *        exception of @a Evas_Smart_Class->data may be overridden, must
+ *        @b not be @c NULL
+ *
+ * @note @a Evas_Smart_Class->data is used to implement type checking and
+ *       is not supposed to be changed/overridden. If you need extra
+ *       data for your smart class to work, just extend
+ *       Ewk_View_Smart_Class instead.
+ *       The Evas_Object which inherits the ewk_view should use
+ *       ewk_view_smart_add() to create Evas_Object instead of
+ *       evas_object_smart_add() because it performs additional initialization
+ *       for the ewk_view.
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure (probably
+ *         version mismatch)
+ *
+ * @see ewk_view_smart_add()
+ */
+EAPI Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class *api);
+
+/**
+ * Creates a new EFL WebKit view object with Evas_Smart and Ewk_Context.
+ *
+ * @note The Evas_Object which inherits the ewk_view should create its
+ *       Evas_Object using this API instead of evas_object_smart_add()
+ *       because the default initialization for ewk_view is done in this API.
+ *
+ * @param e canvas object where to create the view object
+ * @param smart Evas_Smart object. Its type should be EWK_VIEW_TYPE_STR
+ * @param context Ewk_Context object which is used for initializing
+ * @param pageGroup Ewk_Page_Group object which is used for initializing
+ *
+ * @return view object on success or @c NULL on failure
+ */
+EAPI Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context, Ewk_Page_Group *pageGroup);
+
+/**
+ * Enum values used to specify search options.
+ * @brief   Provides option to find text
+ * @info    Keep this in sync with WKFindOptions.h
+ */
+enum _Ewk_Find_Options {
+  EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */
+  EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */
+  EWK_FIND_OPTIONS_BACKWARDS = 1 << 3, /**< search backwards. */
+  EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */
+  EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, /**< treat capital letters in the middle of words as word start. */
+  EWK_FIND_OPTIONS_WRAP_AROUND = 1 << 4, /**< if not present search will stop at the end of the document. */
+  EWK_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, /**< show overlay */
+  EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */
+  EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */
+};
+typedef enum _Ewk_Find_Options Ewk_Find_Options;
+
+/**
+ * Creates a new EFL WebKit view object.
+ *
+ * @param e canvas object where to create the view object
+ * @param data a pointer to data to restore session data
+ * @param length length of session data to restore session data
+ *
+ * @return view object on success or @c NULL on failure
+ */
+EAPI Evas_Object* ewk_view_add_with_session_data(Evas *e, const char *data, unsigned length);
+
+/**
+ * Creates a new EFL WebKit view object.
+ *
+ * @param e canvas object where to create the view object
+ *
+ * @return view object on success or @c NULL on failure
+ */
+EAPI Evas_Object *ewk_view_add(Evas *e);
+
+/**
+ * Creates a new EFL WebKit view object based on specific Ewk_Context.
+ *
+ * @param e canvas object where to create the view object
+ * @param context Ewk_Context object to declare process model
+ *
+ * @return view object on success or @c NULL on failure
+ */
+EAPI Evas_Object *ewk_view_add_with_context(Evas *e, Ewk_Context *context);
+
+/**
+ * Gets the Ewk_Context of this view.
+ *
+ * @param o the view object to get the Ewk_Context
+ *
+ * @return the Ewk_Context of this view or @c NULL on failure
+ */
+EAPI Ewk_Context *ewk_view_context_get(const Evas_Object *o);
+
+/**
+ * Asks the object to load the given URL.
+ *
+ * @param o view object to load @a URL
+ * @param url uniform resource identifier to load
+ *
+ * @return @c EINA_TRUE is returned if @a o is valid, irrespective of load,
+ *         or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_url_set(Evas_Object *o, const char *url);
+
+/**
+ * Returns the current URL string of view object.
+ *
+ * It returns an internal string and should not
+ * be modified. The string is guaranteed to be stringshared.
+ *
+ * @param o view object to get current URL
+ *
+ * @return current URL on success or @c NULL on failure
+ */
+EAPI const char *ewk_view_url_get(const Evas_Object *o);
+
+/**
+ * Asks the main frame to reload the current document.
+ *
+ * @param o view object to reload current document
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ *
+ * @see ewk_view_reload_bypass_cache()
+ */
+EAPI Eina_Bool ewk_view_reload(Evas_Object *o);
+
+/**
+ * Reloads the current page's document without cache.
+ *
+ * @param o view object to reload current document
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *o);
+
+/**
+ * Asks the main frame to stop loading.
+ *
+ * @param o view object to stop loading
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool ewk_view_stop(Evas_Object* o);
+
+
+enum Ewk_Page_Visibility_State {
+    EWK_PAGE_VISIBILITY_STATE_VISIBLE,
+    EWK_PAGE_VISIBILITY_STATE_HIDDEN,
+    EWK_PAGE_VISIBILITY_STATE_PRERENDER
+};
+typedef enum Ewk_Page_Visibility_State Ewk_Page_Visibility_State;
+
+enum Ewk_Http_Method {
+    EWK_HTTP_METHOD_GET,
+    EWK_HTTP_METHOD_HEAD,
+    EWK_HTTP_METHOD_POST,
+    EWK_HTTP_METHOD_PUT,
+    EWK_HTTP_METHOD_DELETE,
+};
+typedef enum Ewk_Http_Method Ewk_Http_Method;
+
+/**
+ * Callback for ewk_view_script_execute
+ *
+ * @param o the view object
+ * @param result_value value returned by script
+ * @param user_data user data
+ */
+typedef void (*Ewk_View_Script_Execute_Callback)(Evas_Object* o, const char* result_value, void* user_data);
+
+/**
+ * Callback for ewk_view_plain_text_get
+ *
+ * @param o the view object
+ * @param plain_text the contents of the given frame converted to plain text
+ * @param user_data user data
+ */
+typedef void (*Ewk_View_Plain_Text_Get_Callback)(Evas_Object* o, const char* plain_text, void* user_data);
+
+/**
+ * Creates a type name for the callback function used to get the page contents.
+ *
+ * @param o view object
+ * @param data mhtml data of the page contents
+ * @param user_data user data will be passed when ewk_view_mhtml_data_get is called
+ */
+typedef void (*Ewk_View_MHTML_Data_Get_Callback)(Evas_Object *o, const char *data, void *user_data);
+
+
+EAPI Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* o);
+
+/**
+  * Block/Release the vertical pan
+  *
+  * @param o view object on which pan is to be blocked/release
+  * @param hold status of pan
+  */
+EAPI void ewk_view_vertical_panning_hold_set(Evas_Object* o, Eina_Bool hold);
+
+/**
+ * Gets the minimum and maximum value of the scale range or -1 on failure
+ *
+ * @param o view object to get the minimum and maximum value of the scale range
+ * @param min_scale Pointer to an double in which to store the minimum scale factor of the object.
+ * @param max_scale Pointer to an double in which to store the maximum scale factor of the object.
+ *
+ * @note Use @c NULL pointers on the scale components you're not
+ * interested in: they'll be ignored by the function.
+ */
+EAPI void ewk_view_scale_range_get(Evas_Object* o, double* min_scale, double* max_scale);
+
+/**
+ * Gets the current text zoom level.
+ *
+ * @param o view object to get the zoom level
+ *
+ * @return current zoom level in use on success or @c -1.0 on failure
+ */
+EAPI double ewk_view_text_zoom_get(const Evas_Object* o);
+
+/**
+ * Sets the current text zoom level.
+ *
+ * @param o view object to set the zoom level
+ * @param textZoomFactor a new level to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_text_zoom_set(Evas_Object* o, double text_zoom_factor);
+
+EAPI void ewk_view_suspend(Evas_Object* o);
+EAPI void ewk_view_resume(Evas_Object* o);
+
+/**
+ * @typedef Ewk_View_Script_Execute_Cb Ewk_View_Script_Execute_Cb
+ * @brief Callback type for use with ewk_view_script_execute()
+ */
+typedef void (*Ewk_View_Script_Execute_Cb)(Evas_Object *o, const char *return_value, void *user_data);
+
+typedef Eina_Bool (*Ewk_View_Password_Confirm_Popup_Callback)(Evas_Object* o, const char* message, void* user_data);
+EAPI void ewk_view_password_confirm_popup_callback_set(Evas_Object* o, Ewk_View_Password_Confirm_Popup_Callback callback, void* user_data);
+EAPI void ewk_view_password_confirm_popup_reply(Evas_Object* o, Ewk_Password_Popup_Option result);
+
+typedef Eina_Bool (*Ewk_View_JavaScript_Alert_Callback)(Evas_Object* o, const char* alert_text, void* user_data);
+EAPI void ewk_view_javascript_alert_callback_set(Evas_Object* o, Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
+EAPI void ewk_view_javascript_alert_reply(Evas_Object* o);
+
+
+typedef Eina_Bool (*Ewk_View_JavaScript_Confirm_Callback)(Evas_Object* o, const char* message, void* user_data);
+EAPI void ewk_view_javascript_confirm_callback_set(Evas_Object* o, Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
+/**
+ * Handle javascript confirm dialog reply
+ *
+ * @param o view object
+ * @param result boolean result contains true when ok is pressed false when cancel is pressed on the dialog
+ */
+EAPI void ewk_view_javascript_confirm_reply(Evas_Object* o, Eina_Bool result);
+
+/**
+ * Callback for ewk_view_javascript_prompt_callback_set
+ *
+ * @param o the view object
+ * @param message the text to be displayed on the prompt popup
+ * @param default_value default text to be entered in the prompt dialog
+ * @param user_data user data
+ */
+typedef Eina_Bool (*Ewk_View_JavaScript_Prompt_Callback)(Evas_Object* o, const char* message, const char* default_value, void* user_data);
+
+/**
+ * Display javascript prompt popup
+ *
+ * @param o view object
+ * @param callback callback function to be called when the prompt popup is to be opened
+ * @param user_data user data
+ *
+ */
+EAPI void ewk_view_javascript_prompt_callback_set(Evas_Object* o, Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
+
+/**
+ * Handle javascript prompt dialog reply
+ *
+ * @param o view object
+ * @param result value entered in the prompt dialog
+ */
+EAPI void ewk_view_javascript_prompt_reply(Evas_Object* o, const char* result);
+
+
+//#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
+typedef Eina_Bool (*Ewk_View_Before_Unload_Confirm_Panel_Callback)(Evas_Object* o, const char* message, void* user_data);
+EAPI void ewk_view_before_unload_confirm_panel_callback_set(Evas_Object* o, Ewk_View_Before_Unload_Confirm_Panel_Callback callback, void* user_data);
+EAPI void ewk_view_before_unload_confirm_panel_reply(Evas_Object* o, Eina_Bool result);
+//#endif
+
+//#if ENABLE(TIZEN_APPLICATION_CACHE)
+typedef Eina_Bool (*Ewk_View_Applicacion_Cache_Permission_Callback)(Evas_Object* o, Ewk_Security_Origin* origin,  void* user_data);
+EAPI void ewk_view_application_cache_permission_callback_set(Evas_Object* o, Ewk_View_Applicacion_Cache_Permission_Callback callback, void* user_data);
+EAPI void ewk_view_application_cache_permission_reply(Evas_Object* o, Eina_Bool allow);
+//#endif
+
+typedef Eina_Bool (*Ewk_View_Exceeded_Indexed_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data);
+EAPI void ewk_view_exceeded_indexed_database_quota_callback_set(Evas_Object* o, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* user_data);
+EAPI void ewk_view_exceeded_indexed_database_quota_reply(Evas_Object* o, Eina_Bool allow);
+
+
+typedef Eina_Bool (*Ewk_View_Exceeded_Database_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, const char* database_name, unsigned long long expectedQuota, void* user_data);
+EAPI void ewk_view_exceeded_database_quota_callback_set(Evas_Object* o, Ewk_View_Exceeded_Database_Quota_Callback callback, void* user_data);
+EAPI void ewk_view_exceeded_database_quota_reply(Evas_Object* o, Eina_Bool allow);
+
+typedef Eina_Bool (*Ewk_View_Exceeded_Local_File_System_Quota_Callback)(Evas_Object* o, Ewk_Security_Origin* origin, long long currentQuota, void* user_data);
+EAPI void ewk_view_exceeded_local_file_system_quota_callback_set(Evas_Object* o, Ewk_View_Exceeded_Local_File_System_Quota_Callback callback, void* user_data);
+EAPI void ewk_view_exceeded_local_file_system_quota_reply(Evas_Object* o, Eina_Bool allow);
+
+//#if ENABLE(TIZEN_INTERCEPT_REQUEST)
+typedef void (*Ewk_View_Intercept_Request_Callback)(Evas_Object* o, Ewk_Intercept_Request* interceptRequest, void* user_data);
+EAPI void ewk_view_intercept_request_callback_set (Evas_Object *o, Ewk_View_Intercept_Request_Callback callback, void* user_data);
+//#endif
+
+//#if ENABLE(TIZEN_FOCUS_UI)
+typedef Eina_Bool (*Ewk_View_Unfocus_Allow_Callback)(Evas_Object* o, Ewk_Unfocus_Direction direction, void* user_data);
+EAPI void ewk_view_unfocus_allow_callback_set (Evas_Object *o, Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
+//#endif
+
+Eina_Bool ewk_view_mode_set(Evas_Object* ewkView, Ewk_View_Mode view_mode);
+
+/**
+ * Gets the Ewk_Settings of this view.
+ *
+ * @param o view object to get Ewk_Settings
+ *
+ * @return the Ewk_Settings of this view or @c NULL on failure
+ */
+EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o);
+
+/**
+ * Asks the main frame to navigate back in the history.
+ *
+ * @param o view object to navigate back
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ *
+ * @see ewk_frame_back()
+ */
+EAPI Eina_Bool ewk_view_back(Evas_Object *o);
+
+/**
+ * Asks the main frame to navigate forward in the history.
+ *
+ * @param o view object to navigate forward
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ *
+ * @see ewk_frame_forward()
+ */
+EAPI Eina_Bool ewk_view_forward(Evas_Object *o);
+
+/**
+ * Queries if it is possible to navigate backwards one item in the history.
+ *
+ * @param o view object to query if backward navigation is possible
+ *
+ * @return @c EINA_TRUE if it is possible to navigate backwards in the history, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_back_possible(Evas_Object *o);
+
+/**
+ * Queries if it is possible to navigate forwards one item in the history.
+ *
+ * @param o view object to query if forward navigation is possible
+ *
+ * @return @c EINA_TRUE if it is possible to navigate forwards in the history, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_forward_possible(Evas_Object *o);
+
+/**
+ * Gets the current title of the main frame.
+ *
+ * It returns an internal string and should not
+ * be modified. The string is guaranteed to be stringshared.
+ *
+ * @param o view object to get current title
+ *
+ * @return current title on success or @c NULL on failure
+ */
+EAPI const char *ewk_view_title_get(const Evas_Object *o);
+
+/**
+ * Gets the current load progress of page.
+ *
+ * The progress estimation from 0.0 to 1.0.
+ *
+ * @param o view object to get the current progress
+ *
+ * @return the load progress of page, value from 0.0 to 1.0,
+ *         or @c -1.0 on failure
+ */
+EAPI double ewk_view_load_progress_get(const Evas_Object *o);
+
+/*
+ * Requests loading of the given request data.
+ *
+ * @param o view object to load
+ * @param url uniform resource identifier to load
+ * @param method http method
+ * @param headers http headers
+ * @param body http body data
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_url_request_set(Evas_Object* o, const char* url, Ewk_Http_Method method, Eina_Hash* headers, const char* body);
+
+/**
+ * Requests the specified plain text string into the view object
+ *
+ * @note The mime type of document will be "text/plain".
+ *
+ * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_plain_text_set(Evas_Object* o, const char* plain_text);
+
+/**
+ * Requests loading the given contents by mime type into the view object.
+ *
+ * @param o view object to load
+ * @param contents what to load
+ * @param contents_size size of @a contents (in bytes),
+ * @param mime_type type of @a contents data, if @c 0 is given "text/html" is assumed
+ * @param encoding encoding for @a contents data, if @c 0 is given "UTF-8" is assumed
+ * @param base_uri base uri to use for relative resources, may be @c 0,
+ *        if provided @b must be an absolute uri
+ *
+ * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_contents_set(Evas_Object* o, const char* contents, size_t contents_size, char* mime_type, char* encoding, char* base_uri);
+
+/**
+ * Requests loading the given contents.
+ *
+ * @param o view object to load document
+ * @param html HTML data to load
+ * @param base_uri Base URI used for relative paths to external objects (optional)
+ *
+ * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_html_contents_set(Evas_Object* o, const char* html, const char* base_uri);
+
+/**
+ * Requests for setting page visibility state.
+ *
+ * @param o view object to set the page visibility
+ * @param page_visibility_state visible state of the page to set
+ * @param initial_state @c EINA_TRUE if this function is called at page initialization time,
+ *                     @c EINA_FALSE otherwise
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_page_visibility_state_set(Evas_Object* o, Ewk_Page_Visibility_State page_visibility_state, Eina_Bool initial_state);
+
+/**
+* Request to set the user agent string.
+*
+* @param o view object to set the user agent string
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+*/
+EAPI Eina_Bool ewk_view_user_agent_set(Evas_Object* o, const char* user_agent);
+
+/**
+* Returns user agent string.
+*
+* @param o view object to get the user agent string
+*
+* @return @c user agent string
+*/
+EAPI const char* ewk_view_user_agent_get(const Evas_Object* o);
+
+/**
+* Request to set the user agent with application name.
+*
+* @param o view object to set the user agent with application name
+*
+* @param application_name string to set the user agent
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+*/
+EAPI Eina_Bool ewk_view_application_name_for_user_agent_set(Evas_Object* o, const char* application_name);
+
+/**
+* Returns application name string.
+*
+* @param o view object to get the application name
+*
+* @return @c application name
+*/
+EAPI const char* ewk_view_application_name_for_user_agent_get(const Evas_Object* o);
+
+/*
+* add custom header
+*
+* @param o view object to add custom header
+*
+* @param name custom header name to add the custom header
+*
+* @param value custom header value to add the custom header
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+*/
+EAPI Eina_Bool ewk_view_custom_header_add(const Evas_Object* o, const char* name, const char* value);
+/**
+* remove custom header
+*
+* @param o view object to remove custom header
+*
+* @param name custom header name to remove the custom header
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+*/
+EAPI Eina_Bool ewk_view_custom_header_remove(const Evas_Object* o, const char* name);
+/**
+* clears all custom headers
+*
+* @param o view object to clear custom headers
+*
+* @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+*/
+EAPI Eina_Bool ewk_view_custom_header_clear(const Evas_Object* o);
+
+/**
+ * Request to set the current page's visibility.
+ *
+ * @param o view object to set the visibility.
+ * @param enable EINA_TRUE to set on the visibility of the page, EINA_FALSE otherwise.
+ *
+ * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_visibility_set(const Evas_Object* o, Eina_Bool enable);
+
+/**
+ * Returns the evas image object of the specified viewArea of page
+ *
+ * The returned evas image object @b should be freed after use.
+ *
+ * @param o view object to get specified rectangle of cairo surface.
+ * @param viewArea rectangle of cairo surface.
+ * @param scaleFactor scale factor of cairo surface.
+ * @param canvas canvas for creating evas image.
+ *
+ * @return newly allocated evas image object on sucess or @c 0 on failure.
+ */
+EAPI Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* o, Eina_Rectangle viewArea, float scaleFactor, Evas* canvas);
+
+/**
+ * Returns the evas image object for the cache image specified in url.
+ *
+ * The returned evas image object @b should be freed after use.
+ *
+ * @param o view object to get specified rectangle of cairo surface.
+ * @param imageUrl url of the image in the cache.
+ * @param canvas canvas for creating evas image.
+ *
+ * @return newly allocated evas image object on sucess or @c 0 on failure.
+ */
+EAPI Evas_Object* ewk_view_cache_image_get(const Evas_Object* o, const char* imageUrl, Evas* canvas);
+
+/**
+ * Start a server for inspecting web pages
+ * This server will be used by Remote Web Browser to transfer messages over network
+ *
+ * @param [o] view object to debug
+ * @param [in] port It is a port number for the server. A free port on system will be allocated if port is 0
+ *
+ * @return @c assigned port number on success or @c 0 on failure
+ */
+EAPI unsigned int ewk_view_inspector_server_start(Evas_Object* o, unsigned int port);
+
+/**
+ * Stop a server for inspecting web pages
+ *
+ * @param [o] view object to debug
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_inspector_server_stop(Evas_Object* o);
+
+/**
+ * Scrolls webpage of view by dx and dy.
+ *
+ * @param o view object to scroll
+ * @param dx horizontal offset to scroll
+ * @param dy vertical offset to scroll
+ */
+EAPI void ewk_view_scroll_by(Evas_Object* o, int dx, int dy);
+
+/**
+ * Gets the current scroll position of given view.
+ *
+ * @param o view object to get the current scroll position
+ * @param x the pointer to store the horizontal position, may be @c NULL
+ * @param y the pointer to store the vertical position, may be @c NULL
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
+ *         values are zeroed.
+ */
+EAPI Eina_Bool ewk_view_scroll_pos_get(Evas_Object* o, int* x, int* y);
+
+/**
+ * Sets an absolute scroll of the given view.
+ *
+ * Both values are from zero to the contents size minus the viewport
+ * size.
+ *
+ * @param o view object to scroll
+ * @param x horizontal position to scroll
+ * @param y vertical position to scroll
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_scroll_set(Evas_Object* o, int x, int y);
+
+/**
+ * Gets the possible scroll size of the given view.
+ *
+ * Possible scroll size is contents size minus the viewport size.
+ *
+ * @param o view object to get scroll size
+ * @param w the pointer to store the horizontal size that is possible to scroll,
+ *        may be @c 0
+ * @param h the pointer to store the vertical size that is possible to scroll,
+ *        may be @c 0
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
+ *         values are zeroed
+ */
+EAPI Eina_Bool ewk_view_scroll_size_get(const Evas_Object* o, int* w, int* h);
+
+/**
+ * Requests for getting web application capable.
+ *
+ * @param callback result callback to get web application capable
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_web_application_capable_get(Evas_Object* o, Ewk_Web_App_Capable_Get_Callback callback, void* user_data);
+
+/**
+ * Requests for getting web application icon string.
+ *
+ * @param callback result callback to get web application icon url
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* o, Ewk_Web_App_Icon_URL_Get_Callback callback, void* user_data);
+
+/**
+ * Requests for getting web application icon list of Ewk_Web_App_Icon_Data.
+ *
+ * @param callback result callback to get web application icon urls
+ * @param user_data user_data will be passed when result_callback is called
+ *    -I.e., user data will be kept until callback is called
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object *o, Ewk_Web_App_Icon_URLs_Get_Callback callback, void *user_data);
+
+/**
+ * Executes editor command.
+ *
+ * @param o view object to execute command
+ * @param command editor command to execute
+ * @param value the value to be passed into command
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_command_execute(Evas_Object* o, const char* command, const char* value);
+
+/**
+ * Gets last known contents size.
+ *
+ * @param o view object to get contents size
+ * @param width pointer to store contents size width, may be @c 0
+ * @param height pointer to store contents size height, may be @c 0
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure and
+ *         @a width and @a height will be zeroed
+ */
+EAPI Eina_Bool ewk_view_contents_size_get(Evas_Object* o, Evas_Coord* width, Evas_Coord* height);
+
+/**
+ * Create PDF file of page contents
+ *
+ * @param o view object to get page contents.
+ * @param width the suface width of PDF file.
+ * @param height the suface height of PDF file.
+ * @param fileName the file name for creating PDF file.
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+/* This return value is status of the request not the status of actual operation.
+ * There should be some callback to get the actual status or reason of failure.
+ */
+EAPI Eina_Bool ewk_view_contents_pdf_get(Evas_Object* o, int width, int height, const char* fileName);
+
+/**
+ * Requests execution of the given script.
+ *
+ * @note This allows to use NULL for the callback parameter.
+ *       So, if the result data from the script is not required, NULL might be used for the callback parameter.
+ *
+ * @param o view object to execute script
+ * @param script Java Script to execute
+ * @param callback result callback
+ * @param user_data user data
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_script_execute(Evas_Object* o, const char* script, Ewk_View_Script_Execute_Callback callback, void* user_data);
+
+/**
+ * Retrieve the contents in plain text.
+ *
+ * @param o view object whose contents to retrieve.
+ * @param callback result callback
+ * @param user_data user data
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_plain_text_get(Evas_Object* o, Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
+
+/**
+ * Get page contents as MHTML data
+ *
+ * @param o view object to get the page contents
+ * @param callback callback function to be called when the operation is finished
+ * @param user_data user data to be passed to the callback function
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_mhtml_data_get(Evas_Object *o, Ewk_View_MHTML_Data_Get_Callback callback, void *user_data);
+
+
+/**
+ * Creates a new hit test for the given veiw object and point.
+ *
+ * The returned object should be freed by ewk_hit_test_free().
+ *
+ * @param o view object to do hit test on
+ * @param x the horizontal position to query
+ * @param y the vertical position to query
+ * @param hit_test_mode the Ewk_Hit_Test_Mode enum value to query
+ *
+ * @return a newly allocated hit test on success, @c 0 otherwise
+ */
+EAPI Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* o, int x, int y, int hit_test_mode);
+
+typedef void (*Ewk_View_Hit_Test_Request_Callback)(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_Hit_Test*, void* user_data);
+
+/**
+ * Requests new hit test for given view object and point.
+ *
+ * @param o              view object to do hit test on
+ * @param x              the horizontal position to query
+ * @param y              the vertical position to query
+ * @param hit_test_mode  the Ewk_Hit_Test_Mode enum value to query
+ * @param callback       callback to be executed when hit test request was finished
+ *
+ * @return EINA_TRUE if hit test request was queued, otherwise EINA_FALSE
+ */
+EAPI Eina_Bool ewk_view_hit_test_request(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_View_Hit_Test_Request_Callback, void* user_data);
+
+/**
+ * Get the whole history(whole back & forward list) associated with this view.
+ *
+ * @param o view object to get the history(whole back & forward list)
+ *
+ * @return a newly allocated history of @b newly allocated item
+ *         instance. This memory of each item must be released with
+ *         ewk_history_free() after use.
+ *
+ * @see ewk_history_free()
+ */
+#if !defined(EWK_BRINGUP)
+EAPI Ewk_History* ewk_view_history_get(Evas_Object* o);
+#endif
+
+/*
+ * Notify that notification is closed.
+ *
+ * @param notification_list list of Ewk_Notification pointer
+ *        notification_list is freed in this function.
+ *
+ * @return @c EINA_TRUE on successful request or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_notification_closed(Evas_Object* o, Eina_List* notification_list);
+
+/*
+ * Sends the orientation of the device.
+ *
+ * If orientation value is changed, orientationchanged event will occur.
+ *
+ * @param o view object to receive orientation event.
+ * @param orientation the new orientation of the device. (degree)
+ *
+ * orientation will be 0 degrees when the device is oriented to natural position,
+ *                     90 degrees when it's left side is at the top,
+ *                    -90 degrees when it's right side is at the top,
+ *                     180 degrees when it is upside down.
+ */
+EAPI void ewk_view_orientation_send(Evas_Object *o, int orientation);
+
+/**
+ * Sets the encoding and reloads the page.
+ *
+ * @param ewkView view to set the encoding
+ * @param encoding the new encoding to set or @c 0 to restore the default one
+ */
+EAPI void ewk_view_encoding_custom_set(Evas_Object* ewkView, const char* encoding);
+
+/**
+ * Gets the Range of contained selection.
+ *
+ * @param o view object with selection in progress
+ * @param left_rect Refers to left ie start of selection
+ * @param right_rect Refers to right ie end of selection
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise and
+ *         values are zeroed
+ */
+EAPI Eina_Bool ewk_view_text_selection_range_get(const Evas_Object* o, Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
+
+/**
+ * Returns the selection text.
+ *
+ * @param o view object to get selection text.
+ *
+ * @return selection text or @c NULL on failure
+ */
+EAPI const char* ewk_view_text_selection_text_get(Evas_Object* o);
+
+/**
+ * Clears the current selection
+ *
+ * @param o view object with selection in progress
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_text_selection_clear(Evas_Object *o);
+
+/**
+ * Sets the focused input element value
+ *
+ * @param o view object to send the value
+ * @param value the string value to be set
+ */
+EAPI void ewk_view_focused_input_element_value_set(Evas_Object* o, const char* value);
+// #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+
+/**
+ * Gets the focused input element's value
+ *
+ * @param o view object to get the value
+ *
+ * @return focused input element's value on success or NULL on failure.
+ */
+EAPI const char* ewk_view_focused_input_element_value_get(Evas_Object* o);
+
+
+/**
+ * Selects index of current popup menu.
+ *
+ * @param o view object contains popup menu.
+ * @param index index of item to select
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably
+ *         popup menu is not selected or index is out of range)
+ */
+EAPI Eina_Bool ewk_view_popup_menu_select(Evas_Object *o, unsigned int index);
+
+/**
+ * Selects Multiple indexes  of current popup menu.
+ *
+ * @param o view object contains popup menu.
+ * @param changedlist  list of item selected and deselected
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (probably
+ *         popup menu is not selected or index is out of range)
+ */
+EAPI Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object *o, Eina_Inarray* changedlist);
+
+/**
+ * Sets whether the ewk_view supports the mouse events or not.
+ *
+ * The ewk_view will support the mouse events if EINA_TRUE or not support the
+ * mouse events otherwise. The default value is EINA_TRUE.
+ *
+ * @param o view object to enable/disable the mouse events
+ * @param enabled a state to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
+
+/**
+ * Queries if the ewk_view supports the mouse events.
+ *
+ * @param o view object to query if the mouse events are enabled
+ *
+ * @return @c EINA_TRUE if the mouse events are enabled or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object *o);
+
+typedef Eina_Bool (*Ewk_Orientation_Lock_Cb)(Evas_Object* o, Eina_Bool need_lock, int orientation, void* user_data);
+
+ /**
+ * Deprecated
+ * Sets callback of orientation lock function
+ *
+ * func will be called when screen lock is called or unlock is called.
+ * When screen.lockOrientation is called, need_lock will be true and orientation
+ * will be the flags which should be locked.
+ * For example, when contents called 'screen.lockOrientation("portrait"), orientation
+ * will be EWK_SCREEN_ORIENTATION_PORTRAIT_PRIMARY | EWK_SCREEN_ORIENTATION_PORTRAIT_SECONDARY
+ * When screen.unlockOrientation is called, need_lock will be false.
+ *
+ * @param o view object to set the callback of orientation
+ * @param func callback function to be called when screen orientation is locked or unlocked.
+ * @param use_data user_data will be passsed when ewk_view_web_app_icon_get is called
+ *
+ * @return current URI on success or @c 0 on failure
+ */
+EAPI void ewk_view_orientation_lock_callback_set(Evas_Object *o, Ewk_Orientation_Lock_Cb func, void* user_data);
+
+/**
+ * Loads the specified @a html string as the content of the view.
+ *
+ * External objects such as stylesheets or images referenced in the HTML
+ * document are located relative to @a baseUrl.
+ *
+ * If an @a unreachableUrl is passed it is used as the url for the loaded
+ * content. This is typically used to display error pages for a failed
+ * load.
+ *
+ * @param o view object to load document
+ * @param html HTML data to load
+ * @param base_uri Base URI used for relative paths to external objects (optional)
+ * @param unreachable_uri URI that could not be reached (optional)
+ *
+ * @return @c EINA_TRUE on successful request, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_html_string_load(Evas_Object *o, const char *html, const char *base_uri, const char *unreachable_uri);
+
+/**
+ * Scales the current page, centered at the given point.
+ *
+ * @param o view object to set the zoom level
+ * @param scale_factor a new level to set
+ * @param cx x of center coordinate
+ * @param cy y of center coordinate
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_scale_set(const Evas_Object* o, double scaleFactor, int x, int y);
+
+/**
+ * Queries the current scale factor of the page.
+ *
+ * It returns previous scale factor after ewk_view_scale_set is called immediately
+ * until scale factor of page is really changed.
+ *
+ * @param o view object to get the scale factor
+ *
+ * @return current scale factor in use on success or @c -1.0 on failure
+ */
+EAPI double ewk_view_scale_get(const Evas_Object *o);
+
+/**
+ * Searches and hightlights the given string in the document.
+ *
+ * @param o view object to find text
+ * @param text text to find
+ * @param options options to find
+ * @param max_match_count maximum match count to find, unlimited if 0
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_text_find(Evas_Object* o, const char* text, Ewk_Find_Options options, unsigned int max_match_count);
+
+/**
+ * Clears the highlight of searched text.
+ *
+ * @param o view object to find text
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object *o);
+
+/*
+ * Sets the user chosen color. To be used when implementing a color picker.
+ *
+ * The function should only be called when a color has been requested by the document.
+ * If called when this is not the case or when the input picker has been dismissed, this
+ * function will fail and return EINA_FALSE.
+ *
+ * @param o view object contains color picker
+ * @param r red channel value to be set
+ * @param g green channel value to be set
+ * @param b blue channel value to be set
+ * @param a alpha channel value to be set
+ *
+ * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_color_picker_color_set(Evas_Object *o, int r, int g, int b, int a);
+
+/**
+ * Feeds the touch event to the view.
+ *
+ * @param o view object to feed touch event
+ * @param type the type of touch event
+ * @param points a list of points (Ewk_Touch_Point) to process
+ * @param modifiers an Evas_Modifier handle to the list of modifier keys
+ *        registered in the Evas. Users can get the Evas_Modifier from the Evas
+ *        using evas_key_modifier_get() and can set each modifier key using
+ *        evas_key_modifier_on() and evas_key_modifier_off()
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_feed_touch_event(Evas_Object *o, Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers);
+
+/**
+ * Sets whether the ewk_view supports the touch events or not.
+ *
+ * The ewk_view will support the touch events if @c EINA_TRUE or not support the
+ * touch events otherwise. The default value is @c EINA_FALSE.
+ *
+ * @param o view object to enable/disable the touch events
+ * @param enabled a state to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_touch_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
+
+/**
+ * Queries if the ewk_view supports the touch events.
+ *
+ * @param o view object to query if the touch events are enabled
+ *
+ * @return @c EINA_TRUE if the touch events are enabled or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_touch_events_enabled_get(const Evas_Object *o);
+
+/**
+ * Get main frame from given view
+ *
+ * @param o view object to retrieve main frame from
+ *
+ * @return main frame
+ */
+EAPI Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* o);
+
+/**
+ * Sets the visibility of main frame scrollbar.
+ *
+ * @param o view object
+ * @param visible visibility of main frame scrollbar
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object *o, Eina_Bool visible);
+
+/**
+ * Clear back forward list of a page.
+ *
+ * @param o view object to clear back forward list
+ */
+EAPI void ewk_view_back_forward_list_clear(const Evas_Object *o);
+
+/// Enum values containing Content Security Policy header types.
+enum _Ewk_CSP_Header_Type {
+  EWK_REPORT_ONLY,
+  EWK_ENFORCE_POLICY,
+  EWK_DEFAULT_POLICY
+};
+typedef enum _Ewk_CSP_Header_Type Ewk_CSP_Header_Type;
+
+/**
+ * Set received Content Security Policy data from web app
+ *
+ * @param o view object
+ * @param policy Content Security Policy data
+ * @param type Content Security Policy header type
+ *
+ */
+EAPI void ewk_view_content_security_policy_set(Evas_Object* o, const char* policy, Ewk_CSP_Header_Type type);
+
+/**
+ * When font-family is "Tizen", use system's Settings font as default font-family
+ *
+ * @param o view object
+ *
+ */
+EAPI void ewk_view_use_settings_font(Evas_Object* o);
+
+/*
+ * Get cookies associated with an URL.
+ *
+ * @param o view object in which URL is opened.
+ * @param url the url for which cookies needs to be obtained.
+ *
+ * @return @c character array containing cookies, @c NULL if no cookies are found.
+ *
+ * The return character array has to be owned by the application and freed when not required.
+ */
+EAPI char* ewk_view_get_cookies_for_url(Evas_Object* o, const char* url);
+
+/*
+ * Exit fullscreen when the back key is pressed.
+ *
+ * @param o view object to exit fullscreen mode
+ *
+ * @return @c EINA_TRUE if successful, @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_fullscreen_exit(Evas_Object* o);
+
+/**
+ * Sets whether to draw transparent background or not.
+ *
+ * @param o view object to enable/disable transparent background
+ * @param enabled a state to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_draws_transparent_background_set(Evas_Object *o, Eina_Bool enabled);
+
+/**
+ * set a font for browser application
+ *
+ * @param o view object
+ *
+ */
+EAPI void ewk_view_browser_font_set(Evas_Object* o);
+
+/**
+ * Gets the session data to be saved in a persistent store on browser exit
+ *
+ * @param ewkView view object whose session needs to be stored.
+ * @param data out parameter session data
+ * @param length out parameter length of session data
+ *
+ * @return void
+ */
+EAPI void ewk_view_session_data_get(Evas_Object* ewkView, const char** data, unsigned* length);
+
+/**
+ * Load the error page which web page is not found.
+ *
+ * @param ewkView view object whose session needs to be stored.
+ * @param ErrorUrl that could not be found.
+ *
+ * @return void
+ */
+EAPI void ewk_view_not_found_error_page_load(Evas_Object* ewkView, const char* ErrorUrl);
+
+/**
+ * Enable or disable supporting of the split scrolling for overflow scroll.
+ *
+ * @param ewkView view object to set the support of the split scrolling for overflow scroll
+ * @param enable @c EINA_TRUE to support split scrolling, @c EINA_FALSE not to support
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_split_scroll_overflow_enabled_set(Evas_Object* ewkView, const Eina_Bool enabled);
+
+/**
+ * Gets the back-forward list associated with this view.
+ *
+ * The returned instance is unique for this view and thus multiple calls
+ * to this function with the same view as parameter returns the same
+ * handle. This handle is alive while view is alive, thus one
+ * might want to listen for EVAS_CALLBACK_DEL on given view
+ * (@a o) to know when to stop using returned handle.
+ *
+ * @param o view object to get navigation back-forward list
+ *
+ * @return the back-forward list instance handle associated with this view
+ */
+EAPI Ewk_Back_Forward_List *ewk_view_back_forward_list_get(const Evas_Object *o);
+
+/**
+ * Set Draw Focus Ring for CacheBuilder
+ *
+ * @param ewkView view object
+ * @@param enabled a state to set
+ *
+ */
+EAPI void ewk_view_draw_focus_ring_enable_set(Evas_Object* ewkView, Eina_Bool enable);
+
+/**
+ * Queries the current zoom factor of the page.
+ *
+ * It returns previous zoom factor after ewk_view_page_zoom_factor_set is called immediately
+ * until zoom factor of page is really changed.
+ *
+ * @param o view object to get the zoom factor
+ *
+ * @return current zoom factor in use on success or @c -1.0 on failure
+ */
+EAPI double ewk_view_page_zoom_get(const Evas_Object *o);
+
+/**
+ * Sets zoom factor of the current page.
+ *
+ * @param o view object to set the zoom level
+ * @param zoom_factor a new level to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_page_zoom_set(Evas_Object *o, double zoom_factor);
+
+/**
+ * Creates a new EFL WebKit view object with Evas_Smart and Ewk_Context.
+ *
+ * @note The Evas_Object which inherits the ewk_view should create its
+ *       Evas_Object using this API instead of evas_object_smart_add()
+ *       because the default initialization for ewk_view is done in this API.
+ *
+ * @param e canvas object where to create the view object
+ * @param smart Evas_Smart object. Its type should be EWK_VIEW_TYPE_STR
+ * @param context Ewk_Context object which is used for initializing
+ * @param pageGroup Ewk_Page_Group object which is used for initializing
+ *
+ * @return view object on success or @c NULL on failure
+ */
+EAPI Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context, Ewk_Page_Group *pageGroup);
+
+#if !defined(EWK_BRINGUP)
+/**
+ * Callback for quota permission request feature.
+ *
+ * @param ewkView view object where quota permission was requested
+ * @param request quota permission request object
+ * @param user_data user_data passed to ewk_view_quota_permission_request_callback_set
+ */
+typedef void (*Ewk_Quota_Permission_Request_Callback)(Evas_Object* ewkView, const Ewk_Quota_Permission_Request* request, void* user_data);
+
+/**
+ * Sets callback quota permission request.
+ *
+ * func will be called when page requests increased storage quota.
+ *
+ * @param ewkView view object to set the callback
+ * @param func callback function to be called when quota permission is requested
+ * @param use_data user_data will be passsed to callback function
+ *
+ * @return void
+ */
+EAPI void ewk_view_quota_permission_request_callback_set(Evas_Object* ewkView, Ewk_Quota_Permission_Request_Callback callback, void* user_data);
+
+/**
+ * Set reply to quota permission request.
+ *
+ * Set @c EINA_TRUE if user accepts new quota size for origin
+ * or @c EINA_FALSE if user doesn't accept new quota for origin.
+ *
+ * @param request view object to set the support of the split scrolling for overflow scroll
+ * @param enable @c EINA_TRUE allow quota size, @c EINA_FALSE
+ *
+ * @return void
+ */
+EAPI void ewk_view_quota_permission_request_reply(const Ewk_Quota_Permission_Request* request, const Eina_Bool allow);
+
+/**
+ * Cancels quota permission request.
+ *
+ * @param request view object to set the support of the split scrolling for overflow scroll
+ *
+ * @return void
+ */
+EAPI void ewk_view_quota_permission_request_cancel(const Ewk_Quota_Permission_Request* request);
+#endif // EWK_BRINGUP
+
+/*
+ * Requests web login using password database.
+ *
+ * @param o view object
+ *
+ * @return void
+ */
+EAPI Eina_Bool ewk_view_web_login_request(Evas_Object* ewkView);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ewk_view_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_web_application_icon_data.cc b/tizen_src/ewk/efl_integration/public/ewk_web_application_icon_data.cc
new file mode 100644 (file)
index 0000000..e2d82b6
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ewk_web_application_icon_data.h"
+
+// TODO: remove dependency
+#include <../impl/API/ewk_web_application_icon_data_private.h>
+
+const char* ewk_web_application_icon_data_url_get(Ewk_Web_App_Icon_Data* data)
+{
+  return (NULL == data || data->getUrl().empty()) ? NULL : data->getUrl().c_str();
+}
+
+const char* ewk_web_application_icon_data_size_get(Ewk_Web_App_Icon_Data* data)
+{
+  return (NULL == data || data->getSize().empty()) ? NULL : data->getSize().c_str();
+}
diff --git a/tizen_src/ewk/efl_integration/public/ewk_web_application_icon_data.h b/tizen_src/ewk/efl_integration/public/ewk_web_application_icon_data.h
new file mode 100644 (file)
index 0000000..dd585c3
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ewk_web_application_icon_data_h
+#define ewk_web_application_icon_data_h
+
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// Creates a type name for _Ewk_Web_App_Icon_Data.
+typedef struct _Ewk_Web_App_Icon_Data Ewk_Web_App_Icon_Data;
+
+/**
+ * Requests for getting icon size string of Ewk_Web_App_Icon_Data.
+ *
+ * @param icon_data Ewk_Web_App_Icon_Data object to get icon size
+ *
+ * @return icon size string of requested icon data
+ */
+EAPI const char *ewk_web_application_icon_data_size_get(Ewk_Web_App_Icon_Data *data);
+
+/**
+ * Requests for getting icon url string of Ewk_Web_App_Icon_Data.
+ *
+ * @param icon_data Ewk_Web_App_Icon_Data object to get icon url
+ *
+ * @return icon url string of requested icon data
+ */
+EAPI const char *ewk_web_application_icon_data_url_get(Ewk_Web_App_Icon_Data *data);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_web_application_icon_data_h
diff --git a/tizen_src/ewk/efl_integration/public/ewk_window_features.cc b/tizen_src/ewk/efl_integration/public/ewk_window_features.cc
new file mode 100644 (file)
index 0000000..2b4901d
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if !defined(EWK_BRINGUP)
+
+#include "ewk_window_features.h"
+#include <../impl/API/ewk_window_features_private.h>
+#include "eweb_view.h"
+
+void _EWK_Window_Features::setToolbarVisible(bool toolbar_visible)
+{
+  toolBar_Visible_ = toolbar_visible;
+  view_->SmartCallback<EWebViewCallbacks::ToolbarVisible>().call(&toolbar_visible);
+}
+
+void _EWK_Window_Features::setStatusBarVisible(bool statusbar_visible)
+{
+  statusBar_Visible_ = statusbar_visible;
+  view_->SmartCallback<EWebViewCallbacks::StatusBarVisible>().call(&statusbar_visible);
+}
+
+void _EWK_Window_Features::setMenuBarVisible(bool menubar_visible)
+{
+  menuBar_Visible_ = menubar_visible;
+  view_->SmartCallback<EWebViewCallbacks::MenuBarVisible>().call(&menubar_visible);
+}
+
+void _EWK_Window_Features::setResizable(bool resizable)
+{
+  resizable_ = resizable;
+  view_->SmartCallback<EWebViewCallbacks::WindowResizable>().call(&resizable);
+}
+
+Eina_Bool ewk_window_features_toolbar_visible_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->toolBar_Visible_;
+}
+
+Eina_Bool ewk_window_features_statusbar_visible_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->statusBar_Visible_;
+}
+
+Eina_Bool ewk_window_features_scrollbars_visible_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->scrollBar_Visible_;
+}
+
+Eina_Bool ewk_window_features_menubar_visible_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->menuBar_Visible_;
+}
+
+Eina_Bool ewk_window_features_locationbar_visible_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->locationBar_Visible_;
+}
+
+Eina_Bool ewk_window_features_resizable_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->resizable_;
+}
+
+Eina_Bool ewk_window_features_fullscreen_get(const Ewk_Window_Features* window_features)
+{
+  EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
+  return window_features->fullScreen_;
+}
+
+void ewk_window_features_geometry_get(const Ewk_Window_Features* window_features, float* x, float* y, float* width, float* height)
+{
+  EINA_SAFETY_ON_NULL_RETURN(window_features);
+
+  if (x)
+     *x = window_features->x_;
+  if (y)
+    *y = window_features->y_;
+  if (width)
+    *width = window_features->width_;
+  if (height)
+    *height = window_features->height_;
+}
+
+#endif
diff --git a/tizen_src/ewk/efl_integration/public/ewk_window_features.h b/tizen_src/ewk/efl_integration/public/ewk_window_features.h
new file mode 100644 (file)
index 0000000..a9d76d7
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @file    ewk_window_features.h
+ * @brief   Access to the features of window.
+ */
+
+#ifndef ewk_window_features_h
+#define ewk_window_features_h
+
+#if !defined(EWK_BRINGUP)
+
+#include <Eina.h>
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Declare Ewk_Window_Features as Ewk_Object.
+ *
+ * @see Ewk_Object
+ */
+ //EwkObject is removed or deprecated
+//typedef struct EwkObject Ewk_Window_Features;
+
+typedef struct _EWK_Window_Features Ewk_Window_Features;
+
+/**
+* Queries the toolbar visibility of the window feature.
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the toolbar should be visible, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_toolbar_visible_get(const Ewk_Window_Features *window_features);
+
+/**
+* Queries the statusbar visibility of the window feature.
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the statusbar should be visible, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_statusbar_visible_get(const Ewk_Window_Features *window_features);
+
+/**
+* Queries the scrollbar visibility of the window feature.
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the scrollbars should be visible, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_scrollbars_visible_get(const Ewk_Window_Features *window_features);
+
+/**
+* Queries the menubar visibility of the window feature.
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the menubar should be visible, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_menubar_visible_get(const Ewk_Window_Features *window_features);
+
+/**
+* Queries the locationbar visibility of the window feature.
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the locationbar should be visible, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_locationbar_visible_get(const Ewk_Window_Features *window_features);
+
+/**
+* Queries if the window is resizable.
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the window should be resizable, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_resizable_get(const Ewk_Window_Features *window_features);
+
+/**
+* Queries the the window is fullscreen
+*
+* @param window_features the object to get properties
+*
+* @return @c EINA_TRUE is the window should be fullscreen, @c EINA_FALSE otherwise
+*/
+EAPI Eina_Bool ewk_window_features_fullscreen_get(const Ewk_Window_Features *window_features);
+
+/**
+* Gets geometry properties of an Ewk_Window_Features.
+*
+* Properties are returned in the respective pointers. Passing @c NULL to any of
+* these pointers will cause that property to not be returned.
+*
+* @param window_features the window's features
+* @param x the pointer to store x position
+* @param y the pointer to store y position
+* @param w the pointer to store width
+* @param h the pointer to store height
+*/
+EAPI void ewk_window_features_geometry_get(const Ewk_Window_Features *window_features, float *x, float *y, float *w, float *h);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // EWK_BRINGUP
+#endif // ewk_window_features_h
diff --git a/tizen_src/ewk/efl_integration/public/text_encoding_map_efl.cc b/tizen_src/ewk/efl_integration/public/text_encoding_map_efl.cc
new file mode 100644 (file)
index 0000000..e17a867
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+// TODO: move this file to other location than ewk's public
+
+#include "public/text_encoding_map_efl.h"
+
+// TODO: remove strings.h because it's non-standard.
+#include <strings.h>
+
+#include <string>
+
+namespace{
+
+  // The below Encodings have been taken from
+  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp
+  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp
+  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp
+  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp
+  // chromium/src/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp
+  //
+  // The TextEncodingNameMap(present in /chromium/src/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp)
+  // is contructed by combining the Encodings and aliases present in the above files.
+  //
+  // The character encoding list used by chrome browser is also used as reference. It is located in :
+  // chromium/src/chrome/browser/character_encoding.cc
+
+const std::string TextEncodingNameMap[] = {
+"windows-1252",
+"ISO-8859-1",
+"US-ASCII",
+"UTF-8",
+"UTF-16LE",
+"UTF-16BE",
+"x-user-defined",
+"ISO-8859-8-I",
+"GBK",
+"GB_2312-80",
+"EUC-KR",
+"Windows-1254",
+"Windows-874",
+"Big5",
+"macintosh",
+"EUC-JP",
+"Big5-HKSCS",
+"Shift_JIS",
+"EUC-JP",
+"ISO-2022-JP",
+"windows-874",
+"windows-949",
+"ISO-8859-15",
+"ISO-8859-2",
+"windows-1250",
+"windows-1251",
+"windows-1258",
+"KOI8-R",
+"ISO-8859-7",
+"windows-1253",
+"windows-1256",
+"windows-1257",
+"ISO-8859-8",
+"windows-1254",
+"windows-1255",
+"ISO-8859-6",
+"ISO-8859-1",
+"ISO-8859-3",
+"ISO-8859-4",
+"ISO-8859-10",
+"ISO-8859-13",
+"ISO-8859-14",
+"ISO-8859-5",
+"ISO-8859-9",
+"cp864",
+"x-mac-cyrillic"
+};
+
+} //namespace
+
+const size_t maxEncodingNameLength = 63;
+const size_t textEncodingNameMapLength = 46;
+
+//static
+bool TextEncodingMapEfl::isTextEncodingValid(const char* name)
+{
+ if (!name || !name[0] || (std::string(name).length() > maxEncodingNameLength))
+  return 0;
+
+ for (size_t i = 0; i < textEncodingNameMapLength; i++) {
+   if (!strcasecmp(TextEncodingNameMap[i].c_str(), name))
+    return true;
+ }
+ return false;
+}
diff --git a/tizen_src/ewk/efl_integration/public/text_encoding_map_efl.h b/tizen_src/ewk/efl_integration/public/text_encoding_map_efl.h
new file mode 100644 (file)
index 0000000..9509691
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+   Copyright (C) 2013 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+// TODO: move this file to somewhere not ewk public directory
+#ifndef TextEncodingMapEfl_h
+#define TextEncodingMapEfl_h
+
+class TextEncodingMapEfl {
+ public:
+  static bool isTextEncodingValid(const char* name);
+};
+
+#endif // TextEncodingRegistry_h
diff --git a/tizen_src/ewk/efl_webview_app/CMakeLists.txt b/tizen_src/ewk/efl_webview_app/CMakeLists.txt
new file mode 100644 (file)
index 0000000..222a973
--- /dev/null
@@ -0,0 +1,65 @@
+SET (EFL_WEBVIEW_EXEC_NAME "efl_webview_app")
+SET (MINI_BROWSER_EXEC_NAME "mini_browser")
+SET (EFL_WEBVIEW_SH_DESKTOP_WRAPPER_NAME "efl_webview_app.sh")
+
+INCLUDE_DIRECTORIES (
+  ${CMAKE_SOURCE_DIR}/efl_integration
+  ${eina_INCLUDE_DIRS}
+  ${evas_INCLUDE_DIRS}
+  ${ecore_INCLUDE_DIRS}
+  ${ecore-x_INCLUDE_DIRS}
+  ${elementary_INCLUDE_DIRS}
+  ${appcore-efl_INCLUDE_DIRS}
+  ${dlog_INCLUDE_DIRS}
+  ${capi-appfw-application_INCLUDE_DIRS}
+  ${efl-assist_INCLUDE_DIRS}
+  ${haptic_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE (${EFL_WEBVIEW_EXEC_NAME} app.c)
+
+TARGET_LINK_LIBRARIES (
+  ${EFL_WEBVIEW_EXEC_NAME}
+  ${eina_LDFLAGS}
+  ${evas_LDFLAGS}
+  ${ecore_LDFLAGS}
+  ${ecore-x_LDFLAGS}
+  ${elementary_LDFLAGS}
+  ${efl-assist_LDFLAGS}
+  ${haptic_LDFLAGS}
+  ${chromium-efl_LDFLAGS}
+  chromium-ewk
+)
+
+IF(${TARGET} STREQUAL "desktop")
+  MESSAGE(CMAKE_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR})
+  ADD_CUSTOM_COMMAND(TARGET ${EFL_WEBVIEW_EXEC_NAME} POST_BUILD
+                  COMMAND ${CMAKE_COMMAND} -E copy
+                  ${CMAKE_CURRENT_SOURCE_DIR}/${EFL_WEBVIEW_SH_DESKTOP_WRAPPER_NAME} $<TARGET_FILE_DIR:${EFL_WEBVIEW_EXEC_NAME}>)
+ENDIF(${TARGET} STREQUAL "desktop")
+
+IF (appcore-efl_FOUND AND dlog_FOUND)
+  ADD_EXECUTABLE (${MINI_BROWSER_EXEC_NAME} mini_browser.c)
+  TARGET_LINK_LIBRARIES (
+    ${MINI_BROWSER_EXEC_NAME}
+    ${eina_LDFLAGS}
+    ${evas_LDFLAGS}
+    ${ecore_LDFLAGS}
+    ${ecore-x_LDFLAGS}
+    ${elementary_LDFLAGS}
+    ${appcore-efl_LDFLAGS}
+    ${dlog_LDFLAGS}
+    ${capi-appfw-application_LDFLAGS}
+    ${efl-assist_LDFLAGS}
+    ${haptic_LDFLAGS}
+    ${chromium-efl_LDFLAGS}
+    chromium-ewk
+  )
+  INSTALL (TARGETS ${MINI_BROWSER_EXEC_NAME} RUNTIME DESTINATION ${BINDIR})
+  INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/mini-browser.png
+          DESTINATION ${DATADIR}/icons)
+  INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.chromium-ewk.xml
+          DESTINATION ${DATADIR}/packages)
+ENDIF ()
+
+INSTALL (TARGETS ${EFL_WEBVIEW_EXEC_NAME} RUNTIME DESTINATION ${BINDIR})
diff --git a/tizen_src/ewk/efl_webview_app/S_TRUNK_OWNERS b/tizen_src/ewk/efl_webview_app/S_TRUNK_OWNERS
new file mode 100644 (file)
index 0000000..a7eabf9
--- /dev/null
@@ -0,0 +1,18 @@
+a.renevier@samsung.com
+a1.gomes@samsung.com
+ch.dumez@samsung.com
+dennis.oh@samsung.com
+dhyuna.ko@samsung.com
+dw.im@samsung.com
+hyungsun.ryu@samsung.com
+j.majnert@samsung.com
+kangil.han@samsung.com
+kihong.kwon@samsung.com
+mohan.reddy@samsung.com
+prashant.n@samsung.com
+p.grad@samsung.com
+p.sikorski@samsung.com
+p.tworek@samsung.com
+v.keshav@samsung.com
+yi.shen@samsung.com
+youngbok.yoon@samsung.com
diff --git a/tizen_src/ewk/efl_webview_app/app.c b/tizen_src/ewk/efl_webview_app/app.c
new file mode 100644 (file)
index 0000000..2b13adf
--- /dev/null
@@ -0,0 +1,1435 @@
+#include "public/ewk_auth_challenge.h"
+#include "public/ewk_context.h"
+#include "public/ewk_main.h"
+#include "public/ewk_view.h"
+#include "public/ewk_geolocation.h"
+#include "public/ewk_security_origin.h"
+#include "public/ewk_error.h"
+#include "public/ewk_notification.h"
+#include "public/ewk_policy_decision.h"
+#include "public/ewk_context_menu.h"
+#include "public/ewk_text_style.h"
+#include "public/ewk_cookie_manager.h"
+#include "public/ewk_console_message.h"
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Ecore_File.h>
+#include <Ecore_Getopt.h>
+#include <Ecore_X.h>
+#include <Evas.h>
+#include <Elementary.h>
+
+#if defined(OS_TIZEN_MOBILE)
+#include <haptic/haptic.h>
+#endif
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+static Ecore_Evas* ee;
+static Evas* e;
+static Evas_Object* view;
+static Evas_Object *popup;
+
+Ewk_Notification *current_notification;
+
+static Ewk_Auth_Challenge* auth_challenge_holder = NULL;
+static Evas_Object* credentials[2] = {0};//username and password
+
+static Eina_Bool fullscreen_enabled;
+static Eina_Bool clear_cache;
+static Eina_Bool disable_cache = EINA_FALSE;
+static char* pdf_filename = NULL;
+static char* cache_policy = NULL;
+static char* content_security_policy = NULL;
+static char* content_security_policy_type = NULL;
+static char* start_url = NULL;
+static int content_text_callback_data = 10;
+static int content_text_callback_data_1 = 20;
+static Eina_Bool test_cookie;
+static Eina_Bool clear_cookie_called;
+static Ewk_Cookie_Accept_Policy set_cookie_policy;  
+static Eina_List* application_cache_origins = NULL;
+static Evas_Object* prompt_entry;
+static Eina_List* web_database_origins = NULL;
+
+#if defined(OS_TIZEN_MOBILE)
+static haptic_device_h g_haptic_handle;
+static Ecore_Timer *g_haptic_timer_id;
+static haptic_effect_h g_haptic_effect;
+#endif
+
+static void show_userid_password_popup(const char* msg);
+static void show_search_popup(void);
+static void on_mouse_up(void* data, Evas* canvas, Evas_Object* obj, void* event_info);
+static void __search_closed_cb(void *data, Evas_Object *obj, void *event_info);
+static void __search_focused_cb(void *data, Evas_Object *obj, void *event_info);
+static void __search_unfocused_cb(void *data, Evas_Object *obj, void *event_info);
+static void __search_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+static void __auth_login_button_cb(void *data, Evas_Object *obj, void *event_info);
+static void __auth_close_button_cb(void *data, Evas_Object *obj, void *event_info);
+static void __load_finished_cb(void *data, Evas_Object *obj, void *event_info);
+static void __load_error_cb(void *data, Evas_Object *obj, void *event_info);
+static void __uri_changed_cb(void *data, Evas_Object *obj, void *event_info);
+static void __title_changed_cb(void *data, Evas_Object *obj, void *event_info);
+static void __load_progress_cb(void *data, Evas_Object *obj, void *event_info);
+static void __load_progress_started_cb(void *data, Evas_Object *obj, void *event_info);
+static void __load_progress_finished_cb(void *data, Evas_Object *obj, void *event_info);
+static void __ime_input_panel_show_cb(void* data, Evas_Object *obj, void* event_info);
+static void __ime_input_panel_hide_cb(void* data, Evas_Object *obj, void* event_info);
+static void __ime_candidate_panel_show_cb(void* data, Evas_Object *obj, void* event_info);
+static void __ime_candidate_panel_hide_cb(void* data, Evas_Object *obj, void* event_info);
+static void __create_window_cb(void *data, Evas_Object *obj, void *event_info);
+static void __window_closed_cb(void *data, Evas_Object *obj, void *event_info);
+static void __imf_input_method_changed_cb(void *data, Evas_Object *obj, void *event_info);
+static void __did_start_provisional_load_for_frame_cb(void *data, Evas_Object *obj, void *event_info);
+static void __did_commit_load_for_frame(void *data, Evas_Object *obj, void *event_info);
+static void __geoLocation_popup_display_cb(void *data, Evas_Object *obj, void *event_info);
+void __script_executed_cb(Evas_Object *obj, const char *javascript_result, void *data);
+static void __auth_challenge_cb(void* data, Evas_Object *obj, void *event_info);
+static void __policy_response_decide_cb(void *data, Evas_Object *obj, void *event_info);
+static void __customize_context_menu_cb(void* data, Evas_Object *obj, void *event_info);
+static void __customize_context_menu_item_selected_cb(void* data, Evas_Object *obj, void *event_info);
+static void __navigation_policy_decide_cb(void *data, Evas_Object *obj, void *event_info);
+static void __text_found_cb(void *data, Evas_Object *obj, void *event_info);
+static void __newwindow_policy_cb(void *data, Evas_Object *obj, void* policy);
+static void __load_nonemptylayout_finished_cb(void* data, Evas_Object *obj, void *event_info);
+static void __popup_wait_start_cb(void *data, Evas_Object *obj, void* policy);
+static void __popup_wait_finish_cb(void *data, Evas_Object *obj, void* policy);
+static void __edge_left_cb(void* data, Evas_Object* obj, void* event_info);
+static void __edge_right_cb(void* data, Evas_Object* obj, void* event_info);
+static void __edge_top_cb(void* data, Evas_Object* obj, void* event_info);
+static void __edge_bottom_cb(void* data, Evas_Object* obj, void* event_info);
+static void __scroll_down_cb(void* data, Evas_Object* obj, void* event_info);
+static void __scroll_up_cb(void* data, Evas_Object* obj, void* event_info);
+static void __scroll_left_cb(void* data, Evas_Object* obj, void* event_info);
+static void __scroll_right_cb(void* data, Evas_Object* obj, void* event_info);
+static void __webprocess_crashed_cb(void* data, Evas_Object* obj, void* event_info);
+
+static void on_evas_resize(Ecore_Evas*);
+static void __notification_show_cb(void *data, Evas_Object *obj, void *event_info);
+static void __notification_permission_cb(void *data, Evas_Object *obj, void *event_info);
+static void __notification_cancel_cb(void *data, Evas_Object *obj, void *event_info);
+static void __notification_cancel_byuser_cb(void *data, Evas_Object *obj, void *event_info);
+static void __download_callback(const char*download_url, void* user_data);
+static void __frame_rendered_cb(void* data, Evas_Object* obj, void* event_info);
+static void __ewk_view_plain_text_get_cb(Evas_Object* o, const char* content_text, void* user_data);
+static void __ewk_view_plain_text_get_cb_1(Evas_Object* o, const char* content_text, void* user_data);
+static void __load_started_cb(void *data, Evas_Object *obj, void *event_info);
+static void __text_style_state_changed_cb(void *data, Evas_Object *obj, void *event_info);
+static void __ewk_cookie_manager_async_policy_get_cb(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info);
+static void __ewk_cookie_manager_async_hostnames_get_cb(Eina_List *hostnames, Ewk_Error *error, void *event_info);
+static void __back_forward_list_changed_cb(void *data, Evas_Object *obj, void *event_info);
+static Eina_Bool __mime_override_cb(const char* url, const char *mime, char **new_mime);
+static void __console_message_cb(void *data, Evas_Object *obj, void *event_info);
+
+#if defined(OS_TIZEN_MOBILE)
+static Eina_Bool __vibration_timeout_cb(void *data);
+#endif
+static void __vibration_on_cb(uint64_t vibration_time, void *data);
+static void __vibration_off_cb(void *data);
+static void __undo_size_cb(void* data, Evas_Object* obj, void* event_info);
+static void __redo_size_cb(void* data, Evas_Object* obj, void* event_info);
+void __mhtml_save_cb(Evas_Object *obj, const char *mhtml_data, void *data);
+static void __clipboard_opened_cb(void* data, Evas_Object* view, void* event_info);
+static Eina_Bool __ewk_view_javascript_alert_cb(Evas_Object* o, const char* alert_text, void* user_data);
+static Eina_Bool __ewk_view_javascript_confirm_cb(Evas_Object* o, const char* message, void* user_data);
+static Eina_Bool __ewk_view_javascript_prompt_cb(Evas_Object* o, const char* message, const char* default_value, void* user_data);
+
+enum {
+  FOR_TEST_APPLICATION_CACHE_RUN = EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG + 1,
+  FOR_TEST_APPLICATION_CACHE_DELETE_ALL,
+  FOR_TEST_APPLICATION_BACK_FORWAD_CLEAR,
+  FOR_TEST_GRAB_SNAPSHOT,
+  FOR_TEST_WEB_DATABASE_GET_ORIGINS,
+  FOR_TEST_WEB_DATABASE_DELETE_ALL
+  // New context menu items can be added here
+};
+
+static const Ecore_Getopt options = {
+  .prog = "efl_webview_app",
+  .usage = "%prog [options] [url]",
+  .strict = EINA_FALSE,
+  .descs = {
+    ECORE_GETOPT_STORE_DEF_BOOL('F', "full-screen", "start in full-screen", EINA_TRUE),
+    ECORE_GETOPT_STORE_DEF_BOOL('c', "clear-cache", "clear cache on every page load finished", EINA_TRUE),
+    ECORE_GETOPT_STORE_DEF_BOOL('k', "test-cookie", "test cookie on every page load finished", EINA_TRUE),
+    ECORE_GETOPT_STORE_DEF_STR('s', "set-cache-policy", "set cache policy", "viewer"),
+    ECORE_GETOPT_STORE_DEF_STR('p', "set-content-security-policy", "set content security policy", NULL),
+    ECORE_GETOPT_STORE_DEF_STR('t', "content-security-policy-type",
+                               "Type of content security policy only applicable if policy is defined",
+                               NULL),
+    ECORE_GETOPT_STORE_DEF_BOOL('d', "disable-cache", "Disable network cache", EINA_FALSE),
+    ECORE_GETOPT_STORE_DEF_STR('w', "save-pdf", "Save as PDF", "webpage.pdf"),
+    ECORE_GETOPT_SENTINEL,
+  }
+};
+
+static Eina_Bool _util_print_hit_test_result_hash_fn(const Eina_Hash *hash, const void *key, void *data, void *fdata)
+{
+  printf("HitTest attribute (%s): (%s)\n", (const char*)key, (char *)data);
+  return EINA_TRUE;
+}
+
+
+static void on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
+    static int scroll_x = 0;
+    static int scroll_y = 0;
+
+    if (strcmp(ev->key, "XF86Stop") == 0)
+    {
+      if (ewk_view_text_selection_clear(view))
+        return;
+    }
+
+    if (!strcmp(ev->key, "F1")) {
+        fprintf(stderr, "[on_key_down] (F1) pressed. Go to wikipedia.com\n");
+        ewk_view_url_set(view, "http://www.wikipedia.com/");
+    }
+    else if (!strcmp(ev->key, "F2")) {
+        double level = ewk_view_text_zoom_get(view) + 0.1;
+        ewk_view_text_zoom_set(view, level);
+        printf("current text zoom level %lf\n", ewk_view_text_zoom_get(view));
+    }
+    else if (!strcmp(ev->key, "F3")) {
+        double level = ewk_view_text_zoom_get(view) - 0.1;
+        ewk_view_text_zoom_set(view, level);
+        printf("current text zoom level %lf\n", ewk_view_text_zoom_get(view));
+    }
+    else if (!strcmp(ev->key, "F4")) {
+       ewk_view_command_execute(view, "Undo", NULL);
+    }
+    else if (!strcmp(ev->key, "F5")) {
+        printf("selection text \"%s\"\n", ewk_view_text_selection_text_get(view));
+    }
+    else if (!strcmp(ev->key, "F6")) {
+        ewk_view_stop(view);
+    }
+    else if (!strcmp(ev->key, "F7")) {
+        static Eina_Bool visibility = EINA_TRUE;
+        visibility = !visibility;
+        ewk_view_visibility_set(view, visibility);
+    }
+    else if (!strcmp(ev->key, "F8")) {
+        ewk_view_contents_set(view, "ewk Data Set API Test!!!!", 25, "text/plain", NULL, "http://www.naver.com");
+    }
+    else if (!strcmp(ev->key, "F9")) {
+        static int x;
+        static int y;
+        ewk_view_scroll_pos_get(view, &x, &y);
+        printf("scroll_pos_get %d, %d \n",x,y);
+    }
+    else if (!strcmp(ev->key, "F10")) {
+        if (!(ewk_view_plain_text_get(view, __ewk_view_plain_text_get_cb, &content_text_callback_data)))
+            printf("\nEWK_VIEW_PLAIN_TEXT_GET FAILURE\n");
+        else
+            printf("\nEWK_VIEW_PLAIN_TEXT_GET SUCCESS\n");
+        if (!(ewk_view_plain_text_get(view, __ewk_view_plain_text_get_cb_1, &content_text_callback_data_1)))
+            printf("\nEWK_VIEW_PLAIN_TEXT_GET_1 FAILURE\n");
+        else
+            printf("\nEWK_VIEW_PLAIN_TEXT_GET_1 SUCCESS\n");
+    }
+    else if (!strcmp(ev->key, "F11")) {
+       ewk_view_command_execute(view, "Redo", NULL);
+    }
+    else if (evas_key_modifier_is_set(ev->modifiers, "Control")) {
+        if (!strcmp(ev->key, "f") || !strcmp(ev->key, "F"))
+            show_search_popup();
+        else if (!strcmp(ev->key, "s") || !strcmp(ev->key, "S"))
+          ewk_view_mhtml_data_get(view, __mhtml_save_cb, NULL);
+    }
+    else if (!strcmp(ev->key, "w") || !strcmp(ev->key, "W")) {
+        if(scroll_y >= 0) {
+          scroll_y -= 2;
+          ewk_view_scroll_set(view, scroll_x, scroll_y);
+          printf("scroll_set  %d, %d \n", scroll_x, scroll_y);
+        }
+    }
+    else if (!strcmp(ev->key, "s") || !strcmp(ev->key, "S")) {
+        scroll_y += 2;
+        ewk_view_scroll_set(view, scroll_x, scroll_y);
+        printf("scroll_set  %d, %d \n", scroll_x, scroll_y);
+    }
+    else if (!strcmp(ev->key, "d") || !strcmp(ev->key, "D")) {
+        scroll_x += 2;
+        ewk_view_scroll_set(view, scroll_x, scroll_y);
+        printf("scroll_set  %d, %d \n", scroll_x, scroll_y);
+    }
+    else if (!strcmp(ev->key, "a") || !strcmp(ev->key, "A")) {
+        if(scroll_x >= 0) {
+          scroll_x -= 2;
+          ewk_view_scroll_set(view, scroll_x, scroll_y);
+          printf("scroll_set  %d, %d \n", scroll_x, scroll_y);
+        }
+    }
+    else if (!strcmp(ev->key, "BackSpace") || !strcmp(ev->key, "XF86Stop")) {
+        ewk_view_back(data);
+    }
+}
+
+static void on_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info) 
+{
+    Evas_Event_Mouse_Wheel* event = (Evas_Event_Mouse_Wheel*)event_info; 
+    static double scale_factor = 1.0;
+    if (evas_key_modifier_is_set(event->modifiers, "Control")) 
+    { 
+        if (event->z == -1)
+            scale_factor += 0.1;
+        else 
+            scale_factor -= 0.1;
+
+        printf("ewk_view_scale_set() : %lf (%d, %d)\n", scale_factor, event->output.x, event->output.y);
+
+        ewk_view_scale_set(view, scale_factor, event->output.x, event->output.y);
+    }
+}
+
+static Eina_Strbuf* create_url_with_scheme(const char* base_url, const char* scheme)
+{
+  Eina_Strbuf* buffer = eina_strbuf_new();
+  eina_strbuf_append(buffer, scheme);
+  eina_strbuf_append(buffer, base_url);
+  return buffer;
+}
+
+static void set_url_from_user_input(Evas_Object* view, const char* url)
+{
+  if (strstr(url, "://")) {
+    ewk_view_url_set(view, url);
+    return;
+  }
+
+  // Add scheme.
+  Eina_Strbuf* full_url;
+  if (ecore_file_exists(url)) {
+    char* realpath = ecore_file_realpath(url);
+    full_url = create_url_with_scheme(realpath, "file://");
+    free(realpath);
+  } else {
+    full_url = create_url_with_scheme(url, "http://");
+  }
+
+  ewk_view_url_set(view, eina_strbuf_string_get(full_url));
+
+  eina_strbuf_free(full_url);
+}
+
+//set cache policy as per command line arguments
+static void set_cache_policy(Ewk_Context* context)
+{
+  if(!cache_policy) {
+    ewk_context_cache_model_set(context, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    return;
+  }
+  if (!strcmp(cache_policy, "browser"))
+    ewk_context_cache_model_set(context, EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+  else if (!strcmp(cache_policy, "webbrowser"))
+    ewk_context_cache_model_set(context, EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+  else if(!strcmp(cache_policy, "viewer"))
+    ewk_context_cache_model_set(context, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+}
+
+static void set_csp(Evas_Object *ewk_view)
+{
+  if(!ewk_view || !content_security_policy_type)
+    return;
+
+  if(!strcmp(content_security_policy_type, "report"))
+    ewk_view_content_security_policy_set(ewk_view, content_security_policy, EWK_REPORT_ONLY);
+  else if(!strcmp(content_security_policy_type, "enforce"))
+    ewk_view_content_security_policy_set(ewk_view, content_security_policy, EWK_ENFORCE_POLICY);
+}
+
+static void disable_cache_for_context(Ewk_Context* context)
+{
+  ewk_context_cache_disabled_set(context, EINA_TRUE);
+}
+
+static void _evas_close_cb(Ecore_Evas* ee)
+{
+  ecore_main_loop_quit();
+}
+
+int main(int argc, char** argv)
+{
+  // Make sure this happens just once.
+  // By default the web process is the same program.
+  fprintf(stderr, "efl_webview_app starting...\n");
+
+  ewk_set_arguments(argc, argv);
+  elm_init(0,NULL);
+  if (!ewk_init())
+    return EXIT_FAILURE;
+  elm_init(0, NULL);
+  Ecore_Getopt_Value values[] = {
+    ECORE_GETOPT_VALUE_BOOL(fullscreen_enabled),
+    ECORE_GETOPT_VALUE_BOOL(clear_cache),
+    ECORE_GETOPT_VALUE_BOOL(test_cookie),
+    ECORE_GETOPT_VALUE_STR(cache_policy),
+    ECORE_GETOPT_VALUE_STR(content_security_policy),
+    ECORE_GETOPT_VALUE_STR(content_security_policy_type),
+    ECORE_GETOPT_VALUE_BOOL(disable_cache),
+    ECORE_GETOPT_VALUE_STR(pdf_filename),
+    ECORE_GETOPT_VALUE_NONE,
+  };
+
+
+  int idx = ecore_getopt_parse(&options, values, argc, argv);
+  for (; idx < argc; ++idx) {
+    // Treat first argument not starting with - as the url to load
+    if (argv[idx][0] != '-') {
+      start_url = strdup(argv[idx]);
+      break;
+    }
+  }
+
+  if (!start_url) {
+    start_url = strdup("http://www.google.com");
+  }
+
+  int width = 800;
+  int height = 600;
+
+  ee = ecore_evas_new("opengl_x11", 0, 0, width, height, 0);
+  e = ecore_evas_get(ee);
+
+  ecore_evas_callback_delete_request_set(ee, _evas_close_cb);
+
+#if defined(OS_TIZEN)
+  // Ignore fullscreen option, we should always go fullscreen on device.
+  Eina_Bool use_fullscreen = EINA_TRUE;
+#else
+  Eina_Bool use_fullscreen = fullscreen_enabled;
+#endif
+
+  if (use_fullscreen) {
+    // FIXME: this is wrong with dual screen configuration (desktop).
+    // We should use XineramaQueryScreens for that setup.
+    ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+    ecore_evas_size_base_set(ee, width, height);
+  }
+
+  Ewk_Context* context = ewk_context_default_get();
+  view = ewk_view_add_with_context(e, context);
+  evas_object_resize(view, width, height);
+
+  ecore_evas_callback_resize_set(ee, &on_evas_resize);
+
+  evas_object_event_callback_add(view, EVAS_CALLBACK_KEY_DOWN, on_key_down, view);
+  evas_object_event_callback_add(view, EVAS_CALLBACK_MOUSE_WHEEL, on_mouse_wheel, view);
+  evas_object_event_callback_add(view, EVAS_CALLBACK_MOUSE_UP , on_mouse_up, 0);
+  evas_object_show(view);
+  evas_object_focus_set(view, EINA_TRUE);
+  set_cache_policy(context);
+  if (disable_cache) {
+    disable_cache_for_context(context);
+  }
+  set_csp(view);
+
+  evas_object_smart_callback_add(view, "load,finished", __load_finished_cb, context);
+  evas_object_smart_callback_add(view, "load,error", __load_error_cb, 0);
+  evas_object_smart_callback_add(view, "url,changed", __uri_changed_cb,0);
+  evas_object_smart_callback_add(view, "title,changed", __title_changed_cb,0);
+  evas_object_smart_callback_add(view, "load,progress", __load_progress_cb,0);
+  evas_object_smart_callback_add(view, "load,progress,started", __load_progress_started_cb,0);
+  evas_object_smart_callback_add(view, "load,progress,finished", __load_progress_finished_cb,0);
+  evas_object_smart_callback_add(view, "editorclient,ime,opened", __ime_input_panel_show_cb,0);
+  evas_object_smart_callback_add(view, "editorclient,ime,closed", __ime_input_panel_hide_cb,0);
+  evas_object_smart_callback_add(view, "editorclient,candidate,opened", __ime_candidate_panel_show_cb,0);
+  evas_object_smart_callback_add(view, "editorclient,candidate,closed", __ime_candidate_panel_hide_cb,0);
+  evas_object_smart_callback_add(view, "create,window", __create_window_cb, 0);
+  evas_object_smart_callback_add(view, "inputmethod,changed", __imf_input_method_changed_cb, 0);
+  evas_object_smart_callback_add(view, "load,committed", __did_commit_load_for_frame, 0);
+  evas_object_smart_callback_add(view, "load,provisional,started", __did_start_provisional_load_for_frame_cb, 0);
+  evas_object_smart_callback_add(view, "geolocation,permission,request", __geoLocation_popup_display_cb,0);
+  evas_object_smart_callback_add(view, "authentication,challenge", __auth_challenge_cb, 0);
+  evas_object_smart_callback_add(view, "notification,show", __notification_show_cb,0);
+  evas_object_smart_callback_add(view, "notification,cancel", __notification_cancel_cb,0);
+  evas_object_smart_callback_add(view, "notification,permission,request", __notification_permission_cb,0);
+  evas_object_smart_callback_add(view, "policy,response,decide", __policy_response_decide_cb, 0);
+  evas_object_smart_callback_add(view, "contextmenu,customize", __customize_context_menu_cb, 0);
+  evas_object_smart_callback_add(view, "contextmenu,selected", __customize_context_menu_item_selected_cb, 0);
+  evas_object_smart_callback_add(view, "policy,navigation,decide", __navigation_policy_decide_cb,0);
+  evas_object_smart_callback_add(view, "text,found", __text_found_cb, 0);
+  evas_object_smart_callback_add(view, "policy,newwindow,decide", __newwindow_policy_cb,0);
+  evas_object_smart_callback_add(view, "load,nonemptylayout,finished", __load_nonemptylayout_finished_cb, 0);
+  evas_object_smart_callback_add(view, "popup,reply,wait,start", __popup_wait_start_cb,0);
+  evas_object_smart_callback_add(view, "popup,reply,wait,finish", __popup_wait_finish_cb,0);
+  evas_object_smart_callback_add(view, "clipboard,opened", __clipboard_opened_cb, 0);
+  ewk_context_did_start_download_callback_set(context, __download_callback, NULL);
+  evas_object_smart_callback_add(view, "frame,rendered", __frame_rendered_cb, 0);
+  evas_object_smart_callback_add(view, "load,started", __load_started_cb, context);
+  evas_object_smart_callback_add(view, "edge,left", __edge_left_cb, 0);
+  evas_object_smart_callback_add(view, "edge,right", __edge_right_cb, 0);
+  evas_object_smart_callback_add(view, "edge,top", __edge_top_cb, 0);
+  evas_object_smart_callback_add(view, "edge,bottom", __edge_bottom_cb, 0);
+  evas_object_smart_callback_add(view, "text,style,state", __text_style_state_changed_cb, 0);
+  evas_object_smart_callback_add(view, "scroll,down", __scroll_down_cb, 0);
+  evas_object_smart_callback_add(view, "scroll,up", __scroll_up_cb, 0);
+  evas_object_smart_callback_add(view, "scroll,left", __scroll_left_cb, 0);
+  evas_object_smart_callback_add(view, "scroll,right", __scroll_right_cb, 0);
+  evas_object_smart_callback_add(view, "back,forward,list,changed", __back_forward_list_changed_cb, 0);
+  evas_object_smart_callback_add(view, "webprocess,crashed", __webprocess_crashed_cb, 0);
+  evas_object_smart_callback_add(view, "undo,size", __undo_size_cb, 0);
+  evas_object_smart_callback_add(view, "redo,size", __redo_size_cb, 0);
+  
+  ewk_view_custom_header_add(view, "X-Test-header", "X-Value-1");
+
+  ewk_context_vibration_client_callbacks_set(context, __vibration_on_cb, __vibration_off_cb, NULL);
+  ewk_context_mime_override_callback_set(__mime_override_cb);
+  ewk_view_javascript_alert_callback_set(view, __ewk_view_javascript_alert_cb, 0);
+  ewk_view_javascript_confirm_callback_set(view, __ewk_view_javascript_confirm_cb, 0);
+  ewk_view_javascript_prompt_callback_set(view, __ewk_view_javascript_prompt_cb, 0);
+  evas_object_smart_callback_add(view, "console,message", __console_message_cb, 0);
+
+  if(test_cookie) {
+       set_cookie_policy = EWK_COOKIE_ACCEPT_POLICY_NEVER;
+       ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), set_cookie_policy);
+  }
+
+  set_url_from_user_input(view, start_url);
+
+  ecore_evas_show(ee);
+  ewk_view_script_execute(view, "console.log(\"Executed test script\");", __script_executed_cb, 0);
+  ecore_main_loop_begin();
+  ewk_context_unref(context);
+  // deleting view will release context
+  evas_object_del(view);
+  ewk_shutdown();
+
+  free(start_url);
+
+  return 0;
+}
+
+static void on_evas_resize(Ecore_Evas* ee)
+{
+  int width, height;
+  ecore_evas_geometry_get(ee, NULL, NULL, &width, &height);
+  evas_object_resize(view, width, height);
+}
+
+void __ewk_cookie_manager_async_hostnames_get_cb(Eina_List *hostnames, Ewk_Error *error, void *event_info)
+{
+  printf ("APP.C callback called __ewk_cookie_manager_async_hostnames_get_cb \n");
+  int host_count = eina_list_count(hostnames);
+  printf("APP.c total hosts received:%d\n",host_count);
+  if (clear_cookie_called) {
+    if (host_count) 
+      printf("APP.C clear cookie call did not delete cookies\n");
+    else
+      printf("APP.c all cookies cleared\n");
+  }
+
+  Ewk_Context* context = ewk_context_default_get();
+  if (host_count) {
+    printf("APP.C  calling ewk_cookie_manager_cookies_clear\n");
+    if (!clear_cookie_called) {
+      clear_cookie_called = EINA_TRUE;
+      printf("APP.c calling ewk_view_get_cookies_for_url:%s\n",ewk_view_get_cookies_for_url(view, start_url));
+      ewk_cookie_manager_cookies_clear(ewk_context_cookie_manager_get(context));
+      printf("APP.c calling ewk_cookie_manager_async_hostnames_with_cookies_get\n");
+      ewk_cookie_manager_async_hostnames_with_cookies_get(ewk_context_cookie_manager_get(context),
+                                                          __ewk_cookie_manager_async_hostnames_get_cb,
+                                                          NULL);
+    }
+  } else if ( EWK_COOKIE_ACCEPT_POLICY_NEVER == set_cookie_policy) {
+    printf("APP.C  cookie policy was set to never now going to set accept except third party\n");
+    set_cookie_policy = EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY;
+    ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), set_cookie_policy);
+    printf("APP.C Reload called from __ewk_cookie_manager_async_policy_get_cb\n");
+    ewk_view_reload(view);
+  } else {
+    if (!clear_cookie_called)
+      printf("APP.cc cookie count is 0 although policy was to accept\n");
+  }
+}
+
+const char* printCookiePolicy(Ewk_Cookie_Accept_Policy policy)
+{
+  switch(policy) {
+    case EWK_COOKIE_ACCEPT_POLICY_ALWAYS :
+           return (" Accept Always ");
+         case EWK_COOKIE_ACCEPT_POLICY_NEVER :
+           return (" Accept Never ");
+         case EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY :
+           return (" No third party ");
+       }
+  return ("");
+}
+
+void __ewk_cookie_manager_async_policy_get_cb(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info)
+{
+  printf ("APP.C callback called __ewk_cookie_manager_async_policy_get_cb \n");
+  if (set_cookie_policy != policy) {
+       printf("error in setting cookie policy");
+  }
+  else {
+    Ewk_Context* context = ewk_context_default_get();
+       printf("APP.C cookie policy is set properly:%s\n", printCookiePolicy(policy));
+       printf("APP.c calling ewk_cookie_manager_async_hostnames_with_cookies_get\n");
+    ewk_cookie_manager_async_hostnames_with_cookies_get(ewk_context_cookie_manager_get(context),
+                                                        __ewk_cookie_manager_async_hostnames_get_cb,
+                                                        NULL);
+  }
+}
+
+void __load_finished_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __load_finished_cb \n");
+  
+  if(clear_cache)
+    ewk_context_cache_clear((Ewk_Context*)data);
+
+  if(test_cookie) {
+       printf("calling get cookie policy async\n");
+    Ewk_Context* context = ewk_context_default_get();
+       ewk_cookie_manager_async_accept_policy_get(ewk_context_cookie_manager_get(context),
+                                                                                                                    __ewk_cookie_manager_async_policy_get_cb,
+                                                                                                                    NULL);
+  }
+
+}
+
+void __load_error_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Error* error = (Ewk_Error*)event_info;
+  printf("APP.C callback called __load_error_cb\n");
+  printf("error url : %s\n", ewk_error_url_get(error));
+}
+
+void __uri_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __uri_changed_cb URI is = %s \n", (const char *)event_info);
+}
+
+void __title_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __title_changed_cb URI is = %s \n", (const char *)event_info);
+}
+
+void __load_progress_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __load_progress_cb value is = %f \n", *((double *)event_info));
+}
+
+void __load_progress_started_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __load_progress_started_cb \n");
+}
+
+void __load_progress_finished_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __load_progress_finsihed_cb \n");
+  ewk_view_custom_header_remove(view, "X-Test-header");
+  
+  int width, height;
+  ewk_view_contents_size_get(view, &width, &height);
+  printf("APP.c called ewk_view_contents_size_get. width = %d, height = %d\n", width, height);
+  ewk_view_scroll_size_get(view, &width, &height);
+  printf("APP.c called ewk_view_scroll_size_get. width = %d, height = %d\n", width, height);
+  printf("APP.c called ewk_view_load_progress_get : %f3\n", ewk_view_load_progress_get(obj));
+  printf("APP.c called ewk_view_title_get   : %s\n", ewk_view_title_get(view));
+}
+
+void __ime_input_panel_show_cb(void* data, Evas_Object *obj, void* event_info)
+{
+  printf ("APP.C callback called __ime_input_panel_show_cb \n");
+}
+
+void __ime_input_panel_hide_cb(void* data, Evas_Object *obj, void* event_info)
+{
+  printf ("APP.C callback called __ime_input_panel_hide_cb \n");
+}
+
+void __ime_candidate_panel_show_cb(void* data, Evas_Object *obj, void* event_info)
+{
+  printf ("APP.C callback called __ime_candidate_panel_show_cb \n");
+}
+
+void __ime_candidate_panel_hide_cb(void* data, Evas_Object *obj, void* event_info)
+{
+  printf ("APP.C callback called __ime_candidate_panel_hide_cb \n");
+}
+
+void delete_popup_window(Ecore_Evas* ee)
+{
+  ecore_evas_free(ee);
+}
+
+void __create_window_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __create_window_cb \n");
+
+  // We have no information about preferred size with the current API.
+  const int default_width = 300;
+  const int default_height =  400;
+
+  Ecore_Evas* ee = ecore_evas_new("opengl_x11", 0, 0, default_width, default_height, 0);
+  Evas* e = ecore_evas_get(ee);
+
+  Evas_Object* view = ewk_view_add(e);
+  evas_object_resize(view, default_width, default_height);
+  evas_object_show(view);
+  evas_object_focus_set(view, EINA_TRUE);
+  ecore_evas_show(ee);
+
+  evas_object_smart_callback_add(view, "close,window", __window_closed_cb, 0);
+
+  // Override default handler because it terminates the event loop.
+  ecore_evas_callback_delete_request_set(ee, delete_popup_window);
+
+  Evas_Object** result = (Evas_Object**) event_info;
+  *result = view;
+}
+
+void __window_closed_cb(void *data, Evas_Object *view, void *event_info)
+{
+  printf ("APP.C callback called __close_window_cb \n");
+
+  Evas* e = evas_object_evas_get(view);
+  Ecore_Evas* ee = ecore_evas_ecore_evas_get(e);
+  evas_object_hide(view);
+  evas_object_focus_set(view, EINA_FALSE);
+  evas_object_del(view);
+
+  ecore_evas_ews_delete_request(ee);
+}
+
+void __imf_input_method_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Eina_Rectangle *rect = (Eina_Rectangle*)event_info;
+  printf ("APP.C callback called __imf_input_method_changed_cb Rect values are x = %d, y= %d, height = %d, width = %d\n",
+           rect->x, rect->y, rect->h, rect->w);
+}
+
+void __script_executed_cb(Evas_Object *obj, const char *javascript_result, void *data)
+{
+  printf ("APP.C callback called __script_executed_cb called with result : %s\n", javascript_result);
+}
+
+void __did_start_provisional_load_for_frame_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __did_start_provisional_load_for_frame_cb \n");
+}
+
+void __did_commit_load_for_frame(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __did_commit_load_for_frame \n");
+}
+
+void __geoLocation_popup_display_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Geolocation_Permission_Request *request = (Ewk_Geolocation_Permission_Request*)event_info;
+  if (request) {
+      const Ewk_Security_Origin * sec_origin = ewk_geolocation_permission_request_origin_get((const Ewk_Geolocation_Permission_Request*)request);
+      if (sec_origin) {
+          printf("APP.C callback called __geoLocation_popup_display_cb URL = %s, protocol = %s, port = %d\n",
+          ewk_security_origin_host_get(sec_origin), ewk_security_origin_protocol_get(sec_origin),ewk_security_origin_port_get(sec_origin));
+          printf ("APP.C callback called __geoLocation_popup_display_cb Setting permission\n");
+          ewk_geolocation_permission_request_set(request, 1);
+      }
+  }
+  printf ("APP.C callback called __geoLocation_popup_display_cb \n");
+}
+
+void __navigation_policy_decide_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Policy_Decision* decision = (Ewk_Policy_Decision*)event_info;
+  printf("APP.C callback called __navigation_policy_decide_cb \n");
+  printf("URL: %s\n", ewk_policy_decision_url_get(decision));
+  printf("Navigation type: %d", ewk_policy_decision_navigation_type_get(decision));
+  // we only set USE
+  // download needs to be handled and ignore wont have any visible difference.
+  printf("Decision: USE\n");
+  ewk_policy_decision_use(decision);
+}
+
+void __auth_challenge_cb(void* data, Evas_Object *obj, void *event_info)
+{
+  printf("APP.C callback called __auth_challenge_cb \n");
+  Ewk_Auth_Challenge* auth_challenge = (Ewk_Auth_Challenge*)event_info;
+  auth_challenge_holder = auth_challenge;
+  if (!auth_challenge)
+    fprintf(stderr, "auth_challenge NULL\n");
+
+  const char* realm = ewk_auth_challenge_realm_get(auth_challenge);
+  const char* url = ewk_auth_challenge_url_get(auth_challenge);
+  if (!realm || !url)
+    fprintf(stderr, "realm or url NULL\n");
+
+  ewk_auth_challenge_suspend(auth_challenge);
+  show_userid_password_popup(url);
+}
+
+void show_userid_password_popup(const char* msg)
+{
+  Evas_Object *popup = elm_win_util_standard_add("auth-window", msg);
+  if (!popup) {
+    fprintf(stderr,"Pop-up window creation failed");
+    return;
+  }
+  elm_win_modal_set(popup, EINA_TRUE);
+  evas_object_size_hint_weight_set(popup , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+  evas_object_size_hint_align_set(popup , EVAS_HINT_FILL, EVAS_HINT_FILL);
+  evas_object_resize(popup, 400, 300);
+  evas_object_show(popup);
+
+  Evas_Object* box = elm_box_add(popup);
+  evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0.0);
+  evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0.0);
+  elm_win_resize_object_add(popup, box);
+  evas_object_show(box);
+
+  Evas_Object *user_name_lable = elm_label_add(popup);
+  elm_object_text_set(user_name_lable, "User name");
+  elm_box_pack_end(box, user_name_lable);
+  evas_object_show(user_name_lable);
+
+  Evas_Object *user_name_entry = elm_entry_add(popup);
+  elm_entry_single_line_set(user_name_entry, EINA_TRUE);
+  elm_object_text_set(user_name_entry, "Delete this and enter user name");
+  elm_object_focus_set(user_name_entry, EINA_TRUE);
+  elm_box_pack_end(box, user_name_entry);
+  evas_object_show(user_name_entry);
+
+  Evas_Object *password_lable = elm_label_add(popup);
+  elm_object_text_set(password_lable, "Password");
+  elm_box_pack_end(box, password_lable);
+  evas_object_show(password_lable);
+
+  Evas_Object *password_entry = elm_entry_add(popup);
+  elm_entry_single_line_set(password_entry, EINA_TRUE);
+  elm_entry_password_set(password_entry, EINA_TRUE);
+  elm_box_pack_end(box, password_entry);
+  evas_object_show(password_entry);
+
+  credentials[0] = user_name_entry;
+  credentials[1] = password_entry;
+
+  Evas_Object *login_button = elm_button_add(popup);
+  elm_object_text_set(login_button, "Login");
+  elm_box_pack_end(box, login_button);
+  evas_object_show(login_button);
+
+  evas_object_smart_callback_add(popup, "delete,request", __auth_close_button_cb, 0);
+  evas_object_smart_callback_add(login_button, "clicked", __auth_login_button_cb, popup);
+}
+
+void show_search_popup(void)
+{
+  Evas_Object *popup = elm_win_util_standard_add("search-text", "Search Text");
+  if (!popup) {
+    fprintf(stderr,"Pop-up window creation failed");
+    return;
+  }
+  evas_object_size_hint_weight_set(popup , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+  evas_object_size_hint_align_set(popup , EVAS_HINT_FILL, EVAS_HINT_FILL);
+  evas_object_resize(popup, 400, 300);
+  evas_object_show(popup);
+
+  Evas_Object* box = elm_box_add(popup);
+  evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0.0);
+  evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0.0);
+  elm_win_resize_object_add(popup, box);
+  evas_object_show(box);
+
+  Evas_Object *search_text_label = elm_label_add(popup);
+  elm_object_text_set(search_text_label, "Search Text: ");
+  elm_box_pack_end(box, search_text_label);
+  evas_object_show(search_text_label);
+
+  Evas_Object *search_text_entry = elm_entry_add(popup);
+  elm_entry_single_line_set(search_text_entry, EINA_TRUE);
+  elm_object_text_set(search_text_entry, "input search text");
+  elm_object_focus_set(search_text_entry, EINA_TRUE);
+  elm_box_pack_end(box, search_text_entry);
+  evas_object_show(search_text_entry);
+
+  Evas_Object *search_button = elm_button_add(popup);
+  elm_object_text_set(search_button, "Search");
+  elm_box_pack_end(box, search_button);
+  evas_object_show(search_button);
+
+
+  evas_object_smart_callback_add(popup, "delete,request", __search_closed_cb, 0);
+  evas_object_smart_callback_add(search_text_entry, "focused", __search_focused_cb, search_text_entry);
+  evas_object_smart_callback_add(search_text_entry, "unfocused", __search_unfocused_cb, search_text_entry);
+  evas_object_smart_callback_add(search_text_entry, "activated", __search_clicked_cb, search_text_entry);
+  evas_object_smart_callback_add(search_button, "clicked", __search_clicked_cb, search_text_entry);
+}
+
+void __search_closed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  evas_object_del(obj);
+}
+
+void __search_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Evas_Object* entry = data;
+  if (strcmp("", elm_entry_entry_get(entry)) == 0)
+    elm_entry_entry_set(entry, "input search text");
+}
+
+void __search_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Evas_Object* entry = data;
+  if (strcmp("input search text", elm_entry_entry_get(entry)) == 0)
+    elm_entry_entry_set(entry, "");
+}
+
+void __search_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Evas_Object* entry = data;
+  if (strcmp("input search text", elm_entry_entry_get(entry)) != 0)
+    ewk_view_text_find(view, elm_entry_entry_get(entry), EWK_FIND_OPTIONS_CASE_INSENSITIVE, 0);
+}
+
+void __auth_login_button_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Evas_Object* popup_window = data;
+  const char* username = elm_entry_entry_get(credentials[0]);
+  const char* password = elm_entry_entry_get(credentials[1]);
+  ewk_auth_challenge_credential_use(auth_challenge_holder, username, password);
+  evas_object_del(popup_window);
+}
+
+void __auth_close_button_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  ewk_auth_challenge_credential_cancel(auth_challenge_holder);
+  evas_object_del(obj);
+}
+
+void __notification_cancel_byuser_cb(void *data, Evas_Object *obj, void *event_info)
+{
+   Eina_List *list = NULL;
+   list =  eina_list_append(list, current_notification);
+   ewk_view_notification_closed(view, list);
+   evas_object_hide(popup);
+   evas_object_del(obj);
+   evas_object_del(popup);
+}
+
+void __notification_show_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  current_notification = (Ewk_Notification*)event_info;
+  if (current_notification) {
+    printf("APP.C callback _notification_show_cb Details: \n");
+    printf("APP.C callback Body = %s \n",ewk_notification_body_get(current_notification));
+    printf("APP.C callback Icon url = %s\n", ewk_notification_icon_url_get(current_notification));
+    printf("APP.C callback Title = %s\n",ewk_notification_title_get(current_notification));
+    const Ewk_Security_Origin *org = ewk_notification_security_origin_get((const Ewk_Notification*)current_notification);
+    printf("APP.C callback Origin Host = %s\n",ewk_security_origin_host_get(org));
+    printf("APP.C callback Origin Protocol = %s\n",ewk_security_origin_protocol_get(org));
+    printf("APP.C callback Origin Port = %d\n",ewk_security_origin_port_get(org));
+    // Adding pop up code
+    popup = elm_popup_add(view);
+    elm_popup_allow_events_set(popup, EINA_TRUE);
+    elm_object_text_set(popup,ewk_notification_body_get(current_notification));
+    elm_popup_content_text_wrap_type_set(popup, ELM_WRAP_CHAR);
+    elm_object_part_text_set(popup, "title,text", ewk_notification_title_get(current_notification));
+    evas_object_show(popup);
+
+    Evas_Object *btn1 = elm_button_add(popup);
+    elm_object_text_set(btn1, "CLOSE");
+    elm_object_part_content_set(popup, "button1", btn1);
+    evas_object_smart_callback_add(btn1, "clicked", __notification_cancel_byuser_cb, 0);
+  }
+  printf ("APP.C callback called __notification_show_cb \n");
+}
+
+void __notification_permission_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Notification_Permission_Request *request = (Ewk_Notification_Permission_Request*)event_info;
+  if(request) {
+    const Ewk_Security_Origin *sec_origin = ewk_notification_permission_request_origin_get((const Ewk_Notification_Permission_Request*)request);
+    if (sec_origin) {
+        printf("APP.C callback called __notification_permission_cb URL = %s, protocol = %s, port = %d\n",
+        ewk_security_origin_host_get(sec_origin), ewk_security_origin_protocol_get(sec_origin),ewk_security_origin_port_get(sec_origin));
+    }
+    ewk_notification_permission_request_set(request, 1);
+  }
+}
+
+void __notification_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  uint64_t *notification_id = (uint64_t*)event_info;
+  evas_object_del(popup);
+  printf("APP.C callback  __notification_cancel_cb with notification id = %d\n", (int)*notification_id);
+}
+
+void __policy_response_decide_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf("APP.C callback called __policy_response_decide_cb \n");
+  Ewk_Policy_Decision *policy_decision = (Ewk_Policy_Decision *)event_info;
+  Ewk_Policy_Decision_Type policy_type = ewk_policy_decision_type_get(policy_decision);
+  const char *uri = ewk_policy_decision_url_get(policy_decision);
+  const char *cookie = ewk_policy_decision_cookie_get(policy_decision);
+  const char *mime = ewk_policy_decision_response_mime_get(policy_decision);
+  printf("APP.C URL : %s\n", uri);
+  printf("APP.C cookie : %s\n", cookie);
+  printf("APP.C mime type : %s\n", mime);
+  printf("APP.C policy type : %d\n", policy_type);
+  ewk_policy_decision_use(policy_decision);
+}
+
+void __customize_context_menu_cb(void* data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Context_Menu *context_menu = (Ewk_Context_Menu*)event_info;
+  ewk_context_menu_item_append_as_action(context_menu, EWK_CONTEXT_MENU_ITEM_TAG_GO_BACK, "Back", 1);
+  ewk_context_menu_item_append_as_action(context_menu, EWK_CONTEXT_MENU_ITEM_TAG_GO_FORWARD, "Forward", 1);
+  ewk_context_menu_item_append_as_action(context_menu, EWK_CONTEXT_MENU_ITEM_TAG_RELOAD, "Reload", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_APPLICATION_BACK_FORWAD_CLEAR, "Bk_fwd_clear", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_APPLICATION_CACHE_RUN, "Run App Cache Test", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_APPLICATION_CACHE_DELETE_ALL, "Delete All App Cache", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_GRAB_SNAPSHOT, "Take Snapshot", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_WEB_DATABASE_GET_ORIGINS, "Get WebDB", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_WEB_DATABASE_DELETE_ALL, "Clear WebDB", 1);
+  printf("APP.C callback __customize_context_menu_cb \n");
+}
+
+static void get_app_cache_usage_cb(int64_t usage, void* user_data)
+{
+  static int count_usage_callback = 0;
+  Ewk_Security_Origin* origin = (Ewk_Security_Origin*)user_data;
+  printf("AppCache usage for %s is %ld\n", ewk_security_origin_host_get(origin), (long int)usage);
+  ewk_context_application_cache_delete(ewk_context_default_get(), origin);
+  if (eina_list_count(application_cache_origins) == ++count_usage_callback) {
+    ewk_context_origins_free(application_cache_origins);
+    count_usage_callback = 0;
+    application_cache_origins = NULL;
+  }
+}
+
+static void get_origins_for_cache_cb(Eina_List* origins, void* user_data)
+{
+  if (!origins)
+    return;
+  Eina_List* list_iterator = NULL;
+  void* data = NULL;
+  if (application_cache_origins) {
+    fprintf(stderr, "APP/ERROR: First cache usage-delete cycle is still running.\n");
+    return;
+  }
+
+  application_cache_origins = origins;
+  EINA_LIST_FOREACH(origins, list_iterator, data) {
+    Ewk_Security_Origin* origin = (Ewk_Security_Origin*)(data);
+    ewk_context_application_cache_usage_for_origin_get(ewk_context_default_get(), origin,
+                                                       get_app_cache_usage_cb, origin);
+  }
+}
+
+static void get_origins_for_webDB_cb(Eina_List* origins, void* user_data)
+{
+  if (!origins)
+    return;
+
+  if (web_database_origins)
+    return;
+
+  Eina_List* list_iterator = NULL;
+  void* data = NULL;
+  web_database_origins = origins;
+  static int flag = 0;
+  EINA_LIST_FOREACH(origins, list_iterator, data) {
+    Ewk_Security_Origin* origin = (Ewk_Security_Origin*)(data);
+    printf("Web Database origin : %s\n", ewk_security_origin_host_get(origin));
+    flag++;
+  }
+  if(eina_list_count(web_database_origins) == flag) {
+    flag = 0;
+    ewk_context_origins_free(web_database_origins);
+    web_database_origins = NULL;
+  }
+}
+
+void __customize_context_menu_item_selected_cb(void* data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Context_Menu_Item* item = (Ewk_Context_Menu_Item*)event_info;
+  switch (ewk_context_menu_item_tag_get(item)) {
+    case EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW:
+      printf("APP.C callback __customize_context_menu_item_selected_cb : Open In new Window Selected\n");
+
+      const int default_width = 300;
+      const int default_height =  400;
+
+      Ecore_Evas* ee = ecore_evas_new("software_x11", 0, 0, default_width, default_height, 0);
+      Evas* e = ecore_evas_get(ee);
+
+      Evas_Object* new_view = ewk_view_add(e);
+      ewk_view_url_set(new_view, ewk_context_menu_item_link_url_get(item));
+      evas_object_resize(new_view, default_width, default_height);
+      evas_object_show(new_view);
+      evas_object_focus_set(new_view, EINA_TRUE);
+      ecore_evas_show(ee);
+      evas_object_smart_callback_add(new_view, "close,window", __window_closed_cb, 0);
+      ecore_evas_callback_delete_request_set(ee, delete_popup_window);
+      break;
+    case FOR_TEST_APPLICATION_CACHE_RUN:
+      if (ewk_context_application_cache_origins_get(ewk_context_default_get(),
+                                                    get_origins_for_cache_cb, NULL)) {
+        printf("Getting origins for Application Cache\n");
+      }
+      break;
+    case FOR_TEST_APPLICATION_CACHE_DELETE_ALL:
+      if (ewk_context_application_cache_delete_all(ewk_context_default_get()))
+        printf("All app cache deleted\n");
+      break;
+    case FOR_TEST_APPLICATION_BACK_FORWAD_CLEAR:
+      printf("APP.C callback Bk_fwd_clear callback item selected cb\n");
+      ewk_view_back_forward_list_clear(view);
+      break;
+    case FOR_TEST_GRAB_SNAPSHOT:
+      printf("APP.C GRAB_SNAPSHOT selected\n");
+      Eina_Rectangle snapshot_rect;
+      snapshot_rect.x = snapshot_rect.y = 0;
+      evas_object_geometry_get(view, NULL, NULL, &snapshot_rect.w, &snapshot_rect.h);
+      Evas_Object* snapshot = ewk_view_screenshot_contents_get(view, snapshot_rect, 1.0, evas_object_evas_get(view));
+      if(!snapshot) {
+        fprintf(stderr, "Failed to get snapshot\n");
+        break;
+      }
+      static char snapshot_filename[256];
+      static int snapshot_count = 1;
+      sprintf(snapshot_filename, "snapshot_img%04d.%s", snapshot_count++, "png");
+      if (evas_object_image_save(snapshot, snapshot_filename, 0, 0))
+        printf("Snapshot image saved in %s\n", snapshot_filename);
+      else
+        printf("Snapshot image could not be saved\n");
+      break;
+    case FOR_TEST_WEB_DATABASE_GET_ORIGINS:
+      if (ewk_context_web_database_origins_get(ewk_context_default_get(),
+                                               get_origins_for_webDB_cb, NULL)) {
+        printf("Getting Origins for Web Database\n");
+      }
+      break;
+    case FOR_TEST_WEB_DATABASE_DELETE_ALL:
+      if (ewk_context_web_database_delete_all(ewk_context_default_get()))
+        printf("All Web Databases deleted\n");
+      break;
+    default:
+      break;
+  }
+}
+
+void __text_found_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf("text found : %u\n", *((unsigned int*)(event_info)));
+}
+
+void __newwindow_policy_cb(void *data, Evas_Object *obj, void* policy)
+{
+  printf ("APP.C __newwindow_policy_cb called \n");
+  Ewk_Policy_Decision *policy_decision = (Ewk_Policy_Decision *)policy;
+  const char* url = ewk_policy_decision_url_get(policy_decision);
+  printf("APP.C url for new window: %s \n", url);
+  ewk_policy_decision_use(policy_decision);
+}
+
+void __load_nonemptylayout_finished_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf ("APP.C callback called __load_nonemptylayout_finished_cb \n");
+}
+
+void __popup_wait_start_cb(void *data, Evas_Object *obj, void* policy)
+{
+  printf("Popup wait start\n");
+}
+
+void __popup_wait_finish_cb(void *data, Evas_Object *obj, void* policy)
+{
+  printf("Popup wait finish\n");
+}
+
+void __download_callback(const char* download_url, void* user_data)
+{
+  printf("new download start callback is triggered:%s",download_url);
+}
+
+void __frame_rendered_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf ("APP.C callback called __frame_rendered_cb \n");
+
+  if (pdf_filename) {
+    int width, height;
+    evas_object_geometry_get(obj, NULL, NULL, &width, &height);
+    if (ewk_view_contents_pdf_get(obj, width, height, pdf_filename))
+      printf("\"Save as PDF\" request sent\n");
+    else
+      printf("Failed to send \"Save as PDF\" request\n");
+  }
+}
+
+void __ewk_view_plain_text_get_cb(Evas_Object* o, const char* content_text, void* user_data)
+{
+  if (content_text)
+    printf("__ewk_view_plain_text_get_cb callback success --\n%s\n---user_data--%d\n",content_text,*(int*)(user_data));
+}
+
+void __ewk_view_plain_text_get_cb_1(Evas_Object* o, const char* content_text, void* user_data)
+{
+  if (content_text)
+    printf("__ewk_view_plain_text_get_cb_1 callback success --\n%s\n---user_data--%d\n",content_text,*(int*)(user_data));
+}
+
+void __load_started_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf("APP.c __load_started_cb called \n");
+}
+
+void __edge_left_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Edge_Left Notification\n");
+}
+
+void __edge_right_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Edge_Right Notification\n");
+}
+
+void __edge_top_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Edge_Top Notification\n");
+}
+
+void __edge_bottom_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Edge_Bottom Notification\n");
+}
+
+#if defined(OS_TIZEN_MOBILE)
+Eina_Bool __vibration_timeout_cb(void *data)
+{
+  g_haptic_timer_id = NULL;
+  if (g_haptic_handle) {
+    haptic_stop_effect(g_haptic_handle, g_haptic_effect);
+    haptic_close(g_haptic_handle);
+    g_haptic_handle = NULL;
+  }
+
+  return ECORE_CALLBACK_CANCEL;
+}
+#endif
+
+void __vibration_on_cb(uint64_t vibration_time, void *data)
+{
+  printf("__vibration_on_cb called");
+  #if defined(OS_TIZEN_MOBILE)
+    uint64_t duration = vibration_time;
+
+    if (g_haptic_timer_id) {
+      ecore_timer_del(g_haptic_timer_id);
+      g_haptic_timer_id = NULL;
+    }
+
+    if (g_haptic_handle) {
+      haptic_stop_effect(g_haptic_handle, g_haptic_effect);
+      haptic_close(g_haptic_handle);
+      g_haptic_handle = NULL;
+    }
+
+    if (haptic_open(HAPTIC_DEVICE_0, &g_haptic_handle) != HAPTIC_ERROR_NONE) {
+      printf("__vibration_on_cb:haptic_open failed");
+      return;
+    }
+
+    haptic_vibrate_monotone(g_haptic_handle, duration, &g_haptic_effect);
+    double in = (double)((double)(duration) / (double)(1000));
+    printf("__vibration_on_cb:duration=%f", in);
+
+    g_haptic_timer_id = ecore_timer_add(in, __vibration_timeout_cb, NULL);
+  #endif
+}
+
+void __vibration_off_cb(void *data)
+{
+  printf("__vibration_off_cb called");
+  #if defined(OS_TIZEN_MOBILE)
+    if (g_haptic_timer_id) {
+      ecore_timer_del(g_haptic_timer_id);
+      g_haptic_timer_id = NULL;
+    }
+
+    if (g_haptic_handle) {
+      haptic_stop_effect(g_haptic_handle, g_haptic_effect);
+      haptic_close(g_haptic_handle);
+      g_haptic_handle = NULL;
+    }
+  #endif
+}
+
+void __text_style_state_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Evas_Point start_point, end_point;
+  int r, g, b, a;
+  Ewk_Text_Style *style = (Ewk_Text_Style*)event_info;
+  printf ("APP.C __text_style_state_changed_cb called \n");
+  printf ("APP.c ewk_text_style_underline_get = %d \n",ewk_text_style_underline_get(style));
+  printf ("APP.c ewk_text_style_italic_get = %d \n",ewk_text_style_italic_get(style));
+  printf ("APP.c ewk_text_style_bold_get = %d \n",ewk_text_style_bold_get(style));
+  printf ("APP.c ewk_text_style_ordered_list_get = %d \n",ewk_text_style_ordered_list_get(style));
+  printf ("APP.c ewk_text_style_unordered_list_get = %d \n",ewk_text_style_unordered_list_get(style));
+
+  ewk_text_style_position_get(style, &start_point, &end_point);
+  printf ("APP.c ewk_text_style_position_get start x = %d, y = %d, end x = %d, y = %d\n",
+      start_point.x, start_point.y, end_point.x, end_point.y);
+
+  ewk_text_style_bg_color_get(style, &r, &g, &b, &a);
+  printf ("APP.c ewk_text_style_bg_color_get r = %d, g =%d, b = %d, a = %d\n", r, g ,b ,a);
+  printf ("APP.c ewk_text_style_has_composition_get = %d \n",ewk_text_style_has_composition_get(style));
+  printf ("APP.c ewk_text_style_align_center_get = %d \n",ewk_text_style_align_center_get(style));
+  printf ("APP.c ewk_text_style_align_left_get = %d \n",ewk_text_style_align_left_get(style));
+  printf ("APP.c ewk_text_style_align_right_get = %d \n",ewk_text_style_align_right_get(style));
+  printf ("APP.c ewk_text_style_align_full_get = %d \n",ewk_text_style_align_full_get(style));
+}
+
+void __scroll_down_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Scroll Down Notification\n");
+}
+
+void __scroll_up_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Scroll Up Notification\n");
+}
+
+void __scroll_left_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Scroll Left Notification\n");
+}
+
+void __scroll_right_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("Scroll Right Notification\n");
+}
+
+void on_mouse_up(void* data, Evas* canvas, Evas_Object* obj, void* event_info)
+{
+  Evas_Event_Mouse_Up* event = (Evas_Event_Mouse_Up*)event_info;
+  if (!evas_key_modifier_is_set(event->modifiers, "Shift"))
+      return;
+
+  Ewk_Hit_Test* ht = ewk_view_hit_test_new(obj, event->canvas.x, event->canvas.y, EWK_HIT_TEST_MODE_ALL);
+  printf("HitTest: context %d\n", ewk_hit_test_result_context_get(ht));
+  printf("HitTest: link uri %s\n", ewk_hit_test_link_uri_get(ht));
+  printf("HitTest: link title %s\n", ewk_hit_test_link_title_get(ht));
+  printf("HitTest: link label %s\n",ewk_hit_test_link_label_get(ht));
+  printf("HitTest: image uri %s\n", ewk_hit_test_image_uri_get(ht));
+  printf("HitTest: media uri %s\n", ewk_hit_test_media_uri_get(ht));
+  printf("HitTest: tag name %s\n", ewk_hit_test_tag_name_get(ht));
+  printf("HitTest: node value %s\n", ewk_hit_test_node_value_get(ht));
+  printf("HitTest: image length %d\n", ewk_hit_test_image_buffer_length_get(ht));
+  printf("HitTest: height of image %d\n", FOR_TESTING_ewk_hit_test_image_height_get(ht));
+  printf("HitTest: height of image %d\n", FOR_TESTING_ewk_hit_test_image_width_get(ht));
+  printf("HitTest: filename extension %s\n", ewk_hit_test_image_file_name_extension_get(ht));
+  if (ewk_hit_test_image_buffer_length_get(ht)) {
+    // To verify the buffer, we write to file.
+    // App might use its own engine to encode, we use evas API.
+    Evas_Object* image = evas_object_image_add(e);
+    evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888);
+    evas_object_image_alpha_set(image, EINA_TRUE);
+    evas_object_image_size_set(image,
+        FOR_TESTING_ewk_hit_test_image_width_get(ht),
+        FOR_TESTING_ewk_hit_test_image_height_get(ht));
+    evas_object_image_data_copy_set(image, ewk_hit_test_image_buffer_get(ht));
+    static char filename_buffer[256];
+    static int count = 1;
+    sprintf(filename_buffer, "hit_test_img%04d.%s", count++, ewk_hit_test_image_file_name_extension_get(ht));
+    if (evas_object_image_save(image, filename_buffer, 0, 0))
+      printf("Hit test image saved in %s\n", filename_buffer);
+    else
+      printf("Hit test image could not be saved\n");
+  }
+
+  Eina_Hash *attr_hash = ewk_hit_test_attribute_hash_get(ht);
+  if (attr_hash) {
+    eina_hash_foreach(attr_hash, _util_print_hit_test_result_hash_fn, NULL);
+  }
+}
+
+void __undo_size_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf ("APP.C callback called __undo_size_cb\n");
+}
+
+void __redo_size_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf ("APP.C callback called __redo_size_cb \n");
+}
+
+void __mhtml_save_cb(Evas_Object *obj, const char *mhtml_data, void *data)
+{
+  printf("APP.C __mhtml_save_cb callback called\n");
+  printf("APP.C Data is \n %s \n\n", mhtml_data);
+}
+
+void __clipboard_opened_cb(void* data, Evas_Object* view, void* event_info)
+{
+  printf("APP.C clipboard window opened\n");
+}
+
+void __back_forward_list_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  printf("APP.C Back Forward List Changed Notification\n");
+}
+
+Eina_Bool __ewk_view_javascript_alert_cb(Evas_Object* o, const char* alert_text, void* user_data)
+{
+  printf("APP.C javascript alert opened\n");
+
+  return EINA_TRUE;
+}
+
+Eina_Bool __ewk_view_javascript_confirm_cb(Evas_Object* o, const char* message, void* user_data)
+{
+  printf("APP.C javascript confirm popup opened\n");
+
+  return EINA_TRUE;
+}
+
+Eina_Bool __ewk_view_javascript_prompt_cb(Evas_Object* o, const char* message, const char* default_value, void* user_data)
+{
+  printf("APP.C javascript prompt popup opened\n");
+
+  return EINA_TRUE;
+}
+
+void __webprocess_crashed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+  printf("APP.C callback __webprocess_crashed_cb \n");
+  Eina_Bool* handled = (Eina_Bool*)event_info;
+  *handled = EINA_TRUE;
+  // EWebView (Evas_Object) on which this callback is triggered should be deleted immediately.
+  // It is not safe to call any method on it.
+  evas_object_del(obj);
+  exit(EXIT_FAILURE);
+}
+
+Eina_Bool __mime_override_cb(const char* url, const char *mime, char **new_mime)
+{
+  printf("APP.C callback %s\n", __func__);
+  /* Example:
+  if (strcmp(url, "file://mytest.abc") == 0 ||
+      strcmp(mime, "application/x-php") == 0) {
+    *new_mime = strdup("text/html");
+    return EINA_TRUE;
+  }
+  */
+  return EINA_FALSE;
+}
+
+void __console_message_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Console_Message* console_message = (Ewk_Console_Message*)event_info;
+  printf("APP.C callback called __console_message_cb\n");
+  printf("console message:%s:", ewk_console_message_source_get(console_message));
+  printf("%d:", ewk_console_message_line_get(console_message));
+  printf("%d:", ewk_console_message_level_get(console_message));
+  printf("%s\n", ewk_console_message_text_get(console_message));
+}
diff --git a/tizen_src/ewk/efl_webview_app/browser-object.h b/tizen_src/ewk/efl_webview_app/browser-object.h
new file mode 100644 (file)
index 0000000..8ff5a47
--- /dev/null
@@ -0,0 +1,50 @@
+
+/*
+ *  browser
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Youngbok Yoon<youngbok.yoon@samsung.com>
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef BROWSER_OBJECT_H
+#define BROWSER_OBJECT_H
+
+#include <Eina.h>
+#include <Elementary.h>
+#include <Evas.h>
+
+#define ftp_scheme     "ftp://"
+#define http_scheme    "http://"
+#define https_scheme   "https://"
+#define file_scheme    "file://"
+#define rtsp_scheme    "rtsp://"
+#define tizenstore_scheme      "tizenstore://"
+#define mailto_scheme  "mailto:"
+#define tel_scheme     "tel:"
+#define telto_scheme   "telto:"
+#define callto_scheme  "callto:"
+#define vtel_scheme    "vtel:"
+#define wtai_wp_mc_scheme      "wtai://wp/mc;"
+#define wtai_wp_sd_scheme      "wtai://wp/sd;"
+#define wtai_wp_ap_scheme      "wtai://wp/ap;"
+#define wtai_scheme    "wtai://"
+#define sms_scheme     "sms:"
+#define smsto_scheme   "smsto:"
+#define data_scheme    "data:"
+
+#endif /* BROWSER_OBJECT_H */
+
diff --git a/tizen_src/ewk/efl_webview_app/browser-string.h b/tizen_src/ewk/efl_webview_app/browser-string.h
new file mode 100644 (file)
index 0000000..1053bdd
--- /dev/null
@@ -0,0 +1,775 @@
+/*
+ *  browser
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Hyerim Bae <hyerim.bae@samsung.com>
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef BROWSER_STRING_H
+#define BROWSER_STRING_H
+
+#include <app.h>
+
+/* browser string define for translation */
+
+/* System string */
+/*************************************************************************************************************/
+#define BR_STRING_OK            dgettext("sys_string", "IDS_COM_SK_OK")
+#define BR_STRING_EDIT          dgettext("sys_string", "IDS_COM_SK_EDIT")
+#define BR_STRING_YES           dgettext("sys_string", "IDS_COM_SK_YES")
+#define BR_STRING_NO            dgettext("sys_string", "IDS_COM_SK_NO")
+#define BR_STRING_BACK          dgettext("sys_string", "IDS_COM_BODY_BACK")
+#define BR_STRING_CANCEL        dgettext("sys_string", "IDS_COM_SK_CANCEL")
+#define BR_STRING_SAVE          dgettext("sys_string", "IDS_COM_SK_SAVE")
+#define BR_STRING_DONE          dgettext("sys_string", "IDS_COM_SK_DONE")
+#define BR_STRING_DELETE        dgettext("sys_string", "IDS_COM_SK_DELETE")
+#define BR_STRING_DELETE_Q      dgettext("sys_string", "IDS_COM_POP_DELETE_Q")
+#define BR_STRING_CLOSE         dgettext("sys_string", "IDS_COM_POP_CLOSE")
+#define BR_STRING_ON            dgettext("sys_string", "IDS_COM_BODY_ON")
+#define BR_STRING_OFF           dgettext("sys_string", "IDS_COM_BODY_OFF")
+#define BR_STRING_WARNING       dgettext("sys_string", "IDS_COM_POP_WARNING")
+#define BR_STRING_ERROR         dgettext("sys_string", "IDS_COM_POP_ERROR")
+#define BR_STRING_PROCESSING    dgettext("sys_string", "IDS_COM_POP_PROCESSING")
+#define BR_STRING_MESSAGES      dgettext("sys_string", "IDS_COM_BODY_MESSAGES")
+#define BR_STRING_EMAIL         dgettext("sys_string", "IDS_COM_BODY_EMAIL")
+#define BR_STRING_BLUETOOTH     dgettext("sys_string", "IDS_COM_BODY_BLUETOOTH")
+#define BR_STRING_SMEMO         dgettext("sys_string", "IDS_COM_OPT_S_MEMO")
+#define BR_STRING_BRIGHTNESS    dgettext("sys_string", "IDS_COM_OPT_BRIGHTNESS")
+#define BR_STRING_AUTOMATIC     dgettext("sys_string", "IDS_COM_BODY_AUTOMATIC")
+#define BR_STRING_INTERNET      dgettext("sys_string", "IDS_COM_BODY_INTERNET")
+#define BR_STRING_CALL          dgettext("sys_string", "IDS_COM_BODY_CALL")
+#define BR_STRING_NFC           dgettext("sys_string", "IDS_COM_BODY_NFC")
+#define BR_STRING_DEFAULT       dgettext("sys_string", "IDS_COM_BODY_DEFAULT")
+#define BR_STRING_LOW           dgettext("sys_string", "IDS_COM_BODY_LOW")
+#define BR_STRING_WIFI          dgettext("sys_string", "IDS_COM_BODY_WI_FI")
+#define BR_STRING_LOCATION      dgettext("sys_string", "IDS_COM_BODY_LOCATION")
+#define BR_STRING_HOUR          dgettext("sys_string", "IDS_COM_BODY_1_HOUR")
+#define BR_STRING_HOURS         dgettext("sys_string", "IDS_COM_POP_PD_HOURS")
+#define BR_STRING_NO_NAME       dgettext("sys_string", "IDS_COM_BODY_NO_NAME")
+#define BR_STRING_LOGIN         dgettext("sys_string", "IDS_COM_BUTTON_LOGIN")
+#define BR_STRING_STREAMING_PLAYER dgettext("sys_string", "IDS_COM_BODY_STREAMING_PLAYER")
+#define BR_STRING_TITLE_SELECT_AN_ACTION dgettext("sys_string", "IDS_COM_HEADER_SELECT_APPLICATIONS")
+#define BR_STRING_DRAG_SCROLL  dgettext("sys_string","IDS_COM_BODY_DRAG_SCROLL_T_TTS")
+
+/*************************************************************************************************************/
+
+
+/* Browser common */
+/*************************************************************************************************************/
+#define BR_STRING_HISTORY               _("IDS_BR_TAB_HISTORY")
+#define BR_STRING_ALLOW                 _("IDS_BR_OPT_ALLOW")
+#define BR_STRING_ITEMS_SELECTED        _("IDS_BR_POP_PD_ITEMS_SELECTED")
+#define BR_STRING_ONE_ITEM_SELECTED     _("IDS_BR_POP_1_ITEM_SELECTED")
+#define BR_STRING_EMPTY                 _("IDS_BR_BODY_EMPTY")
+#define BR_STRING_URL_GUIDE_TEXT        _("IDS_BR_BODY_SEARCH_OR_ENTER_URL")
+#define BR_STRING_PRINT                 _("IDS_BR_BODY_PRINT")
+#define BR_STRING_DATA_NETWORK          _("IDS_BR_OPT_DATA_NETWORK")
+#define BR_STRING_CLOSE_WINDOW          _("IDS_BR_OPT_CLOSE_WINDOW")
+#define BR_STRING_NO_TITLE              _("IDS_BR_BODY_NO_TITLE")
+#define BR_STRING_LOADING_PLZ_WAIT      _("IDS_BR_POP_LOADING_PLEASE_WAIT_ING")
+#define BR_STRING_LOAD_ERROR_TITLE      _("IDS_BR_HEADER_DATA_CONNECTIVITY_PROBLEM")
+#define BR_STRING_LOAD_ERROR_MSG        _("IDS_BR_BODY_UNABLE_TO_DISPLAY_THE_WEBPAGE_NO_RESPONSE_FROM_THE_SERVER")
+#define BR_STRING_NO_SEARCH_RESULT      _("IDS_BR_BODY_NO_RESULTS_FOUND")
+#define BR_STRING_ADD                   _("IDS_BR_OPT_ADD")
+#define BR_STRING_MOVE                  _("IDS_BR_OPT_MOVE")
+#define BR_STRING_SHARE                 _("IDS_BR_OPT_SHARE")
+#define BR_STRING_CLOSE_ALL             _("IDS_BR_OPT_CLOSE_ALL")
+#define BR_STRING_NO_ITEMS              _("IDS_BR_BODY_NO_ITEMS")
+#define BR_STRING_NEW_WINDOW            _("IDS_BR_OPT_NEW_WINDOW")
+#define BR_STRING_CERTI_MESSAGE         _("IDS_BR_BODY_SECURITY_CERTIFICATE_PROBLEM_MSG")
+#define BR_STRING_SECURE_CONNECTION     _("IDS_BR_POP_SECURE_CONNECTION")
+#define BR_STRING_SECURITY_WARNING_MESSAGE _("IDS_BR_HEADER_SECURITY_WARNING")
+#define BR_STRING_POP_CLOSE_ALL_OPENED_WINDOWS_AND_GO_TO_THE_HOMEPAGE _("IDS_BR_POP_CLOSE_ALL_OPENED_WINDOWS_AND_GO_TO_THE_HOMEPAGE")
+#define BR_STRING_OPEN                  _("IDS_BR_OPT_OPEN")
+#define BR_STRING_REMOVE               _("IDS_BR_OPT_REMOVE")
+/*************************************************************************************************************/
+
+
+/* Brightness */
+/*************************************************************************************************************/
+#define BR_STRING_HIGH                  _("IDS_BR_BODY_HIGH_MPRIORITY")
+#define BR_STRING_MEDIUM                _("IDS_BR_BODY_MEDIUM")
+#define BR_STRING_SETTINGS              _("IDS_BR_BODY_SETTINGS")
+/*************************************************************************************************************/
+
+
+/* Bookmark */
+/*************************************************************************************************************/
+#define BR_STRING_CREATE_FOLDER         _("IDS_BR_SK3_CREATE_FOLDER")
+#define BR_STRING_CREATE_FOLDER_IN      _("IDS_BR_BODY_CREATE_FOLDER")
+#define BR_STRING_FOLDER                _("IDS_BR_HEADER_FOLDER")
+#define BR_STRING_ADD_TO_BOOKMARKS      _("IDS_BR_SK3_ADD_TO_BOOKMARKS")
+#define BR_STRING_NO_BOOKMARKS          _("IDS_BR_BODY_NO_BOOKMARKS")
+#define BR_STRING_TAG                   _("IDS_BR_BODY_ADDDETAILSVIEW_TAGS")
+#define BR_STRING_UNTAGGED              _("IDS_BR_BODY_UNTAGGED")
+#define BR_STRING_MOBILE                _("IDS_BR_BODY_MOBILE")
+#define BR_STRING_POPUP_VIEW_BY         _("IDS_BR_OPT_VIEW_BY_ABB")
+#define BR_STRING_ENTER_FOLDER_NAME     _("IDS_BR_BODY_ENTER_FOLDER_NAME")
+#define BR_STRING_ENTER_BOOKMARK_NAME   _("IDS_BR_POP_ENTER_BOOKMARK_NAME") //hard coding in po file about japanese.
+#define BR_STRING_ADDED_TO_BOOKMARKS    _("IDS_BR_POP_ADDED_TO_BOOKMARKS")
+#define BR_STRING_REMOVED_TO_BOOKMARKS  _("IDS_BR_POP_REMOVED_FROM_BOOKMARKS")
+#define BR_STRING_DOWNLOADING_ING       _("IDS_BR_POP_STARTING_DOWNLOAD_ING")
+#define BR_STRING_SELECT_FOLDER         _("IDS_BR_BODY_SELECT_FOLDER")
+#define BR_STRING_FOLDER_NAME           _("IDS_BR_BODY_FOLDER_NAME")
+#define BR_STRING_ADD_BOOKMARK          _("IDS_BR_OPT_ADD_BOOKMARK")
+#define BR_STRING_ADD_TAG               _("IDS_BR_HEADER_ADD_TAG")
+#define BR_STRING_EDIT_TAGS             _("IDS_BR_POP_RENAME_TAG")
+#define BR_STRING_ADD_NEW_FOLDER        _("IDS_BR_OPT_NEW_FOLDER")
+#define BR_STRING_LIST_VIEW             _("IDS_BR_OPT_LIST_VIEW")
+#define BR_STRING_THUMBNAIL_VIEW        _("IDS_BR_OPT_THUMBNAIL_VIEW")
+#define BR_STRING_NO_TAG                _("IDS_BR_BODY_ADDDETAILS_HNO_TAGS")
+#define BR_STRING_VIEW_BY_TAG           _("IDS_BR_OPT_SORT_BY_TAG")
+#define BR_STRING_DELETE_BOOKMARK       _("IDS_BR_OPT_DELETE_BOOKMARK")
+#define BR_STRING_RENAME_FOLDER         _("IDS_BR_OPT_RENAME_FOLDER")
+#define BR_STRING_RENAME                _("IDS_BR_OPT_RENAME")
+#define BR_STRING_ADD_TO_HOME_SCREEN    _("IDS_BR_OPT_ADD_TO_HOME_SCREEN_ABB")
+#define BR_STRING_MOVE_Q                _("IDS_BR_BODY_MOVE_THE_SELECTED_BOOKMARKS_Q")
+#define BR_STRING_GO_TO_HISTORY         _("IDS_BR_BUTTON2_GO_TO_HISTORY")
+#define BR_STRING_DELETE_FOLDER         _("IDS_BR_OPT_DELETE_FOLDER")
+#define BR_STRING_WARNING_OVER_TAG_LIMIT _("IDS_BR_BODY_MAXIMUM_NUMBER_OF_TAGS_HPD_REACHED")
+#define BR_STRING_POP_ERR_MOVE_TO_SOURCE_FOLDER  _("IDS_BR_POP_THE_DESTINATION_FOLDER_IS_THE_SAME_AS_THE_SOURCE_FOLDER")
+#define BR_STRING_POP_ERR_MOVE_TO_SUB_FOLDER    _("IDS_BR_POP_THE_DESTINATION_FOLDER_IS_A_SUBFOLDER_OF_THE_SOURCE_FOLDER")
+#define BR_STRING_TARGET_FOLDER         _("IDS_BR_BODY_TARGET_FOLDER")
+#define BR_STRING_TARGET_FOLDER_ABB         _("IDS_BR_BODY_TARGET_FOLDER_ABB")
+#define BR_STRING_ADD_THIS_WEBSITE_TO_BOOKMARKS_TO_OPEN_IT_FASTER              _("IDS_BR_BODY_ADD_THIS_WEBSITE_TO_BOOKMARKS_TO_OPEN_IT_FASTER_ABB")
+#define BR_STRING_EDIT_BOOKMARK         _("IDS_BR_HEADER_EDIT_BOOKMARK")
+#define BR_STRING_1_POPUP_BLOCKED    _("IDS_BR_TPOP_1_POP_UP_BLOCKED")
+#define BR_STRING_PD_POPUPS_BLOCKED    _("IDS_BR_BODY_PD_POP_UPS_BLOCKED_ABB")
+/*************************************************************************************************************/
+
+
+/* Hstory */
+/*************************************************************************************************************/
+#define BR_STRING_NO_HISTORY            _("IDS_BR_BODY_NO_HISTORIES")
+#define BR_STRING_HISTORY_TODAY         _("IDS_BR_BODY_TODAY")
+#define BR_STRING_HISTORY_YESTERDAY     _("IDS_BR_BODY_YESTERDAY")
+#define BR_STRING_HISTORY_LAST_7_DAYS   _("IDS_BR_BODY_LAST_7_DAYS")
+#define BR_STRING_HISTORY_LAST_MONTH    _("IDS_BR_BODY_LAST_MONTH")
+#define BR_STRING_HISTORY_OLDER         _("IDS_BR_BODY_OLDER")
+#define BR_STRING_CLEAR                 _("IDS_BR_SK_CLEAR")
+/*************************************************************************************************************/
+
+
+/* Html feature */
+/*************************************************************************************************************/
+#define BR_STRING_REQUEST_WEBPAGE_PREFIX _("IDS_BR_OPT_SAVEWEBPAGE")
+#define BR_STRING_EXCEEDED_QUOTA_POPUP_DESC _("IDS_BR_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_STORE_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE")
+#define BR_STRING_APPCACHE_PERMISSION_POPUP_DESC _("IDS_BR_POP_P1SS_HP2SS_IS_ATTEMPTING_TO_STORE_A_LARGE_AMOUNT_OF_DATA_ON_YOUR_DEVICE_FOR_OFFLINE_USE")
+#define BR_STRING_PROTOCOL_CONTENT_HANDLER_POPUP_DESC _("IDS_BR_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_CHANGE_HOW_YOUR_BROWSER_WORKS_ON_MSG")
+#define BR_STRING_GEOLOCATION_PERMISSION_POPUP_DESC _("IDS_BR_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_ACCESS_YOUR_LOCATION")
+#define BR_STRING_WEB_NOTI_PERMISSION_POPUP_DESC _("IDS_BR_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_SHOW_NOTIFICATIONS")
+#define BR_STRING_USER_MEDIA_PERMISSION_POPUP_DESC _("IDS_BR_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_USE_YOUR_CAMERA")
+/*************************************************************************************************************/
+
+
+/* Shortcut */
+/*************************************************************************************************************/
+#define BR_STRING_SHORTCUT_CREATED      _("IDS_BR_POP_SHORTCUT_CREATED")
+/*************************************************************************************************************/
+
+
+/* More menu */
+/*************************************************************************************************************/
+#define BR_STRING_FIND_ON_PAGE              _("IDS_BR_OPT_FIND_ON_PAGE")
+#define BR_STRING_BOOKMARKS                 _("IDS_BR_BODY_BOOKMARKS")
+#define BR_STRING_BOOKMARK                  _("IDS_BR_OPT_BOOKMARK")
+#define BR_STRING_ADD_BOOKMARKS             _("IDS_BR_OPT_ADDTOBOOKMARKS")
+#define BR_STRING_BOOKMARK_ADDED            _("IDS_BR_POP_BOOKMARK_ADDED")
+#define BR_STRING_BOOKMARK_REMOVED          _("IDS_BR_POP_BOOKMARK_REMOVED")
+#define BR_STRING_SAVE_FOR_OFFLINE_READING  _("IDS_BR_BODY_SAVE_FOR_OFFLINE_READING_ABB")
+#define BR_STRING_PRIVATE_ON                _("IDS_BR_BODY_ENABLE_PRIVATE_MODE")
+#define BR_STRING_PRIVATE_OFF               _("IDS_BR_BODY_DISABLE_PRIVATE_MODE")
+#define BR_STRING_SAVE_PAGE                 _("IDS_BR_OPT_SAVE_PAGE_ABB")
+#define BR_STRING_DESKTOP_VIEW              _("IDS_BR_BODY_DESKTOP_VIEW")
+#define BR_STRING_PRIVATE_BROWSER           _("IDS_BR_OPT_INCOGNITO_MODE_ABB")
+#define BR_STRING_PRIVATE_BROWSER_DESC      _("IDS_BR_BODY_INTERNET_HISTORY_IS_NOT_STORED_ABB")
+#define BR_STRING_SAVE_PAGE                 _("IDS_BR_OPT_SAVE_PAGE_ABB")
+#define BR_STRING_SAVED_PAGE                _("IDS_BR_OPT_SAVEDPAGES")
+#define BR_STRING_INSTALL_WEB_APP           _("IDS_BR_OPT_INSTALL_WEB_APP")
+#define BR_STRING_MINIMIZE                  _("IDS_BR_OPT_MINIMISE")
+#define BR_STRING_MOST_VISITED              _("IDS_BR_TAB_MOST_VISITED")
+#define BR_STRING_MOBILE_VIEW               _("IDS_BR_BODY_MOBILE_VIEW")
+#define BR_STRING_ADD_LIVEBOX               _("IDS_BR_OPT_ADD_LIVEBOX")
+#define BR_STRING_ADD_TO_HOME               _("IDS_BR_OPT_ADD_TO_HOME")
+
+#define BR_STRING_ADD_TO_WEB_CLIP           _("IDS_BR_OPT_ADD_TO_WEB_CLIP")
+#define BR_STRING_ADD_SHORTCUT              _("IDS_BR_OPT_ADD_SHORTCUT")
+#if defined(WEBCLIP)
+#if 0
+#define BR_STRING_WEB_CLIPPING              _("IDS_BR_BODY_WEB_CLIP")
+#endif
+#endif
+/*************************************************************************************************************/
+
+
+/* web clip */
+/*************************************************************************************************************/
+#define BR_STRING_NEVER                     _("IDS_BR_POP_NEVER")
+/*************************************************************************************************************/
+
+/* Quick Access */
+/*************************************************************************************************************/
+#define BR_STRING_NEVER _("IDS_BR_POP_NEVER")
+#define BR_STRING_NO_SITE _("No site")
+#define BR_STRING_ADD_TO_QUICK_ACCESS _("IDS_BR_OPT_ADD_TO_QUICK_ACCESS")
+#define BR_STRING_PD_ITEMS_ADDED _("%d items added")
+#define BR_STRING_1_ITEM_ADDED _("1 item added")
+#define BR_STRING_NOTHING_ADDED _("Nothing added")
+#define BR_STRING_QUICK_ACCESS _("IDS_BR_HEADER_QUICK_ACCESS_ABB")
+#define BR_STRING_TRY_AGAIN_LATER _("Page is on loading. Please try again after load finished")
+#define BR_STRING_ADD_BOOKMARK_TO_QUICK_ACCESS _("Add bookmark to quick access")
+#define BR_STRING_ADDING_WEBPAGE_TO_QUICK_ACCESS _("IDS_BR_HEADER_ADDING_WEBPAGES_TO_QUICK_ACCESS")
+#define BR_STRING_ADD_QUICK_ACCESS_ITEM _("Add quick access item")
+#define BR_STRING_EDIT_QUICK_ACCESS_ITEM _("Edit quick access item")
+#define BR_STRING_QUICK_ACCESS_SUCCESS_POPUP _("IDS_BR_TPOP_ADDED_TO_QUICK_ACCESS_LIST")
+#define BR_STRING_QUICK_ACCESS_FAIL_POPUP _("Failed to save quick access item")
+/*************************************************************************************************************/
+
+/* Settings */
+/*************************************************************************************************************/
+#define BR_STRING_CACHE                     _("IDS_BR_OPT_CACHE")
+#define BR_STRING_URL                       _("IDS_BR_BODY_URL")
+#define BR_STRING_SELECT_ALL                _("IDS_BR_OPT_SELECT_ALL")
+#define BR_STRING_GENERAL                   _("IDS_BR_BODY_GENARAL")
+#define BR_STRING_HOMEPAGE                  _("IDS_BR_BODY_HOMEPAGE")
+#define BR_STRING_HOMEPAGE_ABB              _("IDS_BR_BUTTON_HOMEPAGE_ABB")
+#define BR_STRING_BLANK_PAGE                _("IDS_BR_BODY_BLANK_PAGE")
+#define BR_STRING_CURRENT_PAGE              _("IDS_BR_BODY_CURRENT_PAGE")
+#define BR_STRING_DEFAULT_PAGE              _("IDS_BR_BODY_DEFAULT_PAGE_ABB")
+#define BR_STRING_USER_HOMEPAGE             _("IDS_BR_BODY_USER_HOMEPAGE")
+#define BR_STRING_SET_HOME_URL              _("IDS_BR_ACHEADER2_SET_HOME_URL")
+#define BR_STRING_SUPPORING_POPUP           _("IDS_BR_BODY_ADDITIONAL_WEBPAGE_INFO_ABB")
+#define BR_STRING_AUTO_RESIZE_TEXT          _("IDS_BR_BODY_AUTO_RESIZE_TEXT_ABB")
+#define BR_STRING_AUTO_RESIZE_TEXT_DESC     _("IDS_BR_SBODY_VIEW_PC_WEBSITES_EASILY_ON_YOUR_MOBILE_DEVICE_THIS_FEATURE_BOOSTS_THE_TEXT_SIZE_TO_MAKE_IT_EASIER_TO_READ_NOTE_C_THE_TEXT_LAYOUT_MAY_CHANGE")
+#define BR_STRING_AUTO_FILL_FORMS           _("IDS_BR_MBODY_AUTO_FILL_FORMS")
+#define BR_STRING_AUTO_FILL_FORMS_DESC      _("IDS_BR_BODY_SET_TEXT_FOR_WEB_FORM_AUTO_FILL")
+#define BR_STRING_OPEN_PAGES_IN_OVERVIEW    _("IDS_BR_BODY_OPEN_PAGES_IN_OVERVIEW_ABB")
+#define BR_STRING_OPEN_PAGES_IN_OVERVIEW_DESC _("IDS_BR_BODY_SHOW_OVERVIEW_OF_NEWLY_OPENED_PAGES")
+#define BR_STRING_CONTENTS                  _("IDS_BR_HEADER_CONTENTS")
+#define BR_STRING_DEFAULT_VIEW_LEVEL        _("IDS_BR_BODY_DEFAULT_VIEW")
+#define BR_STRING_FIT_TO_WIDTH              _("IDS_BR_BODY_FIT_TO_WIDTH")
+#define BR_STRING_READABLE                  _("IDS_BR_BODY_READABLE")
+#define BR_STRING_RUN_JAVASCRIPT            _("IDS_BR_BODY_RUN_JAVASCRIPT")
+#define BR_STRING_RUN_JAVASCRIPT_DESC       _("IDS_BR_BODY_ALLOW_SITES_TO_RUN_JAVASCRIPT")
+#define BR_STRING_SHOW_IMAGES               _("IDS_BR_BODY_SHOW_IMAGES")
+#define BR_STRING_SHOW_IMAGES_DESC          _("IDS_BR_BODY_DISPLAY_IMAGES_ON_WEB_PAGES")
+#define BR_STRING_ALWAYS_ON                 _("IDS_BR_BODY_ALWAYS_ON")
+#define BR_STRING_BLOCK_POPUP_DESC          _("IDS_BR_BODY_BLOCK_POP_UPS_ON_WEB_PAGES")
+#define BR_STRING_PRIVACY_AND_SECURTY       _("IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB")
+#define BR_STRING_ALWAYS_ASK                _("IDS_BR_BODY_ALWAYS_ASK")
+#define BR_STRING_DELETE_BROWSING_DATA      _("IDS_BR_BODY_DELETE_BROWSING_DATA")
+#define BR_STRING_FONT_SIZE                 _("IDS_BR_BODY_FONT_SIZE")
+#define BR_STRING_FONT_SIZE_NORMAL          _("IDS_BR_BODY_NORMAL")
+#define BR_STRING_FONT_SIZE_SMALL           _("IDS_BR_BODY_SMALL")
+#define BR_STRING_FONT_SIZE_HUGE            _("IDS_BR_OPT_HUGE")
+#define BR_STRING_FONT_SIZE_LARGE           _("IDS_BR_BODY_LARGE")
+#define BR_STRING_FONT_SIZE_GIANT           _("IDS_BR_OPT_GIANT_M_TEXTSIZE")
+#define BR_STRING_CLEAR_CACHE               _("IDS_BR_BODY_CLEAR_CACHE")
+#define BR_STRING_CLEAR_ALL_CACHE_DATA_Q    _("IDS_BR_POP_DELETE_LOCALLY_CACHED_CONTENT_AND_DATABASES_Q")
+#define BR_STRING_CLEAR_HISTORY             _("IDS_BR_BODY_CLEAR_HISTORY")
+#define BR_STRING_CLEAR_HISTORY_Q           _("IDS_BR_POP_CLEAR_HISTORY_Q")
+#define BR_STRING_CLEAR_ALL_HISTORY_DATA_Q  _("IDS_BR_BODY_DELETE_BROWSER_HISTORY_Q")
+#define BR_STRING_SHOW_SECURITY_WARNINGS    _("IDS_BR_BODY_SHOW_SECURITY_WARNINGS")
+#define BR_STRING_COOKIES                   _("IDS_BR_BODY_COOKIES")
+#define BR_STRING_ACCEPT_COOKIES            _("IDS_BR_BODY_ACCEPT_COOKIES")
+#define BR_STRING_ACCEPT_COOKIES_DESC       _("IDS_BR_BODY_ALLOWS_SITES_TO_SAVE_AND_READ_COOKIE_DATA")
+#define BR_STRING_CLEAR_ALL_COOKIE_DATA     _("IDS_BR_BODY_CLEAR_ALL_COOKIE_DATA")
+#define BR_STRING_CLEAR_ALL_COOKIE_DATA_Q   _("IDS_BR_POP_EMPTY_COOKIE_POPUP_BNO")
+#define BR_STRING_PASSWORD                  _("IDS_BR_BODY_PASSWORD")
+#define BR_STRING_ENABLE_LOCATION           _("IDS_BR_BODY_ENABLE_LOCATION")
+#define BR_STRING_ENABLE_LOCATION_DESC      _("IDS_BR_BODY_ALLOW_SITES_TO_REQUEST_ACCESS_TO_YOUR_LOCATION")
+#define BR_STRING_CLEAR_LOCATION_ACCESS     _("IDS_BR_BODY_CLEAR_LOCATION_ACCESS")
+#define BR_STRING_CLEAR_ALL_LOCATION_DATA_Q _("IDS_BR_POP_DELETE_WEBSITE_LOCATION_ACCESS_INFORMATION_Q")
+#define BR_STRING_FORMDATA                  _("IDS_BR_HEADER_FORM_DATA")
+#define BR_STRING_CLEAR_STORED_DATA         _("IDS_BR_BODY_CLEAR_STORED_DATA")
+#define BR_STRING_REMEMBER_FORMDATA         _("IDS_BR_BODY_REMEMBER_FORM_DATA")
+#define BR_STRING_REMEMBER_FORMDATA_DESC    _("IDS_BR_BODY_REMEMBER_DATA_I_TYPE_IN_FORMS_FOR_LATER_USE")
+#define BR_STRING_CLEAR_FORMDATA            _("IDS_BR_BODY_CLEAR_FORM_DATA")
+#define BR_STRING_CLEAR_ALL_FORMDATA_Q      _("IDS_BR_POP_DELETE_ALL_SAVED_FORM_DATA_Q")
+#define BR_STRING_REMEMBER_PASSWORDS        _("IDS_BR_BODY_REMEMBER_PASSWORDS")
+#define BR_STRING_REMEMBER_PASSWORDS_DESC   _("IDS_BR_BODY_SAVE_USER_NAMES_AND_PASSWORDS_FOR_WEBSITES")
+#define BR_STRING_CLEAR_PASSWORDS           _("IDS_BR_BODY_CLEAR_PASSWORDS")
+#define BR_STRING_SEARCH                    _("IDS_BR_BODY_SEARCH")
+#define BR_STRING_DRAG_AND_DROP             _("IDS_BR_OPT_DRAG_AND_DROP")
+#define BR_STRING_WEBSITE_SETTINGS          _("IDS_BR_BODY_WEBSITE_SETTINGS")
+#define BR_STRING_WEBSITE_SETTINGS_DESC     _("IDS_BR_BODY_ADVANCED_SETTINGS_FOR_INDIVIDUAL_WEBSITES")
+#define BR_STRING_RESET_TO_DEFAULT          _("IDS_BR_BODY_RESET_TO_DEFAULT")
+#define BR_STRING_RESTORE_DEFAULT_SETTING_Q _("IDS_BR_BODY_RESTORE_DEFAULT_SETTINGS_Q")
+#define BR_STRING_RESET_TO_DEFAULT_Q        _("IDS_BR_POP_ALL_SETTINGS_TO_DEFAULT_CONTINUE_Q")
+#define BR_STRING_ABOUT_BROWSER             _("IDS_BR_BODY_ABOUT_BROWSER")
+#define BR_STRING_SAVED_ID_PASSWORD         _("IDS_BR_BODY_AUTO_SAVE_ID_PASSWORD")
+#define BR_STRING_SEARCH_ENGINE             _("IDS_BR_BODY_SEARCH_ENGINE")
+#define BR_STRING_USER_AGENT                _("IDS_BR_HEADER_USER_AGENT")
+#define BR_STRING_CUSTOM_USER_AGENT         _("IDS_BR_BODY_CUSTOM_USER_AGENT")
+#define BR_STRING_DELETE_ALL                _("IDS_BR_BODY_DELETE_ALL")
+#define BR_STRING_SAVED_ID_AND_PASSWORDS    _("IDS_BR_BODY_SAVED_ID_PASSWORD")
+#define BR_STRING_MOST_VISITED_SITES        _("IDS_BR_BODY_MOST_VISITED_SITES")
+#define BR_STRING_MSG_MDM_POLICY            _("IDS_BR_POP_SECURITY_POLICY_RESTRICTS_USE_OF_INTERNET_BROWSER")
+#define BR_STRING_CLEAR_DATA                _("IDS_ST_BODY_CLEAR_DATA")
+#define BR_STRING_CLEAR_PERSONALISED_DATA   _("IDS_BR_HEADER_CLEAR_PERSONALISED_DATA")
+#define BR_STRING_HTML5_EXTENSION           _("IDS_BR_HEADER_HTML5_EXTENSION")
+#define BR_STRING_CLEAR_ALL_SAVED_PASSWORDS_Q           _("IDS_BR_POP_DELETE_ALL_SAVED_PASSWORDS_Q")
+#define BR_STRING_ENCODING_TYPE                         _("IDS_BR_OPT_TEXT_ENCODING")
+#define BR_STRING_ENCODING_TYPE_LATIN_1_ISO_8859_1      _("IDS_BR_OPT_LATIN_1_HISO_8859_1")
+#define BR_STRING_ENCODING_TYPE_UNICODE_UTF_8           _("IDS_BR_OPT_UNICODE_HUTF_8")
+#define BR_STRING_ENCODING_TYPE_CHINESE_BIG5            _("IDS_BR_OPT_CHINESE_HBIG5")
+#define BR_STRING_ENCODING_TYPE_CHINESE_GBK             _("IDS_BR_OPT_CHINESE_HGBK")
+#define BR_STRING_ENCODING_TYPE_JAPANESE_SHIFT_JIS      _("IDS_BR_OPT_JAPANESE_HSHIFT_JIS")
+#define BR_STRING_ENCODING_TYPE_JAPANESE_EUC_JP         _("IDS_BR_OPT_JAPANESE_HEUC_JP")
+#define BR_STRING_ENCODING_TYPE_JAPANESE_ISO_2022_JP    _("IDS_BR_OPT_JAPANESE_HISO_2022_JP")
+#define BR_STRING_ENCODING_TYPE_KOREAN_EUC_KR           _("IDS_BR_OPT_KOREAN_HEUC_KR")
+#define BR_STRING_ENCODING_TYPE_AUTOMATIC               _("IDS_BR_BODY_AUTOMATIC")
+#define BR_STRING_DELETE_ALL_WEBSITE_DATA_AND_LOCATION_PERMISSIONS _("IDS_BR_POP_DELETE_ALL_WEBSITE_DATA_AND_LOCATION_PERMISSIONS_Q")
+#define BR_STRING_LOCATION_INFO                _("IDS_BR_BODY_LOCATION_M_INFORMATION")
+#define BR_STRING_ENTER_ZIPCODE        _("IDS_BR_BODY_ENTER_POSTCODE")
+#define BR_STRING_ALWAYS_SHOW _("IDS_BR_BUTTON_ALWAYS_SHOW_ABB")
+/*************************************************************************************************************/
+
+
+/* Popup, inform and warnings */
+/*************************************************************************************************************/
+#define BR_STRING_DELETED                       _("IDS_BR_POP_DELETED")
+#define BR_STRING_ENTER_URL                     _("IDS_BR_POP_ENTER_URL")
+#define BR_STRING_ALREADY_EXISTS                _("IDS_BR_POP_ALREADY_EXISTS")
+#define BR_STRING_FAILED                        _("IDS_BR_POP_FAIL")
+#define BR_STRING_SAVED                         _("IDS_BR_POP_SAVED")
+#define BR_STRING_MOVED                         _("IDS_BR_POP_MOVED")
+#define BR_STRING_ENTER_TITLE                   _("IDS_BR_POP_ENTER_TITLE_ABB")
+#define BR_STRING_NETWORK_ERROR                 _("IDS_BR_POP_NETWORK_ERROR")
+#define BR_STRING_NOT_FOUND_URL                 _("IDS_BR_POP_URL_NOT_FOUND")
+#define BR_STRING_REFUSE                        _("IDS_BR_POP_REFUSE")
+#define BR_STRING_AUTH_REQUIRED                 _("IDS_BR_BODY_DESTINATIONS_AUTHENTICATION_REQUIRED")
+#define BR_STRING_USER_NAME                     _("IDS_BR_BODY_AUTHUSERNAME")
+//#define BR_STRING_PASSWORD                    _("IDS_BR_BODY_AUTHPASSWORD")
+#define BR_STRING_NEVER_SHOW_AGAIN              _("IDS_BR_POP_DO_NOT_SHOW_AGAIN")
+#define BR_STRING_ENABLE_NETWORK_Q              _("IDS_BR_POP_MOBILE_DATA_DISABLED_CONNECT_USING_WI_FI_NETWORK_OR_ENABLE_MOBILE_DATA")//
+#define BR_STRING_WARNING_OVER_BOOKMARK_LIMIT   _("IDS_BR_POP_UNABLE_TO_ADD_BOOKMARK_MAXIMUM_NUMBER_OF_BOOKMARKS_REACHED")
+#define BR_STRING_MAX_WINDOW_WARNING           _("IDS_BR_BODY_COULD_NOT_OPEN_NEW_WINDOW_BECAUSE_YOU_HAVE_ALREADY_OPENED_MAXIMUM_NUMBER")
+#define BR_STRING_INSERT_SIM_CARD               _("IDS_BR_POP_PLEASE_INSERT_SIM_CARD")
+#define BR_STRING_SET_CURRENT_PAGE_AS_HOMEPAGE  _("IDS_BR_BODY_SET_CURRENT_PAGE_AS_HOMEPAGE")
+#define BR_STRING_CREATED                       _("IDS_BR_BODY_CREATED")
+#define BR_STRING_AUTO_REFRESH                  _("IDS_BR_HEADER_AUTO_REFRESH")
+#define BR_STRING_INVALID_URL                   _("IDS_BR_POP_INVALID_URL")
+#define BR_STRING_SELECT_AVAILABLE_APP          _("IDS_BR_OPT_SELECT")
+#define BR_STRING_DOWNLOAD_COMPLETE             _("IDS_BR_POP_DOWNLOAD_COMPLETED")
+#define BR_STRING_NO_NETWORK_CONNECTION         _("IDS_BR_HEADER_NO_NETWORK_CONNECTION")
+#define BR_STRING_FLIGHT_MODE_WARNING           _("IDS_BR_POP_FLIGHT_MODE_ENABLED_USING_PACKET_DATA_WILL_DISABLE_FLIGHT_MODE")
+#define BR_STRING_HTTP_URL_CAN_BE_DOWNLOADED    _("IDS_BR_POP_ONLY_HTTP_OR_HTTPS_URLS_CAN_BE_DOWNLOADED")
+#define BR_STRING_HTML5_FEATURE_NOT_SUPPORT_POPUP _("IDS_BR_POP_SOME_OLD_HTML_WEBSITES_MAY_NOT_SUPPORT_THIS_FEATURE")
+#define BR_STRING_TAP_ONCE_MORE_TO_CLOSE_INTERNET _("IDS_BR_BODY_TAP_ONCE_MORE_TO_CLOSE_INTERNET")
+#define BR_STRING_MSG_DELETE_WEBSITE_LOCATION_ACCESS_INFORMATION_Q _("IDS_BR_POP_DELETE_WEBSITE_LOCATION_ACCESS_INFORMATION_Q")
+#define BR_STRING_AFTER_YOU_SAVE_SOME_PAGES_THE_SAVED_PAGES_WILL_BE_SHOWN _("IDS_BR_BODY_AFTER_YOU_SAVE_SOME_PAGES_THE_SAVED_PAGES_WILL_BE_SHOWN")
+#define BR_STRING_SET_AS_HOMEPAGE _("IDS_BR_POP_SET_AS_HOMEPAGE")
+/*************************************************************************************************************/
+
+
+/* web notification */
+/*************************************************************************************************************/
+#define BR_STRING_WEB_NOTIFICATION              _("IDS_BR_HEADER_WEB_NOTIFICATION")
+#define BR_STRING_WEB_NOTI_ALLOW_Q              _("IDS_BR_BODY_ALLOW_PS_TO_SHOW_NOTIFICATIONS")
+#define BR_STRING_WEB_NOTI_PERMISSION_SETTING   _("IDS_BR_BODY_CLEAR_WEB_NOTIFICATION_PERMISSION_SETTINGS")
+#define BR_STRING_WEB_NOTI_PERMISSION_Q         _("IDS_BR_BODY_CLEAR_WEB_NOTIFICATION_PERMISSIONS_Q")
+/*************************************************************************************************************/
+
+
+/* Auto fill form */
+/*************************************************************************************************************/
+#define BR_STRING_PROFILE                       _("IDS_BR_BODY_PROFILE")
+#define BR_STRING_PROFILES                      _("IDS_BR_HEADER_PROFILES")
+#define BR_STRING_AUTO_FILL_DATA_FULL_NAME      _("IDS_BR_BODY_FULL_NAME_ABB")
+#define BR_STRING_AUTO_FILL_DATA_COMPANY_NAME   _("IDS_BR_BODY_COMPANY_NAME_ABB")
+#define BR_STRING_AUTO_FILL_DATA_ADDRESS_LINE_1 _("IDS_BR_BODY_ADDRESS_LINE_1_ABB")
+#define BR_STRING_AUTO_FILL_DATA_ADDRESS_LINE_2 _("IDS_BR_BODY_ADDRESS_LINE_2_ABB")
+#define BR_STRING_AUTO_FILL_DATA_CITY_TOWN      _("IDS_BR_BODY_CITY_TOWN_ABB")
+#define BR_STRING_AUTO_FILL_DATA_COUNTRY_REGION _("IDS_BR_BODY_COUNTY_ABB")
+#define BR_STRING_AUTO_FILL_DATA_COUNTRY        _("IDS_BR_BODY_COUNTRY_REGION_ABB2")
+#define BR_STRING_AUTO_FILL_DATA_PHONE          _("IDS_BR_BODY_PHONE")
+#define BR_STRING_AUTO_FILL_DATA_EMAIL          _("IDS_BR_BODY_EMAIL_ADDRESS")
+#define BR_STRING_PRIMARY_ADDRESS_GUIDE_TEXT    _("IDS_BR_BODY_STREET_ADDRESS_PO_BOX_C_O_ETC_ABB")
+#define BR_STRING_SECONDARY_ADDRESS_GUIDE_TEXT  _("IDS_BR_BODY_FLAT_SUITE_UNIT_BUILDING_FLOOR_ETC_ABB")
+#define BR_STRING_ENTER_NAME                    _("IDS_BR_BODY_ENTER_NAME")
+#define BR_STRING_ENTER_YOUR_NAME               _("IDS_BR_BODY_ENTER_YOUR_NAME_ABB")
+#define BR_STRING_ENTER_COMPANY_NAME            _("IDS_BR_BODY_ENTER_COMPANY_NAME_ABB")
+#define BR_STRING_ENTER_TOWN_CITY_COUNTY        _("IDS_BR_BODY_ENTER_TOWN_CITY_COUNTY_ABB")
+#define BR_STRING_ENTER_POSTCODE                _("IDS_BR_BODY_ENTER_POSTCODE_ABB")
+#define BR_STRING_ENTER_COUNTRY_REGION          _("IDS_BR_BODY_ENTER_COUNTRY_REGION_ABB")
+#define BR_STRING_ENTER_PHONE_NUMBER            _("Enter your phone number")
+#define BR_STRING_ENTER_EMAIL_ADDRESS           _("Enter your Email address")
+#define BR_STRING_TOWN_AUTO_FILL_CITY_COUNTY            _("IDS_BR_BODY_TOWN_CITY_COUNTY_ABB")
+/*************************************************************************************************************/
+
+
+/* Hard coded text */
+/*************************************************************************************************************/
+
+#define BR_STRING_SHORTCUT              _("Shortcut") //not in use.
+////////tag////////
+#define BR_STRING_TAP_TO_ADD_TAG        _("Tap to add tag") //not in use.
+#define BR_STRING_TAP_TO_INPUT_TAG      _("Tap to input tag") //not in use.
+#define BR_STRING_REMOVE_TAG        _("Remove tag") //not in use.
+#define BR_STRING_SPECIAL_CHARACTOR_WARNING            _("Special charactor can't be included")//not in ux guide
+
+///////html5////////
+#define BR_STRING_FAILED_TO_CREATE_AS_WEBAPP _("Failed to create as webapp")
+#define BR_STRING_USERMEDIA                     _("This application wants to use your media.")//registering2
+#define BR_STRING_FAILED_TO_SEND_VIA_BT         _("Failed to share via Bluetooth")//not use. It will be remove.
+#define BR_STRING_NFC_CONNECT_FAILED    _("Failed to get NFC connection")//not use. It will be remove.
+#define BR_STRING_FAILED_TO_USE_SBEAM   _("Failed to use S beam. try later")//not use. It will be remove.
+#define BR_STRING_WARNING_VIDEO_PLAYER _("Can not launch video-player while video-call is running.")//not use. It will be remove.
+#define BR_STRING_STILL_WEBAPP_MAKING               _("Still installing previous webapp")//not use. It will be remove.
+#define BR_STRING_UNABLE_TO_SHARE_FILE_VIA_MESSAGE _("Unable to share file via message")///not use. It will be remove.
+#define BR_STRING_KEEP_IT              _("IDS_BR_OPT_SAVE_TO_KEEPIT_ABB")
+#define BR_STRING_ALLOW_OFFLINE_CACHE_Q _("Allow %s to use offline application cache?")
+#define BR_STRING_ALLOW_WEB_DATABASE_SIZE_SET_Q _("Allow %s to open %s use up to %d of web database?")
+#define BR_STRING_INDEXED_DB_SIZE_SET_TO_2GB_Q _("%s used %d of storage. Allow %s to use up to 2GB of indexed db?")
+#define BR_STRING_FILE_SYSTEM_SIZE_SET_TO_2GB_Q _("%s used %d of storage. Allow %s to use up to 2GB of filesystem?")
+
+/* New string */
+/*************************************************************************************************************/
+// If you need a string, please enter text below.
+/*************************************************************************************************************/
+// csr-framework
+#if defined(CSRFW)
+#define BR_STRING_TCS_GO_BACK _("IDS_BR_BUTTON_BACK_ABB")
+#define BR_STRING_TCS_DESCRIPTION_LEVEL0 _("IDS_BR_POP_P1SS_HAS_BEEN_DETECTED_DETECTED_IN_C_P2SS_OPEN_WEBPAGE_ANYWAY_Q")
+#define BR_STRING_TCS_DESCRIPTION_LEVEL1 _("IDS_BR_POP_P1SS_HAS_BEEN_DETECTED_DETECTED_IN_C_P2SS_SOME_CONTENT_HAS_BEEN_BLOCKED_TO_PROTECT_YOUR_DEVICE")
+#endif
+#define BR_STRING_REORDER                     _("IDS_BR_OPT_REORDER_ABB")
+#define BR_STRING_FAILED_TO_GET_WEB_NOTI_ICON _("Failed to get web notification icon")
+#define BR_STRING_READER_AVAILABLE _("Reader available")
+#define BR_STRING_DELETE_FOLDER                     _("IDS_BR_OPT_DELETE_FOLDER")
+#define BR_STRING_MSG_WEBCLIP_BLOCKED _("IDS_BR_BODY_UNABLE_TO_ADD_TO_HOME_SCREEN_THIS_WEBSITE_DOES_NOT_ALLOW_IT_TO_BE_PREVIEWED_ABB")
+#define BR_STRING_LOW_MEMORY_WARNING _("Low memory, Can't launch browser. Kill other applications")
+//#define BR_STRING_WINDOW_MANAGER _("IDS_BR_BODY_WINDOW_MANAGER")
+#define BR_STRING_WINDOWS      _("IDS_BR_OPT_WINDOWS")
+#define BR_STRING_DEVELOPER_OPTIONS _("IDS_BR_BODY_DEVELOPER_MODE")
+#define BR_STRING_SYNC_OPEN_PAGES _("IDS_BR_BODY_SYNC_OPEN_PAGES")
+#define BR_STRING_CTXMENU_SHARE_IMAGE                   _("Share image")
+#define BR_STRING_CTXMENU_PASTE_AND_GO                  _("Paste & Go")
+#define BR_STRING_WEBPROCESS_CRASH              _("WebProcess is crashed")
+#define BR_STRING_AUTO_FILL_DATA_POST_CODE _("IDS_BR_BODY_POSTCODE_ABB")
+#define BR_STRING_FORCE_ZOOM _("IDS_BR_BODY_FORCE_ZOOM_ABB")
+#define BR_STRING_ALWAYS_ON _("IDS_BR_BODY_ALWAYS_ON")
+#define BR_STRING_ON_DEMAND _("IDS_BR_BODY_ON_DEMAND")
+#define BR_STRING_ACCOUNT_VERIFICATION_REQUIRED _("Your account need to be verified to sync bookmarks or tabs.") // FIXME: Temporary string.
+#define BR_STRING_CLOSE_APPLICATION_Q _("IDS_BR_POP_CLOSE_APPLICATION_Q")
+
+/*************************************************************************************************************/
+
+
+/* New string for new settings */
+/*************************************************************************************************************/
+#define BR_STRING_SETTINGS_BASICS _("IDS_BR_BODY_BASIC")
+#define BR_STRING_GENERAL_SETTINGS     _("IDS_BR_BODY_GENERAL_M_SETTINGS")
+#define BR_STRING_SETTINGS_ACCOUNT _("IDS_BR_POP_ACCOUNT")
+#define BR_STRING_SETTINGS_SET_HOMEPAGE _("IDS_BR_MBODY_SET_HOMEPAGE")
+#define BR_STRING_SETTINGS_SYNC_SAMSUNG_ACCOUNT_NAME _("Samsung")
+#define BR_STRING_SETTINGS_SYNC_INTERNET_DATA _("IDS_BR_BODY_SYNC_INTERNET_DATA")
+#define BR_STRING_SETTINGS_SYNC_OPEN_PAGES _("IDS_BR_BODY_SYNC_OPEN_PAGES")
+#define BR_STRING_SETTINGS_SYNC_BOOKMARKS _("IDS_BR_BODY_SYNC_BOOKMARKS_ABB")
+#define BR_STRING_SETTINGS_AUTO_FILL_FORMS _("IDS_BR_MBODY_AUTO_FILL_FORMS")
+#define BR_STRING_SETTINGS_AUTO_FILL_FORMS_DESC _("IDS_BR_BODY_SET_TEXT_FOR_WEB_FORM_AUTO_FILL")
+#define BR_STRING_SETTINGS_ADVANCED _("IDS_BR_BODY_ADVANCED")
+#define BR_STRING_SETTINGS_PRIVACY _("IDS_BR_BODY_PRIVACY")
+#define BR_STRING_SETTINGS_SCREEN_AND_TEXT _("IDS_BR_BODY_SCREEN_AND_TEXT")
+#define BR_STRING_SETTINGS_CONTENT_SETTINGS _("IDS_BR_BODY_CONTENT_SETTINGS")
+#define BR_STRING_SETTINGS_BANDWIDTH_MANAGEMENT _("IDS_BR_HEADER_BANDWIDTH_MANAGEMENT_ABB")
+#define BR_STRING_SETTINGS_DEVELOPER_MODE _("IDS_BR_BODY_DEVELOPER_MODE")
+
+#define BR_STRING_SETTINGS_DEFAULT_PAGE _("IDS_BR_BODY_DEFAULT_PAGE_ABB")
+#define BR_STRING_SETTINGS_CURRENT_PAGE _("IDS_BR_BODY_CURRENT_PAGE")
+#define BR_STRING_SETTINGS_BLANK_PAGE _("IDS_BR_BODY_BLANK_PAGE")
+#define BR_STRING_SETTINGS_MOST_VISITED_SITES _("IDS_BR_BODY_MOST_VISITED_SITES")
+#define BR_STRING_SETTINGS_QUICK_ACCESS BR_STRING_QUICK_ACCESS
+#define BR_STRING_SETTINGS_SET_HOME_URL _("IDS_BR_MBODY_SET_HOME_URL")
+#define BR_STRING_SETTINGS_OTHER _("IDS_BR_BODY_OTHER_ABB")
+
+#define BR_STRING_SETTINGS_ADD_PROFILE _("IDS_BR_MBODY_ADD_PROFILE")
+#define BR_STRING_SETTINGS_EDIT_PROFILE _("IDS_BR_HEADER_EDIT_PROFILE")
+
+#define BR_STRING_SETTINGS_SEARCH_AND_URL_SUGGESTIONS _("IDS_BR_MBODY_URL_SUGGESTIONS")
+#define BR_STRING_SETTINGS_SEARCH_AND_URL_SUGGESTIONS_DESC _("IDS_BR_BODY_USE_A_PREDICTION_SERVICE_TO_DISPLAY_RELATED_QUERIES_AND_POPULAR_WEBSITES_IN_THE_ADDRESS_BAR_AS_YOU_TYPE")
+#define BR_STRING_SETTINGS_PRELOAD_AVAILABLE_LINKS_BEFORE _("IDS_BR_MBODY_PRELOAD_LINKED_WEBPAGES")
+#define BR_STRING_SETTINGS_PRELOAD_AVAILABLE_LINKS_BEFORE_DESC _("IDS_BR_BODY_IMPROVE_PERFORMANCE_WHEN_LOADING_PAGES")
+#define BR_STRING_SETTINGS_SECURITY_WARNINGS _("IDS_BR_BODY_SHOW_SECURITY_WARNINGS")
+#define BR_STRING_SETTINGS_SECURITY_WARNINGS_DESC _("IDS_BR_BODY_DISPLAY_SECURITY_WARNING_POP_UPS")
+#define BR_STRING_SETTINGS_REMEMBER_FORM_DATA _("IDS_BR_BODY_REMEMBER_FORM_DATA")
+#define BR_STRING_SETTINGS_REMEMBER_FORM_DATA_DESC _("IDS_BR_BODY_REMEMBER_DATA_I_TYPE_IN_FORMS_FOR_LATER_USE")
+#define BR_STRING_SETTINGS_REMEMBER_PASSWORDS _("IDS_BR_BODY_REMEMBER_PASSWORDS")
+#define BR_STRING_SETTINGS_REMEMBER_PASSWORDS_DESC _("IDS_BR_BODY_SAVE_USER_NAMES_AND_PASSWORDS_FOR_WEBSITES")
+#define BR_STRING_SETTINGS_INCOGNITO_MODE _("IDS_BR_OPT_INCOGNITO_MODE_ABB")
+#define BR_STRING_SETTINGS_INCOGNITO_MODE_DESC _("IDS_BR_BODY_INTERNET_HISTORY_IS_NOT_STORED_ABB")
+#define BR_STRING_SETTINGS_DELETE_PERSONAL_DATA _("IDS_BR_BODY_DELETE_PERSONAL_DATA")
+#define BR_STRING_SETTINGS_DELETE_PERSONAL_DATA_DESC _("IDS_BR_HEADER_CLEAR_PERSONALISED_DATA")
+
+#define BR_STRING_SETTINGS_PREVIEW _("Preview")
+#define BR_STRING_SETTINGS_PREVIEW_DESC _("Changed settings will be applied on here")
+#define BR_STRING_SETTINGS_TEXT_SCAILING BR_STRING_FONT_SIZE//_("Text scailing")
+#define BR_STRING_SETTINGS_FORCE_ZOOM _("IDS_BR_BODY_FORCE_ZOOM_ABB")
+#define BR_STRING_SETTINGS_FORCE_ZOOM_DESC _("IDS_BR_BODY_OVERRIDE_WEBSITES_REQUEST_TO_CONTROL_ZOOM")
+#define BR_STRING_SETTINGS_TEXT_ENCODING _("IDS_BR_OPT_TEXT_ENCODING")
+#define BR_STRING_SETTINGS_FULL_SCREEN _("IDS_BR_BODY_FULL_SCREEN")
+#define BR_STRING_SETTINGS_FULL_SCREEN_DESC _("IDS_BR_BODY_USE_FULL_SCREEN_MODE_TO_HIDE_THE_STATUS_BAR")
+#define BR_STRING_SETTINGS_TEXT_BOOSTER _("IDS_BR_MBODY_TEXT_BOOSTER")
+#define BR_STRING_SETTINGS_TEXT_BOOSTER_DESC _("IDS_BR_SBODY_VIEW_PC_WEBSITES_EASILY_ON_YOUR_MOBILE_DEVICE_THIS_FEATURE_BOOSTS_THE_TEXT_SIZE_TO_MAKE_IT_EASIER_TO_READ_NOTE_C_THE_TEXT_LAYOUT_MAY_CHANGE")
+
+#define BR_STRING_SETTINGS_ACCEPT_COOKIES _("IDS_BR_BODY_ACCEPT_COOKIES")
+#define BR_STRING_SETTINGS_ACCEPT_COOKIES_DESC _("IDS_BR_BODY_ALLOWS_SITES_TO_SAVE_AND_READ_COOKIE_DATA")
+#define BR_STRING_SETTINGS_ENABLE_LOCATION _("IDS_BR_BODY_ENABLE_LOCATION")
+#define BR_STRING_SETTINGS_ENABLE_LOCATION_DESC _("IDS_BR_BODY_ALLOW_SITES_TO_REQUEST_ACCESS_TO_YOUR_LOCATION")
+#define BR_STRING_SETTINGS_ENABLE_JAVASCRIPT _("IDS_BR_BODY_ENABLE_JAVASCRIPT")
+#define BR_STRING_SETTINGS_ENABLE_JAVASCRIPT_DESC _("IDS_BR_BODY_ALLOW_SITES_TO_RUN_JAVASCRIPT")
+#define BR_STRING_SETTINGS_BLOCK_POPUPS _("IDS_BR_BODY_BLOCK_POP_UPS")
+#define BR_STRING_SETTINGS_BLOCK_POPUPS_DESC _("IDS_BR_BODY_BLOCK_POP_UPS_ON_WEB_PAGES")
+#define BR_STRING_SETTINGS_BOOKMARK_REMINDER _("IDS_BR_BODY_BOOKMARK_REMINDER_ABB")
+#define BR_STRING_SETTINGS_BOOKMARK_REMINDER_DESC _("IDS_BR_BODY_ASK_WHETHER_TO_ADD_A_BOOKMARK_FOR_A_WEBSITE_WHEN_YOU_HAVE_VISITED_IT_PD_TIMES")
+#define BR_STRING_SETTINGS_DEFAULT_STORAGE _("IDS_BR_MBODY_DEFAULT_DOWNLOAD_STORAGE")
+#define BR_STRING_SETTINGS_PHONE _("IDS_BR_OPT_DEVICE")
+#define BR_STRING_SETTINGS_MEMORY_CARD _("IDS_BR_OPT_SD_CARD")
+#define BR_STRING_SETTINGS_WEBSITE_SETTINGS _("IDS_BR_BODY_WEBSITE_SETTINGS")
+#define BR_STRING_SETTINGS_WEBSITE_SETTINGS_DESC _("IDS_BR_BODY_ADVANCED_SETTINGS_FOR_INDIVIDUAL_WEBSITES")
+#define BR_STRING_SETTINGS_WEB_NOTIFICATION_TITLE _("IDS_BR_HEADER_WEB_NOTIFICATION")
+#define BR_STRING_SETTINGS_ENABLE_NOTIFICATIONS _("IDS_BR_BODY_NOTIFICATIONS")
+#define BR_STRING_SETTINGS_ENABLE_NOTIFICATIONS_ALWAYS _("IDS_BR_BODY_ALWAYS_ON")
+#define BR_STRING_SETTINGS_ENABLE_NOTIFICATIONS_ON_DEMAND _("IDS_BR_BODY_ON_DEMAND")
+#define BR_STRING_SETTINGS_ENABLE_NOTIFICATIONS_OFF BR_STRING_OFF
+#define BR_STRING_SETTINGS_CLEAR_NOTIFICATIONS _("IDS_BR_BODY_CLEAR_NOTIFICATIONS")
+#define BR_STRING_SETTINGS_CLEAR_NOTIFICATIONS_DESC _("IDS_BR_BODY_CLEAR_NOTIFICATION_ACCESS_FOR_WEBSITES")
+#define BR_STRING_SETTINGS_CLEAR_NOTIFICATIONS_Q _("IDS_BR_BODY_REMOVE_WEB_NOTIFICATION_ACCESS_INFORMATION_Q")
+
+#define BR_STRING_SETTINGS_RESET_TO_DEFAULT _("IDS_BR_BODY_RESET_TO_DEFAULT")
+#define BR_STRING_SETTINGS_RESET_TO_DEFAULT_DESC _("IDS_BR_BODY_CLEAR_ALL_BROWSER_DATA_AND_RESET_ALL_SETTINGS_TO_DEFAULT")///hard coding in po file about japanese.
+
+#define BR_STRING_SETTINGS_PRELOAD_WEB_PAGES _("IDS_BR_MBODY_PRELOAD_WEBPAGES")
+#define BR_STRING_SETTINGS_PRELOAD_WEB_PAGES_ALWAYS _("IDS_BR_BODY_ALWAYS")
+#define BR_STRING_SETTINGS_PRELOAD_WEB_PAGES_ONLY_VIA_WIFI _("IDS_BR_BODY_ONLY_VIA_WI_FI_ABB")
+#define BR_STRING_SETTINGS_PRELOAD_WEB_PAGES_NEVER BR_STRING_NEVER
+#define BR_STRING_SETTINGS_LOAD_IMAGES _("IDS_BR_OPT_LOAD_IMAGES")
+#define BR_STRING_SETTINGS_LOAD_IMAGES_DESC _("IDS_BR_BODY_DISPLAY_IMAGES_ON_WEB_PAGES")
+#define BR_STRING_SETTINGS_OPEN_PAGES_IN_OVERVIEW _("IDS_BR_BODY_OPEN_PAGES_IN_OVERVIEW_ABB")
+#define BR_STRING_SETTINGS_OPEN_PAGES_IN_OVERVIEW_DESC _("IDS_BR_BODY_SHOW_OVERVIEW_OF_NEWLY_OPENED_PAGES")
+
+#define BR_STRING_SETTINGS_HTML5_EXTENSION _("IDS_BR_HEADER_HTML5_EXTENSION")
+#define BR_STRING_SETTINGS_DRAG_AND_DROP _("IDS_BR_OPT_DRAG_AND_DROP")
+#define BR_STRING_HTML5_FEATURE_WARNING_DESC _("IDS_BR_POP_SOME_OLD_HTML_WEBSITES_MAY_NOT_SUPPORT_THIS_FEATURE")
+
+#define BR_STRING_SETTINGS_USER_AGENT _("IDS_BR_HEADER_USER_AGENT")
+#define BR_STRING_SETTINGS_CUSTOM_USER_AGENT _("IDS_BR_BODY_CUSTOM_USER_AGENT")
+#define BR_STRING_SETTINGS_WEB_INSPECTOR _("Web inspector")
+/*************************************************************************************************************/
+
+
+/* browser context menu */
+/*************************************************************************************************************/
+#define BR_STRING_CTXMENU_OPEN_LINK_IN_NEW_WINDOW       _("IDS_BR_OPT_OPEN_IN_NEW_WINDOW_ABB")
+#define BR_STRING_CTXMENU_DOWNLOAD_LINKED_FILE          _("IDS_BR_BODY_DOWNLOAD")
+#define BR_STRING_CTXMENU_COPY_LINK_URL                 _("IDS_BR_OPT_COPY_LINK_URL")
+#define BR_STRING_CTXMENU_VIEW_IMAGE                    _("IDS_BR_BODY_VIEW_IMAGE")
+#define BR_STRING_CTXMENU_OPEN_MEDIA_IN_NEW_WINDOW      _("IDS_BR_BODY_PLAY")
+#define BR_STRING_CTXMENU_SAVE_IMAGE_AS                 _("Save image as")
+#define BR_STRING_CTXMENU_COPY_IMAGE                    _("IDS_BR_OPT_COPY_IMAGE")
+#define BR_STRING_CTXMENU_SAVE_IMAGE                    _("IDS_BR_OPT_SAVE_IMAGE")
+#define BR_STRING_CTXMENU_SEND_IMAGE_VIA_EMAIL          _("IDS_BR_OPT_SEND_VIA_EMAIL")
+#define BR_STRING_CTXMENU_SEND_IMAGE_VIA_MESSAGE        _("IDS_BR_OPT_SEND_VIA_MESSAGE")
+#define BR_STRING_CTXMENU_COPY_VIDEO_LINK_LOCATION      _("IDS_BR_BODY_COPY_URL")
+#define BR_STRING_CTXMENU_COPY_AUDIO_LINK_LOCATION      _("IDS_BR_BODY_COPY_URL")
+#define BR_STRING_CTXMENU_COPY_TO_CLIPBOARD             _("IDS_BR_OPT_COPY_TO_CLIPBOARD")
+#define BR_STRING_CTXMENU_FIND                          _("IDS_FV_BODY_FIND")
+#define BR_STRING_CTXMENU_SAVE                          BR_STRING_SAVE
+#define BR_STRING_CTXMENU_TRANSLATE                     _("IDS_BR_OPT_TRANSLATE")
+#define BR_STRING_CTXMENU_PLAY                          _("IDS_BR_BODY_PLAY")
+#define BR_STRING_CTXMENU_PAUSE                         dgettext("sys_string", "IDS_COM_BODY_PAUSE")
+#define BR_STRING_CTXMENU_MUTE                          dgettext("sys_string", "IDS_COM_BODY_MUTE")
+#define BR_STRING_CTXMENU_OPEN_FRAME_IN_NEW_WINDOW      _("Open frame in new window")
+#define BR_STRING_CTXMENU_MORE                          _("IDS_BR_BUTTON_MORE")
+#define BR_STRING_CTXMENU_COPY                          BR_STRING_COPY
+#define BR_STRING_CTXMENU_WEB_SEARCH                    _("IDS_BR_OPT_WEB_SEARCH")
+#define BR_STRING_CTXMENU_SHARE                         dgettext("sys_string", "IDS_COM_BUTTON_SHARE")
+#define BR_STRING_CTXMENU_DELETE                        dgettext("sys_string", "IDS_COM_BODY_DELETE")
+#define BR_STRING_CTXMENU_FIND_ON_PAGE                  _("IDS_BR_OPT_FIND_ON_PAGE")
+#define BR_STRING_CTXMENU_SHARE_IMAGE_URL               _("Share image URL")
+#define BR_STRING_CTXMENU_SHARE_LINK                    _("IDS_BR_BODY_SHARE_LINK")
+#define BR_STRING_CTXMENU_SAVE_LINK                     _("IDS_BR_BODY_SAVE_LINK")
+#define BR_STRING_CTXMENU_SELECT_ALL                    _("IDS_BR_OPT_SELECT_ALL")
+#define BR_STRING_CTXMENU_SELECT                        _("IDS_BR_OPT_SELECT")
+#define BR_STRING_CTXMENU_GO_BACK                       _("IDS_BR_OPT_NAVIGATE_GO_BACKWARD")
+#define BR_STRING_CTXMENU_GO_FORWARD                    _("IDS_BR_OPT_NAVIGATE_GO_FORWARD")
+#define BR_STRING_CTXMENU_STOP                          _("IDS_BR_OPT_STOP")
+#define BR_STRING_CTXMENU_RELOAD                        _("IDS_BR_OPT_RELOAD")
+#define BR_STRING_CTXMENU_CUT                           dgettext("sys_string", "IDS_COM_BODY_CUT")
+#define BR_STRING_CTXMENU_PASTE                         _("IDS_BR_OPT_PASTE")
+#define BR_STRING_CTXMENU_SELECT_WORD                   _("IDS_BR_BODY_SELECT_WORD")
+#define BR_STRING_CTXMENU_DRAG                          BR_STRING_DRAG_AND_DROP
+#define BR_STRING_CTXMENU_FONT                          _("Font")
+#define BR_STRING_CTXMENU_CLOSE_ALL                     _("IDS_BR_OPT_CLOSE_ALL")
+#define BR_STRING_CTXMENU_SELECTION_MODE                _("IDS_BR_OPT_SELECTION_MODE")
+#define BR_STRING_CTXMENU_SAVE_TO_KEEPIT                _("IDS_BR_OPT_SAVE_TO_KEEPIT_ABB")
+#define BR_STRING_CTXMENU_CALL                          BR_STRING_CALL
+#define BR_STRING_CTXMENU_SEND_MESSAGE                  BR_STRING_SEND_MESSAGE
+#define BR_STRING_CTXMENU_ADD_TO_CONTACT                BR_STRING_ADD_TO_CONTACT
+#define BR_STRING_CTXMENU_SEND_EMAIL                    BR_STRING_SEND_EMAIL
+#define BR_STRING_CTXMENU_GOOGLE                        _("Google")
+#define BR_STRING_CTXMENU_YAHOO                         _("Yahoo")
+#define BR_STRING_CTXMENU_BING                          _("Bing")
+#define BR_STRING_CTXMENU_YANDEX                        _("Yandex")
+/*************************************************************************************************************/
+
+/* email, phone number handling */
+/*************************************************************************************************************/
+#define BR_STRING_SEND_EMAIL _("IDS_BR_OPT_SEND_EMAIL")
+#define BR_STRING_SEND_MESSAGE _("IDS_BR_OPT_SEND_MESSAGE_VODA")
+#define BR_STRING_ADD_TO_CONTACT _("IDS_BR_BODY_ADD_TO_CONTACT")
+#define BR_STRING_COPY dgettext("sys_string", "IDS_COM_BODY_COPY")
+
+
+/*************************************************************************************************************/
+
+/* developer mode */
+/*************************************************************************************************************/
+#define BR_STRING_DEVELOPER_MODE                _("IDS_BR_BODY_DEVELOPER_MODE")
+/*************************************************************************************************************/
+
+/*newly added text*/
+/*************************************************************************************************************/
+#define BR_STRING_STORED_DATA  _("IDS_BR_BODY_STORED_DATA")
+#define BR_STRING_SELECTED             _("IDS_BR_HEADER_PD_SELECTED_ABB")
+#define BR_STRING_CLEAR_BROWSER_HISTORY_Q      _("IDS_BR_POP_CLEAR_BROWSER_HISTORY_Q");
+#define BR_STRING_AFTER_YOU_LOAD_PAGES_THE_PAGE_HISTORY_WILL_BE_SHOWN          _("IDS_BR_BODY_AFTER_YOU_LOAD_PAGES_THE_PAGE_HISTORY_WILL_BE_SHOWN")
+#define BR_STRING_NO_SAVED_PAGE                _("IDS_BR_POP_NO_SAVED_PAGE")
+#define BR_STRING_THE_DESTINATION_FOLDER_IS_THE_SAME_AS_THE_SOURCE_FOLDER              _("IDS_BR_POP_THE_DESTINATION_FOLDER_IS_THE_SAME_AS_THE_SOURCE_FOLDER")
+#define BR_STRING_THE_DESTINATION_FOLDER_IS_A_SUBFOLDER_OF_THE_SOURCE_FOLDER           _("IDS_BR_POP_THE_DESTINATION_FOLDER_IS_A_SUBFOLDER_OF_THE_SOURCE_FOLDER")
+#define BR_STRING_ALL_OPEN_WINDOWS_WILL_BE_CLOSED_AND_YOU_WILL_MOVE_TO_YOUR_HOMEPAGE           _("IDS_BR_BODY_ALL_OPEN_WINDOWS_WILL_BE_CLOSED_AND_YOU_WILL_MOVE_TO_YOUR_HOMEPAGE")
+#define BR_STRING_ADDED_TO_HOME_SCREEN         _("IDS_BR_TPOP_ADDED_TO_HOME_SCREEN")
+#define BR_STRING_NO_MORE_ROOM_ON_HOME_SCREEN          _("IDS_BR_TPOP_NO_MORE_ROOM_ON_HOME_SCREEN_ABB")
+#define BR_STRING_FAILED_TO_ADD_TO_HOME_SCREEN         _("IDS_BR_TPOP_FAILED_TO_ADD_TO_HOME_SCREEN_ABB")
+#define BR_STRING_GOBACKWARD           _("IDS_BR_OPT_GOBACKWARD")
+#define BR_STRING_GOFORWARD            _("IDS_BR_OPT_GOFORWARD")
+#define BR_STRING_REFRESH              _("IDS_BR_OPT_REFRESH")
+#define BR_STRING_CLEAR_ALL            _("IDS_BR_OPT_CLEAR_ALL")
+#define BR_STRING_BODY_TITLE                _("IDS_BR_BODY_TITLE")
+#define BR_STRING_VIEW_MORE    _("IDS_BR_MBODY_VIEW_MORE")
+#define BR_STRING_TZTAB3_WINDOWS       _("IDS_BR_TZTAB3_WINDOWS")
+#define BR_STRING_SAVE_TO_KEEPIT       _("IDS_BR_OPT_SAVE_TO_KEEPIT_ABB")
+#define BR_STRING_FIND_ON_PAGE_ABB     _("IDS_BR_OPT_FIND_ON_PAGE_ABB")
+#define BR_STRING_HELP _("IDS_BR_OPT_HELP")
+#define BR_STRING_MAX_CHARACTER_WARNING _("IDS_BR_BODY_THE_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_HAS_BEEN_EXCEEDED")
+
+/*TTS string*/
+/*************************************************************************************************************/
+#define BR_STRING_WEBPAGE_READER               _("IDS_BR_HEADER_READER")//have to change to TTS string
+#define BR_STRING_DOUBLE_TAP_TO_OPEN_THE_FOLDER_T              _("IDS_BR_BODY_DOUBLE_TAP_TO_OPEN_THE_FOLDER_T_TTS")
+#define BR_STRING_DOUBLE_TAP_TO_CLOSE_THE_TRAY_T               _("IDS_BR_BODY_DOUBLE_TAP_TO_CLOSE_THE_TRAY_T_TALKBACK")
+#define BR_STRING_DOUBLE_TAP_AND_HOLD_TO_RESIZE_THE_SPLIT_AREA_T               _("IDS_BR_BODY_DOUBLE_TAP_AND_HOLD_TO_RESIZE_THE_SPLIT_AREA_T_TALKBACK")
+#define BR_STRING_DOUBLE_TAP_TO_SELECT_A_SEARCH_ENGINE_T               _("IDS_BR_BODY_DOUBLE_TAP_TO_SELECT_A_SEARCH_ENGINE_T_TALKBACK")
+#define BR_STRING_DOUBLE_TAP_TO_OPEN_THE_LIST_T                _("IDS_BR_BODY_DOUBLE_TAP_TO_OPEN_THE_LIST_T_TTS")
+#define BR_STRING_OPEN_WINDOWS_T               _("IDS_BR_BODY_OPEN_WINDOWS_T_TALKBACK")
+#define BR_STRING_VIEW_BOOKMARKS_T             _("IDS_BR_BODY_VIEW_BOOKMARKS_T_TALKBACK")
+#define BR_STRING_VIEW_HISTORY_T               _("IDS_BR_BODY_VIEW_HISTORY_T_TALKBACK")
+#define BR_STRING_ACCESS_DOUBLE_TAP_TO_OPEN_WEBPAGE_T  _("IDS_BR_BODY_DOUBLE_TAP_TO_OPEN_THE_WEBPAGE_T_TALKBACK")
+#define BR_STRING_SEARCH_FIELD_T       _("IDS_BR_BODY_SEARCH_FIELD_T_TTS")
+#define BR_STRING_CLICK_THIS_TO_LAUNCH_THE_APP _("Click this to launch the app")
+#define BR_STRING_UPPER_FOLDER_T_TALKBACK      _("IDS_BR_BODY_UPPER_FOLDER_T_TALKBACK")
+#define BR_STRING_DOUBLE_TAP_TO_OPEN_KEYBOARD_T        _("IDS_BR_BODY_DOUBLE_TAP_TO_OPEN_KEYBOARD_T_TTS")
+#define BR_STRING_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T              _("IDS_BR_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS")
+#define BR_STRING_DOUBLE_TAP_AND_HOLD_TO_RESIZE_SPLIT_AREA_T           _("IDS_BR_BODY_DOUBLE_TAP_AND_HOLD_TO_RESIZE_SPLIT_AREA_T_TTS")
+#define BR_STRING_TEXT_FIELD_T _("IDS_BR_BODY_TEXT_FIELD_T_TTS")
+#define BR_STRING_DOUBLE_TAP_TO_CANCEL_THE_SEARCH_T_TALKBACK           _("IDS_BR_BODY_DOUBLE_TAP_TO_CANCEL_THE_SEARCH_T_TALKBACK")
+//#define BR_STRING_CLEAR_TEXT_T               _("Clear text")
+#define BR_STRING_ENLARGE_TEXT_T               _("IDS_BR_OPT_ENLARGE_TEXT")
+#define BR_STRING_SHRINK_TEXT_T                _("IDS_BR_OPT_SHRINK_TEXT")
+#define BR_STRING_WEBPAGE_LOADED_T                     _("IDS_BR_BODY_PAGE_LOADED_T_TTS")
+#define BR_STRING_BUTTON_T             _("IDS_COM_BODY_BUTTON_T_TTS")
+#define BR_STRING_OPEN_APPLICATION_T           _("IDS_SCR_BODY_OPEN_APPLICATION")
+/*accessability*/
+/*************************************************************************************************************/
+//#define BR_STRING_BACK          dgettext("sys_string", "IDS_COM_BODY_BACK")
+//#define BR_STRING_CLOSE_WINDOW          _("IDS_BR_OPT_CLOSE_WINDOW")
+#define BR_STRING_ACCESS_PREV_BUT                _("IDS_BR_SK_PREVIOUS")
+#define BR_STRING_ACCESS_NEXT_BUT                _("IDS_BR_SK_NEXT")
+#define BR_STRING_ACCESS_MENU_BUT                _("IDS_BR_SK_MENU")
+//#define BR_STRING_CTXMENU_MORE
+/*************************************************************************************************************/
+
+//below string exist already. using it. search with IDS_~.
+//#define BR_STRING_DEFAULT_PAGE               _("IDS_BR_BODY_DEFAULT_PAGE_ABB")
+
+//below string have to request. It only has ss_id.
+//IDS_COM_BODY_SEARCH_FIELD_T_TTS
+//SS_DOUBLE_TAP_TO_OPEN_KEYBOARD_T_TTS
+//IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS
+//IDS_COM_BODY_DRAG_SCROLL_T_TTS
+//IDS_MSGS_BODY_EXPANDABLE_LIST_T_TTS
+//IDS_COM_BODY_TEXT_FIELD_T_TTS
+
+/*Help UI string*/
+#define BR_STRING_PRESS_THE_MENU_KEY                _("IDS_BR_BODY_PRESS_THE_MENU_KEY")
+//#define BR_STRING_ADDING_BOOKMARKS                  _("IDS_HELP_HEADER_ADDING_BOOKMARKS_ABB")
+//#define BR_STRING_OPENING_NEW_WINDOWS               _("IDS_HELP_HEADER_OPENING_NEW_WINDOWS_ABB")
+//#define BR_STRING_USING_THE_SEARCH_BAR              _("IDS_HELP_HEADER_USING_THE_SEARCH_BAR_ABB")
+//#define BR_STRING_CHANGING_THE_SEARCH_ENGINE        _("IDS_HELP_HEADER_CHANGING_THE_SEARCH_ENGINE_ABB")
+//#define BR_STRING_ADDING_BOOKMARK_DETAIL            _("IDS_HELP_BODY_YOU_CAN_ADD_WEBSITES_YOU_VISIT_FREQUENTLY_TO_YOUR_BOOKMARKS_TO_OPEN_THEM_FASTER")
+//#define BR_STRING_TAP_ADD_BOOKMARK_TO_ADD_A_BOOKMARK        _("IDS_HELP_BODY_TAP_ADD_BOOKMARK_TO_ADD_A_BOOKMARK")
+#define BR_STRING_EDIT_THE_TITLE_AND_LOCATION_THEN_TAP_SAVE        _("IDS_HELP_BODY_EDIT_THE_TITLE_AND_LOCATION_THEN_TAP_SAVE")
+//#define BR_STRING_OPENING_NEW_WINDOWS_DETAIL        _("IDS_HELP_BODY_YOU_CAN_OPEN_MULTIPLE_WINDOWS_TO_VISIT_DIFFERENT_WEBSITES_AT_THE_SAME_TIME")
+#define BR_STRING_TAP_THE_WINDOWS_ICON        _("IDS_HELP_TPOP_TAP_THE_WINDOWS_ICON")
+#define BR_STRING_TAP_TO_ADD_NEW_WINDOW        _("IDS_HELP_POP_TAP_TO_ADD_NEW_WINDOW")
+//#define BR_STRING_USING_THE_SEARCH_BAR_DETAIL        _("IDS_HELP_BODY_YOU_CAN_NAVIGATE_TO_OTHER_WEBSITES_AND_SEARCH_THE_INTERNET_USING_THE_URL_BAR")
+#define BR_STRING_TAP_URL_BAR_TO_CHANGE_TO_SEARCH_MODE        _("IDS_HELP_BODY_TAP_URL_BAR_TO_CHANGE_TO_SEARCH_MODE")
+#define BR_STRING_TAP_TO_DELETE_ALL_TEXT        _("IDS_HELP_BODY_TAP_TO_DELETE_ALL_TEXT")
+#define BR_STRING_ENTER_KEYWORD_OR_URL        _("IDS_HELP_BODY_ENTER_KEYWORD_OR_URL")
+#define BR_STRING_TAP_TO_CHANGE_THE_SEARCH_ENGINE        _("IDS_HELP_BODY_TAP_TO_CHANGE_THE_SEARCH_ENGINE")
+#define BR_STRING_SELECT_A_SEARCH_ENGINE_FROM_THE_LIST        _("IDS_HELP_BODY_SELECT_A_SEARCH_ENGINE_FROM_THE_LIST")
+//#define BR_STRING_HELP_INTERNET        _("IDS_HELP_BODY_INTERNET")
+//#define BR_STRING_BROWSE_WEBPAGES_AND_ADD_BOOKMARKS        _("IDS_HELP_BODY_BROWSE_WEBPAGES_AND_ADD_BOOKMARKS")
+//#define BR_STRING_CHANGING_THE_SEARCH_ENGINE_DETAIL        _("IDS_HELP_BODY_YOU_CAN_SELECT_THE_SEARCH_ENGINE_YOU_WANT_TO_USE_BEFORE_STARTING_A_SEARCH")
+//#define BR_STRING_TAB_THE_BOOKMARK_TAB        _("IDS_HELP_BODY_TAP_THE_BOOKMARK_TAB")
+#define BR_STRING_TUTORIAL_COMPLETE        _("IDS_HELP_POP_TUTORIAL_COMPLETE")
+#define BR_STRING_TAP_TO_ADD_BOOKMARK        _("IDS_HELP_BODY_TAP_TO_ADD_BOOKMARK_ABB")
+#define BR_STRING_INVALID_ACTION       _("IDS_HELP_POP_INVALID_ACTION_TRY_AGAIN")
+/*************************************************************************************************************/
+
+/*certificate string*/
+#define BR_STRING_UNABLE_TO_VIEW_THE_CERTIFICATE_THE_PAGE_INFORMATION_HAS_BEEN_CHANGED _("IDS_BR_POP_UNABLE_TO_VIEW_THE_CERTIFICATE_THE_PAGE_INFORMATION_HAS_BEEN_CHANGED")
+#define BR_STRING_ISSUED_TO_C          _("IDS_BR_HEADER_ISSUED_TO_C")
+#define BR_STRING_CERTIFICATE_SERIAL_NUMBER            _("IDS_BR_BODY_CERTIFICATE_SERIAL_NUMBER")
+#define BR_STRING_ISSUED_BY_C          _("IDS_BR_HEADER_ISSUED_BY_C")
+#define BR_STRING_VALIDITY_C           _("IDS_BR_HEADER_VALIDITY_C")
+#define BR_STRING_EXPIRES_ON_C         _("IDS_BR_HEADER_EXPIRES_ON_C")
+#define BR_STRING_SECURITY_CERTIFICATE         _("IDS_BR_HEADER_SECURITY_CERTIFICATE")
+#define BR_STRING_VIEW_CERTIFICATE             _("IDS_BR_OPT_VIEW_CERTIFICATE")
+
+/* Design ID is using instead of browser string marco */
+//#define BR_STRING_DELETE_THE_SELECTED_BOOKMARKS_Q _("IDS_BR_BODY_DELETE_THE_SELECTED_BOOKMARKS_Q")
+
+/*newly added string*/
+#define BR_STRING_CERTIFICATE          _("IDS_ST_HEADER_CERTIFICATE")
+#define BR_STRING_SPLIT_BAR_HANDLE             _("IDS_BR_BODY_SPLIT_BAR_HANDLE")
+#define BR_STRING_ADD_OR_REMOVED_BOOKMARK              _("IDS_BR_OPT_ADD_OR_REMOVE_BOOKMARK")
+#define BR_STRING_ADDED                        dgettext("sys_string", "IDS_COM_OPT_ADDED")
+#define BR_STRING_REMOVED              _("IDS_BR_POP_REMOVED")
+#define BR_STRING_VALIDITY             _("IDS_BR_HEADER_VALIDITY_C")
+#define BR_STRING_ISSUED_ON            _("IDS_BR_HEADER_ISSUED_ON_C")
+#define BR_STRING_EXPIRED_ON           _("IDS_BR_HEADER_EXPIRES_ON_C")
+#define BR_STRING_FINGERPRINTS         _("IDS_BR_BODY_FINGERPRINTS_C")
+#define BR_STRING_FINGERPRINTS_SHA256     _("IDS_BR_BODY_SHA_256_FINGERPRINT_C")
+#define BR_STRING_FINGERPRINTS_SHA1     _("IDS_BR_BODY_SHA_1_FINGERPRINT_C")
+#define BR_STRING_ORGANIZATION         _("IDS_BR_HEADER_ORGANIZATION_C")
+#define BR_STRING_ORGANIZATION_UNIT            _("IDS_BR_HEADER_ORGANISATIONAL_UNIT_C")
+#define BR_STRING_VALID_CERTIFICATE            _("Valid Certificate")
+#define BR_STRING_DISK_FULL            _("IDS_COM_BODY_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS_AND_TRY_AGAIN")
+#define BR_STRING_NO_WINDOWS           _("IDS_BR_BODY_NO_WINDOWS")
+#endif /* BROWSER_STRING_H */
diff --git a/tizen_src/ewk/efl_webview_app/efl_webview_app.sh b/tizen_src/ewk/efl_webview_app/efl_webview_app.sh
new file mode 100755 (executable)
index 0000000..43651e9
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+function getHostArch() {
+  echo $(uname -m | sed -e \
+        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
+}
+
+_LIBDIR=lib
+if [ "$(getHostArch)" == "x64" ]; then
+  _LIBDIR=lib64
+fi
+
+SCRIPTDIR=$(cd $(dirname $0); pwd -P)
+
+OUT_DIR=$(echo $SCRIPTDIR | grep -Po "(?<=/)out\..*?(?=/)")
+
+BUILD_MODE=Release
+
+if echo $SCRIPTDIR | grep -q "Debug/efl_webview_app"; then
+  BUILD_MODE=Debug
+fi
+
+CHROMIUM_EFL_LIBDIR=$(cd $SCRIPTDIR/../../../chromium/${OUT_DIR}/$BUILD_MODE/lib; pwd -P)
+CHROMIUM_EFL_DEPENDENCIES_LIBDIR=$(cd $SCRIPTDIR/../../../chromium/$OUT_DIR/Dependencies/Root/$_LIBDIR; pwd -P)
+
+export LD_LIBRARY_PATH=$CHROMIUM_EFL_DEPENDENCIES_LIBDIR:$CHROMIUM_EFL_LIBDIR:${LD_LIBRARY_PATH}
+echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
+${SCRIPTDIR}/efl_webview_app $@
+
diff --git a/tizen_src/ewk/efl_webview_app/elm_cycle_app.c b/tizen_src/ewk/efl_webview_app/elm_cycle_app.c
new file mode 100644 (file)
index 0000000..b9e3de7
--- /dev/null
@@ -0,0 +1,195 @@
+#include <Elementary.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <Evas.h>
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_X.h>
+#include "efl_integration/public/ewk_context.h"
+#include "efl_integration/public/ewk_main.h"
+#include "efl_integration/public/ewk_view.h"
+
+static Evas_Object* g_win;
+static Evas_Object* g_testObject;
+static Ecore_Timer* g_timer;
+
+static int g_updateTime = 10;
+static int g_repeatCount = 25;
+static const char* g_urls[4] = {"http://www.google.com", "http://www.yahoo.com",
+                                "http://msn.com", "http://naver.com"};
+static int g_urlCount = 4;
+
+//back forward not working yet
+#define BACK_FORWARD_TEST 0
+
+void render_init(int argc, char** argv);
+void render_start();
+void render_stop();
+void render_deinit();
+
+//close button handler
+static void
+on_done(void *data, Evas_Object *obj, void *event_info);
+
+static Eina_Bool update_timer_callback(void* data)
+{
+  printf("%s\n", __FUNCTION__);
+  render_stop();
+  render_start();
+  g_timer = NULL;
+  return ECORE_CALLBACK_CANCEL;
+}
+int in_back_test()
+{
+#if BACK_FORWARD_TEST
+  if(g_repeatCount <= 16 && g_repeatCount > 13)
+    return 1;
+  else
+    return 0;
+#else
+  return 0;
+#endif
+}
+int in_forward_test()
+{
+#if BACK_FORWARD_TEST
+  if(g_repeatCount <= 13 && g_repeatCount > 8)
+    return 1;
+  else
+    return 0;
+#else
+  return 0;
+#endif
+}
+
+void render_init(int argc, char** argv)
+{
+  const char* env;
+
+  if ((env = getenv("WEBVIEW_TEST_INTERVAL")))
+      g_updateTime = atoi(env);
+
+  if ((env = getenv("WEBVIEW_TEST_COUNT")))
+      g_repeatCount = atoi(env);
+
+  printf("### WebView test (%d)\n", g_repeatCount);
+
+  elm_init(argc, argv);
+  elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+
+  g_win = elm_win_add(NULL, "webview-profiling", ELM_WIN_BASIC);
+  evas_object_smart_callback_add(g_win, "delete,request", on_done, NULL);
+  evas_object_size_hint_weight_set(g_win,
+         EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+  int w, h;
+  ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+  evas_object_move(g_win, 0, 0);
+  evas_object_resize(g_win, w, h);
+  evas_object_color_set(g_win, 255, 255, 255, 255);
+  evas_object_show(g_win);
+  ewk_init();
+}
+
+void render_deinit()
+{
+  printf("%s\n", __FUNCTION__);
+  if (g_win) {
+      evas_object_del(g_win);
+      g_win = NULL;
+  }
+}
+
+
+void render_start()
+{
+  if(g_repeatCount <= 0) {
+    evas_object_del(g_win);
+     g_win = NULL;
+     return;
+  }
+  if(in_back_test()) {
+    if(ewk_view_back_possible(g_testObject)) {
+      printf("Test #%d Back possible, going back \n", 26 - g_repeatCount);
+      ewk_view_back(g_testObject);
+    }
+    else {
+      printf("back not possible #%d URL: %s \n", 26 - g_repeatCount, g_urls[g_repeatCount%g_urlCount]);
+      ewk_view_url_set(g_testObject, g_urls[g_repeatCount%g_urlCount]);
+    }
+    g_timer = ecore_timer_add(g_updateTime, update_timer_callback, NULL);
+    return;
+  }
+  if(in_forward_test()) {
+    if(ewk_view_forward_possible(g_testObject)) {
+      printf("Test #%d forward possible, going forward \n", 26 - g_repeatCount );
+      ewk_view_forward(g_testObject);
+    }
+    else {
+      printf("forward not possible Test #%d URL: %s \n", 26 - g_repeatCount, g_urls[g_repeatCount%g_urlCount]);
+      ewk_view_url_set(g_testObject, g_urls[g_repeatCount%g_urlCount]);
+    }
+
+    g_timer = ecore_timer_add(g_updateTime, update_timer_callback, NULL);
+    return;
+  }
+
+  if (g_testObject) {
+    evas_object_del(g_testObject);
+    g_testObject = NULL;
+  }
+
+  Evas* e = evas_object_evas_get (g_win);
+
+  // create webview
+  Ewk_Context* context = ewk_context_default_get();
+  g_testObject = ewk_view_add_with_context(e, context);
+  int w, h;
+  ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+  evas_object_resize(g_testObject, w, h);
+
+  // load start
+  printf("Test #%d URL: %s \n", 26 - g_repeatCount, g_urls[g_repeatCount%g_urlCount]);
+  ewk_view_url_set(g_testObject, g_urls[g_repeatCount%g_urlCount]);
+
+  evas_object_focus_set(g_testObject, EINA_TRUE);
+  evas_object_show(g_testObject);
+
+  g_timer = ecore_timer_add(g_updateTime, update_timer_callback, NULL);
+}
+
+void render_stop()
+{
+  g_repeatCount--;
+  printf("render stop\n");
+  if (!g_testObject) {
+    return;
+  }
+
+  if (g_timer) {
+    ecore_timer_del(g_timer);
+    g_timer = NULL;
+  }
+  if(!(in_back_test() || in_forward_test())) {
+    printf("delete evas objects\n");
+    //we dont delete g_win object because that terminates ecore main loop
+    evas_object_del(g_testObject);
+    g_testObject = NULL;
+  }
+}
+
+static void on_done(void *data, Evas_Object *obj, void *event_info)
+{
+  render_stop();
+  elm_exit();
+}
+
+int main(int argc, char **argv)
+{
+  render_init(argc, argv);
+  render_start();
+  elm_run();
+  elm_shutdown();
+  return 0;
+}
diff --git a/tizen_src/ewk/efl_webview_app/mini-browser.png b/tizen_src/ewk/efl_webview_app/mini-browser.png
new file mode 100644 (file)
index 0000000..266d0ed
Binary files /dev/null and b/tizen_src/ewk/efl_webview_app/mini-browser.png differ
diff --git a/tizen_src/ewk/efl_webview_app/mini_browser.c b/tizen_src/ewk/efl_webview_app/mini_browser.c
new file mode 100755 (executable)
index 0000000..3f0d0ca
--- /dev/null
@@ -0,0 +1,1414 @@
+#include <app.h>
+#include <dlog.h>
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Ecore_File.h>
+#include <Ecore_Getopt.h>
+#include <Ecore_X.h>
+#include <Evas.h>
+#include <Elementary.h>
+#include <glib/gprintf.h>
+#if defined(OS_TIZEN_TV)
+#include <Ecore_IMF_Evas.h>
+#endif
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(OS_TIZEN_MOBILE)
+#include <haptic/haptic.h>
+#endif
+
+#include "public/ewk_context.h"
+#include "public/ewk_context_menu.h"
+#include "public/ewk_error.h"
+#include "public/ewk_main.h"
+#include "public/ewk_policy_decision.h"
+#include "public/ewk_geolocation.h"
+#include "public/ewk_view.h"
+#include "public/ewk_user_media.h"
+#include "browser-string.h"
+#include "browser-object.h"
+
+#ifdef OS_TIZEN_MOBILE
+#include <efl_assist.h>
+#endif
+
+#undef LOG_TAG
+#define LOG_TAG "CHROMIUMEFL"
+#define TOOL_BOX_HEIGHT 150
+#define URL_BOX_HEIGHT 75
+// SIP height in TV
+#if defined(OS_TIZEN_TV)
+#define IMF_START_POINT_Y 635
+#endif
+
+// To support vibration
+#if defined(OS_TIZEN_MOBILE)
+static haptic_device_h s_haptic_handle; // haptic handle.
+static Ecore_Timer* s_haptic_timer_id; // Timer ID.
+static haptic_effect_h s_haptic_effect; // haptic_effect struct.
+#endif
+
+static const char default_start_url[] = "http://www.google.com/";
+static const char* start_url = NULL;
+static int is_imf_shown = 0;
+//Added for SIP status
+static int im_context_status = 0;
+#if defined(OS_TIZEN_TV)
+static Evas_Object * curr_focus = NULL;
+#endif
+// We are just following Tizen platform application pattern.
+// It will be required to pass data across lifecycle callbacks.
+typedef struct
+{
+  Evas* e;
+
+  /*let's explain those Evas_Object's hierarchy:
+  +main_window
+    -webview
+    +tool_box
+      +url_box
+        -url_entry
+      +button_box
+        -backbtn
+        -nextbtn
+        -refreshbtn
+        -gobtn
+        -stopbtn
+    -bg_tool_box
+    -progress_bar
+  */
+  Evas_Object *main_window;
+
+  Evas_Object* webview;     //an ewk_view which's app demo is
+
+  Evas_Object *tool_box;    //box containig url_box and button_box
+
+  Evas_Object *url_box;     //box containing only url_entry
+  Evas_Object *url_entry;
+
+  Evas_Object *button_box;  //box containing navigation buttons
+  Evas_Object *backbtn;
+  Evas_Object *nextbtn;
+  Evas_Object *refreshbtn;
+  Evas_Object *gobtn;
+  Evas_Object *stopbtn;
+
+  Evas_Object *bg_tool_box; //background under the toolbox
+
+  Evas_Object *progress_bar;
+
+  Evas_Object *popup; // popup window
+  Eina_Stringshare *popup_url;
+  Ewk_Geolocation_Permission_Request* geolRequest;
+  Ewk_User_Media_Permission_Request* userMediaRequest;
+} app_data;
+
+// Added to Support customized context menu
+typedef enum _context_menu_type {
+       TEXT_ONLY = 0,
+       INPUT_FIELD,
+       TEXT_LINK,
+       IMAGE_ONLY,
+       IMAGE_LINK,
+       EMAIL_SCHEME,
+       TEL_SCHEME,
+       UNKNOWN_MENU
+} context_menu_type;
+
+typedef enum _custom_context_menu_item_tag {
+       CUSTOM_CONTEXT_MENU_ITEM_BASE_TAG = EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG,
+       CUSTOM_CONTEXT_MENU_ITEM_FIND_ON_PAGE,
+       CUSTOM_CONTEXT_MENU_ITEM_SHARE,
+       CUSTOM_CONTEXT_MENU_ITEM_SEARCH,
+       CUSTOM_CONTEXT_MENU_ITEM_SAVE_TO_KEEPIT,
+       CUSTOM_CONTEXT_MENU_ITEM_CALL,
+       CUSTOM_CONTEXT_MENU_ITEM_SEND_MESSAGE,
+       CUSTOM_CONTEXT_MENU_ITEM_SEND_EMAIL,
+       CUSTOM_CONTEXT_MENU_ITEM_SEND_ADD_TO_CONTACT,
+} custom_context_menu_item_tag;
+
+static void __load_started_cb          (void *data, Evas_Object *obj, void *event_info);
+static void __load_finished_cb         (void *data, Evas_Object *obj, void *event_info);
+static void __load_progress_finished_cb(void *data, Evas_Object *obj, void *event_info);
+static void __load_error_cb            (void *data, Evas_Object *obj, void *event_info);
+static void __uri_changed_cb           (void *data, Evas_Object *obj, void *event_info);
+static void __title_changed_cb         (void *data, Evas_Object *obj, void *event_info);
+static void __load_progress_cb         (void *data, Evas_Object *obj, void *event_info);
+
+#if defined(OS_TIZEN_TV)
+static void _url_clicked_cb             (void *data, Evas_Object *obj, void *event_info);
+static void _webview_mouse_down_cb      (void *data, Evas *e, Evas_Object *obj, void *event_info);
+#endif
+
+static void __policy_newwindow_decide_cb  (void *data, Evas_Object *obj, void *event_info);
+static void __navigation_policy_decide_cb(void *data, Evas_Object *obj, void *event_info);
+static void __policy_response_decide_cb(void *data, Evas_Object *obj, void *event_info);
+static void __geolocation_permission_request_cb(void *data, Evas_Object *obj, void *event_info);
+static void __usermedia_permission_request_cb(void *data, Evas_Object *obj, void *event_info);
+//Added for load previous page, when keyboard backspace key is pressed
+static void webview_key_down_cb       (void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __im_context_open_cb      (void *data, Evas_Object *obj, void *event_info);
+static void __im_context_close_cb     (void *data, Evas_Object *obj, void *event_info);
+static Evas_Object* _create_view      (Evas_Object *parent, app_data *data);
+static Evas_Object* _create_button_bar(Evas_Object *parent, app_data *data);
+static Evas_Object* _create_url_bar   (Evas_Object *parent, int width, const char *start_url , app_data *data);
+static Evas_Object* _create_tool_bar  (Evas_Object *parent, const char *start_url , app_data *data);
+
+static void __popup_close(app_data *data);
+static void __popup_open_url_cb(void *data, Evas_Object *obj, void *event_info);
+static void __popup_cancel_url_cb(void *data, Evas_Object *obj, void *event_info);
+
+static void url_hit_cb(void *data, Evas_Object *obj, void *event_info);
+static void _imf_panel_state_cb (void *data, Ecore_IMF_Context *ctx, int value);
+#if defined(OS_TIZEN_MOBILE)
+static void _imf_panel_changed_cb(void *data, Evas_Object *obj, Eina_Rectangle *rect);
+#endif
+
+static void _geol_cancel_cb (void *data, Evas_Object *obj, void *ev);
+static void _geol_ok_cb     (void *data, Evas_Object *obj, void *ev);
+static void _back_btn_cb    (void *data, Evas_Object *btn, void *ev);
+static void _next_btn_cb    (void *data, Evas_Object *btn, void *ev);
+static void _reload_btn_cb  (void *data, Evas_Object *btn, void *ev);
+static void _stop_btn_cb    (void *data, Evas_Object *btn, void *ev);
+static void hide_imf_panel(app_data * data);
+#ifdef OS_TIZEN
+static void _back_hard_key_cb(void *data, Evas_Object *btn, void *ev);
+#endif
+
+// Added to Support cusomized context menu
+static void __customize_context_menu_cb(void *data, Evas_Object *obj, void *event_info);
+static void __customize_context_menu_item_selected_cb(void *data, Evas_Object *obj, void *event_info);
+
+// To Support customized context menu
+static void enable_customize_contextmenu(app_data *data, Eina_Bool enable);
+static void show_context_menu_text_only(app_data *data, Ewk_Context_Menu *menu);
+static void show_context_menu_text_link(app_data *data, Ewk_Context_Menu *menu);
+static void show_context_menu_image_link(app_data *data, Ewk_Context_Menu *menu);
+static void show_context_menu_call_number(app_data *data, Ewk_Context_Menu *menu);
+static void show_context_menu_email_address(app_data *data, Ewk_Context_Menu *menu);
+static void show_context_menu_image_only(app_data *data, Ewk_Context_Menu *menu);
+context_menu_type get_menu_type(app_data *data, Ewk_Context_Menu *menu);
+
+//  Added to Support Javascript popup
+static Eina_Bool __javascript_alert_cb(Evas_Object* o, const char* alert_text, void* user_data);
+static Eina_Bool __javascript_confirm_cb(Evas_Object* o, const char* message, void* user_data);
+static Eina_Bool __javascript_prompt_cb(Evas_Object* o, const char* message, const char* default_value, void* user_data);
+
+// To support vibration
+#if defined(OS_TIZEN_MOBILE)
+static Eina_Bool __vibration_timeout_cb(void *data);
+static void __vibration_on_cb(uint64_t vibration_time, void *data);
+static void __vibration_off_cb(void *data);
+#endif
+
+static void get_main_window_size(int *changed_ang, int *width, int *height);
+
+enum
+{
+  FOR_TEST_APPLICATION_CACHE_RUN = EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG + 1,
+  FOR_TEST_APPLICATION_CACHE_DELETE_ALL,
+  FOR_TEST_APPLICATION_BACK_FORWAD_CLEAR,
+  // New context menu items can be added here
+};
+
+static const Ecore_Getopt options =
+{
+  .prog = "mini_browser",
+  .usage = "%prog [options] [url]",
+  .strict = EINA_TRUE,
+  .descs =
+  {
+    ECORE_GETOPT_STORE_DEF_STR('u', "url", "go to url", default_start_url),
+    ECORE_GETOPT_SENTINEL,
+  }
+};
+
+static Eina_Strbuf* create_url_with_scheme(const char* base_url, const char* scheme)
+{
+  Eina_Strbuf* buffer = eina_strbuf_new();
+  eina_strbuf_append(buffer, scheme);
+  eina_strbuf_append(buffer, base_url);
+  return buffer;
+}
+
+static void set_url_from_user_input(Evas_Object* webview, const char* url)
+{
+  if (strstr(url, "://"))
+  {
+    ewk_view_url_set(webview, url);
+    return;
+  }
+
+  // Add scheme.
+  Eina_Strbuf* full_url;
+  if (ecore_file_exists(url))
+  {
+    char* realpath = ecore_file_realpath(url);
+    full_url = create_url_with_scheme(realpath, "file://");
+    free(realpath);
+  }
+  else
+  {
+    full_url = create_url_with_scheme(url, "http://");
+  }
+
+  ewk_view_url_set(webview, eina_strbuf_string_get(full_url));
+
+  eina_strbuf_free(full_url);
+}
+
+static Evas_Object* _create_main_window(void *data)
+{
+  Evas_Object *window = elm_win_add(NULL, "ChromiumEfl", ELM_WIN_BASIC);
+  if (window) {
+    int width, height;
+    elm_win_title_set(window, "ChromiumEfl");
+    evas_object_size_hint_weight_set(window, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(window, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_win_borderless_set(window, EINA_TRUE);
+    elm_win_conformant_set(window, EINA_TRUE);
+    ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+    evas_object_resize(window, width, height);
+    elm_win_indicator_mode_set(window, ELM_WIN_INDICATOR_SHOW);
+
+    /* add a standard bg */
+    Evas_Object *bg = elm_bg_add(window);
+    /* not allow bg to expand. let's limit dialog size to contents */
+    evas_object_size_hint_weight_set(bg, 1.0, 1.0);
+    /* add object as a resize object for the window (controls window minimum
+     * size as well as gets resized if window is resized) */
+    elm_win_resize_object_add(window, bg);
+    elm_bg_color_set(bg, 225, 225, 225);
+    evas_object_show(bg);
+  }
+  return window;
+}
+
+Evas_Object* _create_view(Evas_Object *parent, app_data *data)
+{
+  if (start_url == NULL)
+  {
+    start_url = default_start_url;
+  }
+
+  int width, height;
+  evas_object_geometry_get(parent, NULL, NULL, &width, &height);
+
+  Evas_Object *webview = ewk_view_add_with_context(evas_object_evas_get(parent), ewk_context_default_get() );
+  evas_object_resize(webview, width, height - TOOL_BOX_HEIGHT);
+
+  evas_object_show(webview);
+  evas_object_focus_set(webview, EINA_TRUE);
+
+  data->webview = webview;
+
+  evas_object_smart_callback_add(webview, "load,finished"         , __load_finished_cb         , data);
+  evas_object_smart_callback_add(webview, "load,error"            , __load_error_cb            , data);
+  evas_object_smart_callback_add(webview, "url,changed"           , __uri_changed_cb           , data);
+  evas_object_smart_callback_add(webview, "title,changed"         , __title_changed_cb         , data);
+  evas_object_smart_callback_add(webview, "load,progress"         , __load_progress_cb         , data);
+  evas_object_smart_callback_add(webview, "load,progress,finished", __load_progress_finished_cb, data);
+  evas_object_smart_callback_add(webview, "load,started"          , __load_started_cb          , data);
+  evas_object_smart_callback_add(webview, "policy,newwindow,decide", __policy_newwindow_decide_cb, data);
+  #if defined(OS_TIZEN_TV)
+  evas_object_event_callback_add(webview, EVAS_CALLBACK_MOUSE_DOWN, _webview_mouse_down_cb       , data);
+  #endif
+  evas_object_smart_callback_add(webview, "policy,response,decide", __policy_response_decide_cb, data);
+  evas_object_smart_callback_add(webview, "policy,navigation,decide", __navigation_policy_decide_cb, data);
+  evas_object_smart_callback_add(webview, "geolocation,permission,request", __geolocation_permission_request_cb, data);
+  evas_object_smart_callback_add(webview, "usermedia,permission,request", __usermedia_permission_request_cb, data);
+  //  Added to Support Javascript popup
+  ewk_view_javascript_alert_callback_set(webview, __javascript_alert_cb, data);
+  ewk_view_javascript_confirm_callback_set(webview, __javascript_confirm_cb, data);
+  ewk_view_javascript_prompt_callback_set(webview, __javascript_prompt_cb, data);
+
+  // To support vibration
+#if defined(OS_TIZEN_MOBILE)
+  printf("[%s][%d][%s] calling ewk_context_vibration_client_callbacks_set...\n", __FUNCTION__, __LINE__, "vibration");
+  ewk_context_vibration_client_callbacks_set(webview, __vibration_on_cb, __vibration_off_cb, NULL);
+#endif
+
+  //Added to support keyboard backspace key
+  evas_object_smart_callback_add(webview, "editorclient,ime,opened", __im_context_open_cb  , data);
+  evas_object_smart_callback_add(webview, "editorclient,ime,closed", __im_context_close_cb , data);
+  evas_object_event_callback_add(webview, EVAS_CALLBACK_KEY_DOWN, webview_key_down_cb , data);
+
+  // To Enable customized context menu
+  enable_customize_contextmenu(data, EINA_TRUE);
+
+#if defined(OS_TIZEN_MOBILE)
+  evas_object_smart_callback_add(webview, "inputmethod,changed", _imf_panel_changed_cb , data);
+#endif
+
+  // Show Ime only on user action
+  ewk_settings_uses_keypad_without_user_action_set(ewk_view_settings_get(webview), false);
+
+  return webview;
+}
+
+#if defined(OS_TIZEN_TV)
+// To bring back toolbar to original position when SID_DONE/SID_CANCEL is pressed
+static void _SIP_close_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+  Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
+  app_data *ad = (app_data*) data;
+  if (!strcmp(ev->key, "Select"))
+  {
+    const char* url = elm_entry_entry_get( ad->url_entry );
+    set_url_from_user_input(ad->webview, url);
+    hide_imf_panel(ad);
+    evas_object_focus_set(ad->webview, EINA_TRUE);
+  }
+  if (!strcmp(ev->key, "Cancel"))
+  {
+    hide_imf_panel(ad);
+  }
+}
+
+/* On Mouse Event over webview should bring back
+ * Tool bar to its original position
+ */
+void _webview_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+  app_data *ad = (app_data*) data;
+  hide_imf_panel(ad);
+}
+#endif
+
+//Added to load previous page, when keyboard backspace key is pressed
+void webview_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+  app_data *ad = (app_data*) data;
+  Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
+
+  if (strcmp(ev->key, "XF86Stop") == 0)
+  {
+    if (ewk_view_text_selection_clear(ad->webview))
+      return;
+  }
+  if ( (!strcmp(ev->key, "BackSpace") || !strcmp(ev->key, "XF86Stop")) && (!im_context_status) )
+  {
+    ewk_view_back(ad->webview);
+  }
+}
+
+Evas_Object* _create_button_bar(Evas_Object *parent , app_data *data)
+{
+  Evas_Object *ic;
+  data->button_box = elm_box_add(parent);
+  elm_box_horizontal_set(data->button_box, EINA_TRUE);
+  elm_box_padding_set(data->button_box,2,2);
+
+  data->backbtn=elm_button_add(data->button_box);
+  elm_box_pack_end(data->button_box, data->backbtn);
+  evas_object_smart_callback_add(data->backbtn, "clicked", _back_btn_cb, data);
+
+  ic=elm_icon_add(parent);
+  elm_icon_standard_set(ic, "arrow_left");
+  elm_object_part_content_set(data->backbtn, "icon", ic);
+  evas_object_show(data->backbtn);
+
+  data->nextbtn=elm_button_add(data->button_box);
+  elm_box_pack_end(data->button_box, data->nextbtn);
+  evas_object_smart_callback_add(data->nextbtn, "clicked", _next_btn_cb, data);
+
+  ic=elm_icon_add(parent);
+  elm_icon_standard_set(ic, "arrow_right");
+  elm_object_part_content_set(data->nextbtn, "icon", ic);
+  evas_object_show(data->nextbtn);
+
+  data->refreshbtn=elm_button_add(data->button_box);
+  elm_box_pack_end(data->button_box, data->refreshbtn);
+
+  ic=elm_icon_add(parent);
+  elm_icon_standard_set(ic, "refresh");
+  elm_object_part_content_set(data->refreshbtn, "icon", ic);
+  evas_object_show(data->refreshbtn);
+  evas_object_smart_callback_add(data->refreshbtn, "clicked", _reload_btn_cb, data);
+
+  data->stopbtn=elm_button_add(data->button_box);
+  elm_box_pack_end(data->button_box, data->stopbtn);
+
+  ic=elm_icon_add(parent);
+  elm_icon_standard_set(ic, "close");
+  elm_object_part_content_set(data->stopbtn, "icon", ic);
+  evas_object_show(data->stopbtn);
+  evas_object_smart_callback_add(data->stopbtn, "clicked", _stop_btn_cb, data);
+
+  data->gobtn=elm_button_add(data->button_box);
+  elm_object_text_set(data->gobtn, "GO");
+  elm_box_pack_end(data->button_box,data->gobtn);
+  evas_object_show(data->gobtn);
+
+  evas_object_smart_callback_add(data->gobtn, "clicked", url_hit_cb, data);
+  return data->button_box;
+}
+
+Evas_Object* _create_url_bar(Evas_Object *parent, int width, const char *start_url, app_data *data )
+{
+  data->url_box = elm_box_add(parent);
+  elm_box_horizontal_set(data->url_box, EINA_TRUE);
+  evas_object_size_hint_weight_set(data->url_box, EVAS_HINT_EXPAND, 0.0);
+  evas_object_size_hint_align_set(data->url_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+  evas_object_resize(data->url_box, width, URL_BOX_HEIGHT);
+  evas_object_show(data->url_box);
+
+  data->url_entry = elm_entry_add(data->url_box);
+  elm_entry_single_line_set(data->url_entry, EINA_TRUE);
+  elm_entry_scrollable_set(data->url_entry, EINA_TRUE);
+  evas_object_size_hint_weight_set(data->url_entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+  evas_object_size_hint_align_set(data->url_entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
+  elm_entry_text_style_user_push(data->url_entry,
+     "DEFAULT='font=Sans font_size=35 color=#000000 ' hilight=' + font_weight=Bold'");
+  elm_object_text_set(data->url_entry, start_url);
+  elm_entry_input_panel_layout_set(data->url_entry, ELM_INPUT_PANEL_LAYOUT_URL);
+  elm_entry_autocapital_type_set  (data->url_entry, ELM_AUTOCAPITAL_TYPE_NONE );
+  elm_entry_editable_set(data->url_entry, EINA_TRUE);
+  evas_object_color_set(data->url_entry, 255, 255, 255, 255);
+  elm_box_padding_set(data->url_box, 5,5);
+  elm_box_pack_end(data->url_box, data->url_entry);
+  evas_object_show(data->url_entry);
+  evas_object_smart_callback_add(data->url_entry, "activated", url_hit_cb, data);
+  #if defined(OS_TIZEN_TV)
+  evas_object_event_callback_add(data->url_entry, EVAS_CALLBACK_KEY_DOWN, _SIP_close_cb, data);
+  evas_object_smart_callback_add(data->url_entry, "clicked", _url_clicked_cb, data);
+  #endif
+  elm_entry_prediction_allow_set(data->url_entry, EINA_FALSE);
+#ifdef OS_TIZEN_MOBILE
+  ea_object_event_callback_add(data->url_entry, EA_CALLBACK_BACK, _back_hard_key_cb, data);
+#endif
+  // Add imf event
+  Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(data->url_entry);
+  if (imf_context) {
+    ecore_imf_context_prediction_allow_set(imf_context, EINA_FALSE);
+    ecore_imf_context_input_panel_event_callback_add (
+        imf_context, ECORE_IMF_INPUT_PANEL_STATE_SHOW, _imf_panel_state_cb, data);
+    ecore_imf_context_input_panel_event_callback_add (
+        imf_context, ECORE_IMF_INPUT_PANEL_STATE_HIDE, _imf_panel_state_cb, data);
+  }
+  evas_object_show(data->url_entry);
+
+  return data->url_box;
+}
+
+Evas_Object* _create_tool_bar(Evas_Object *parent, const char *start_url, app_data *data)
+{
+  //these pointers are local. data _create_url_bar and _create_button_bar
+  //puts pointers to the right field in app_data structure
+  Evas_Object *button_box, *url_box;
+
+  int width, height;
+  evas_object_geometry_get (parent, NULL, NULL, &width, &height);
+
+  /* add a standard bg */
+  data->bg_tool_box = evas_object_rectangle_add( evas_object_evas_get(parent) );
+  //Here we set the rectangles red, green, blue and opacity levels
+  evas_object_color_set(data->bg_tool_box, 225, 225, 225, 255); // opaque white background
+  evas_object_resize(data->bg_tool_box, width, TOOL_BOX_HEIGHT);     // covers full canvas
+
+  data->tool_box = elm_box_add(parent);
+  evas_object_move(data->tool_box, 0, height - TOOL_BOX_HEIGHT);
+  evas_object_resize(data->tool_box, width, TOOL_BOX_HEIGHT);
+  evas_object_show(data->tool_box);
+
+  url_box = _create_url_bar(data->tool_box, width, start_url, data);
+  button_box = _create_button_bar(data->tool_box, data);
+
+  elm_box_pack_end(data->tool_box,url_box);
+  evas_object_propagate_events_set(data->tool_box, EINA_FALSE);
+  evas_object_size_hint_align_set(button_box, 0.0, 0.0);
+  elm_box_pack_end(data->tool_box,button_box);
+  evas_object_show(button_box);
+  evas_object_show(url_box);
+
+  Elm_Theme *theme = elm_theme_new();
+  elm_theme_set(theme, "tizen-HD-light");
+  elm_object_theme_set(data->tool_box, theme);
+  evas_object_show(data->tool_box);
+
+  return data->tool_box;
+}
+
+//FIXME: The commented line below is for demo.
+//#if defined(OS_TIZEN_MOBILE)
+static void __br_rotate_cb(void *data, Evas_Object *obj, void *event)
+{
+  if (!data)
+    return;
+
+  app_data *ad = (app_data *)data;
+  int changed_ang = elm_win_rotation_get(ad->main_window);
+  int main_window_width  = 0, main_window_height = 0;
+  get_main_window_size(&changed_ang, &main_window_width, &main_window_height);
+
+  evas_object_resize(ad->webview, main_window_width, main_window_height - TOOL_BOX_HEIGHT);
+  evas_object_resize(ad->tool_box, main_window_width, TOOL_BOX_HEIGHT);
+  evas_object_move(ad->tool_box, 0, main_window_height - TOOL_BOX_HEIGHT);
+
+  // ewk_view_orientation_send expects angles: 0, 90, -90, 180.
+  if (changed_ang == 270)
+    changed_ang = -90;
+  ewk_view_orientation_send(ad->webview, changed_ang);
+}
+
+static void _register_rotate_callback(Evas_Object *main_window, void *user_data)
+{
+  if (elm_win_wm_rotation_supported_get(main_window)) {
+    const int rots[] = { APP_DEVICE_ORIENTATION_0, APP_DEVICE_ORIENTATION_90, APP_DEVICE_ORIENTATION_270 };
+    elm_win_wm_rotation_available_rotations_set(main_window, rots, (sizeof(rots) / sizeof(int)));
+  }
+  evas_object_smart_callback_add(main_window, "wm,rotation,changed", __br_rotate_cb, user_data);
+}
+//#endif //#if defined(OS_TIZEN_MOBILE)
+
+#if defined(OS_TIZEN_MOBILE)
+static void _on_focus_in_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+  app_data *ad = (app_data *) data;
+  set_url_from_user_input(ad->webview, start_url);
+  evas_object_event_callback_del(ad->main_window, EVAS_CALLBACK_FOCUS_IN, _on_focus_in_cb);
+}
+#endif
+
+static bool __br_app_create(void *data)
+{
+  elm_init(0, NULL);
+  if (!ewk_init()) {
+    LOGE("elm_init Failed. App not started");
+    return false;
+  }
+
+  elm_config_preferred_engine_set("opengl_x11");
+  app_data *ad = (app_data *) data;
+
+  ad->main_window = _create_main_window(ad);
+
+  // All ewk things go here
+  ad->e = evas_object_evas_get (ad->main_window);
+
+
+  // Create view and tool bar
+  _create_view(ad->main_window, ad);
+
+  _create_tool_bar(ad->main_window, start_url, ad);
+
+  // Add progress bar
+  ad->progress_bar = evas_object_rectangle_add(ad->e);
+  evas_object_color_set(ad->progress_bar, 87, 44, 230, 200);
+  evas_object_resize(ad->progress_bar, 0, 4);
+  evas_object_show(ad->progress_bar);
+
+  evas_object_show(ad->main_window);
+#if defined(OS_TIZEN_MOBILE)
+  evas_object_event_callback_add(ad->main_window, EVAS_CALLBACK_FOCUS_IN, _on_focus_in_cb, ad);
+#else
+  set_url_from_user_input(ad->webview, start_url);
+#endif
+//FIXME: The commented line below is for demo.
+//#if defined(OS_TIZEN_MOBILE)
+  _register_rotate_callback(ad->main_window, ad);
+//#endif
+  return true;
+}
+static bool __br_app_terminate(void* data)
+{
+  #if defined(OS_TIZEN_TV)
+  curr_focus = NULL;
+  hide_imf_panel(data);
+  #endif
+  return true;
+}
+
+static void __br_app_pause(void* data)
+{
+}
+
+static void __br_app_resume(void* data)
+{
+}
+
+int main(int argc, char** argv)
+{
+  LOGD(" Minibrowser main\n");
+
+  //FIXME: this is temporal code.
+  ewk_set_arguments(argc, argv);
+
+  Ecore_Getopt_Value values[] =
+  {
+    ECORE_GETOPT_VALUE_STR(start_url),
+    ECORE_GETOPT_VALUE_NONE,
+  };
+
+  printf("MINIB.C main \n");
+  if (ecore_getopt_parse(&options, values, argc, argv) < 0)
+  {
+    LOGE("ERROR: could not parse options.\n");
+    return EXIT_FAILURE;
+  }
+
+  app_event_callback_s ops;
+  memset(&ops, 0x00, sizeof(app_event_callback_s));
+  ops.create = __br_app_create;
+  ops.terminate = __br_app_terminate;
+  ops.pause = __br_app_pause;
+  ops.resume = __br_app_resume;
+
+#ifdef TIZEN_MOBILE_LEGACY_V_2_1
+  ops.service = NULL;
+#endif
+  ops.low_memory = NULL;
+  ops.low_battery = NULL;
+  ops.device_orientation = NULL;
+  ops.language_changed = NULL;
+  ops.region_format_changed = NULL;
+
+  app_data ad;
+  memset(&ad, 0x00, sizeof(app_data));
+  int ret = app_efl_main(&argc, &argv, &ops, &ad);
+  return ret;
+}
+
+void get_main_window_size(int *changed_ang, int *width, int *height)
+{
+  switch (*changed_ang) {
+    case APP_DEVICE_ORIENTATION_0:
+      ecore_x_window_size_get(ecore_x_window_root_first_get(), width, height);
+      break;
+    case APP_DEVICE_ORIENTATION_90:
+    case APP_DEVICE_ORIENTATION_270:
+      ecore_x_window_size_get(ecore_x_window_root_first_get(), height, width);
+      break;
+    default:
+      return;
+  }
+}
+
+void __load_started_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("Start Loading \n");
+  app_data *ad = (app_data *) data;
+  evas_object_show(ad->progress_bar);
+}
+
+//To check SIP status
+void __im_context_open_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("IM_CONTEXT_EFL_ON \n");
+  im_context_status = 1;
+}
+
+void __im_context_close_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("IM_CONTEXT_EFL_OFF \n");
+
+#if defined(OS_TIZEN_MOBILE)
+  app_data *ad = (app_data *)data;
+  int changed_ang = elm_win_rotation_get(ad->main_window);
+  int main_window_width  = 0, main_window_height = 0;
+  get_main_window_size(&changed_ang, &main_window_width, &main_window_height);
+  evas_object_resize(ad->webview, main_window_width, main_window_height - TOOL_BOX_HEIGHT);
+#endif
+
+  im_context_status = 0;
+}
+
+#if defined(OS_TIZEN_MOBILE)
+void _imf_panel_changed_cb(void *data, Evas_Object *obj, Eina_Rectangle *rect)
+{
+  printf("__imf_panel_changed_cb\n");
+  LOGD("IM_CONTEXT_EFL_OFF \n");
+
+  app_data *ad = (app_data *)data;
+  int changed_ang = elm_win_rotation_get(ad->main_window);
+  int main_window_width  = 0, main_window_height = 0;
+  get_main_window_size(&changed_ang, &main_window_width, &main_window_height);
+
+  if (rect->h < TOOL_BOX_HEIGHT)
+    evas_object_resize(ad->webview, main_window_width, main_window_height - TOOL_BOX_HEIGHT);
+  else
+    evas_object_resize(ad->webview, main_window_width, main_window_height - rect->h);
+}
+#endif
+
+void __load_progress_finished_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("Ending Loading \n");
+  app_data *ad = (app_data *) data;
+  evas_object_resize(ad->progress_bar, 0, 10);
+  evas_object_hide(ad->progress_bar);
+}
+
+void __load_finished_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("Load Done \n");
+  app_data *ad = (app_data *) data;
+  evas_object_focus_set(ad->webview, EINA_TRUE);
+
+}
+
+void __load_progress_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("Progress = %f \n", *((double *)event_info));
+  app_data *ad = (app_data *) data;
+  int width;
+  evas_object_geometry_get (ad->main_window, NULL, NULL, &width, NULL);
+  evas_object_resize(ad->progress_bar, (*((double *)event_info))*width, 10);
+}
+
+void __load_error_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Error* error = (Ewk_Error*)event_info;
+  LOGD("ERROR URL : %s\n", ewk_error_url_get(error));
+  LOGD("ERROR DESCRIPTION : %s\n", ewk_error_description_get(error));
+
+  /*do nothing if user action aborts loading page which is not
+  considered as a fault, else display error description in webview*/
+  const char* errorDescription=ewk_error_description_get(error);
+  if( strcmp(errorDescription,"net::ERR_ABORTED") != 0 )
+  {
+    ewk_view_not_found_error_page_load(obj, ewk_error_url_get(error));
+  }
+}
+
+void __uri_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("URI is = %s \n", (const char *)event_info);
+  app_data *ad = (app_data*) data;
+  elm_object_text_set(ad->url_entry, (const char *)event_info);
+}
+
+void __title_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("Title is = %s \n", (const char *)event_info);
+}
+
+void __popup_close(app_data* ad)
+{
+  if (ad->popup) {
+    evas_object_focus_set(ad->webview, EINA_TRUE);
+    evas_object_hide(ad->popup);
+    evas_object_del(ad->popup);
+    ad->popup = NULL;
+    eina_stringshare_del(ad->popup_url);
+    ad->popup_url = NULL;
+  }
+}
+
+void __popup_open_url_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  app_data* ad = (app_data*)data;
+  ewk_view_url_set(ad->webview, ad->popup_url);
+  __popup_close(ad);
+}
+
+void __popup_cancel_url_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  app_data* ad = (app_data*)data;
+  __popup_close(ad);
+}
+
+void __policy_newwindow_decide_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  app_data* ad = (app_data*)data;
+
+  if (ad->popup) {
+    __popup_close(ad);
+  }
+
+  Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+  Evas_Object* popup = elm_popup_add(ad->main_window);
+  ad->popup_url = eina_stringshare_add(ewk_policy_decision_url_get(policy_decision));
+  gchar* title = g_strdup_printf("Do you want to open \"%s\" in current window", ad->popup_url);
+  elm_object_part_text_set(popup, "title,text", "New window request");
+  elm_object_text_set(popup, title);
+  g_free(title);
+
+  Evas_Object *open = elm_button_add(popup);
+  elm_object_text_set(open, "Open");
+  elm_object_part_content_set(popup, "button1", open);
+  evas_object_smart_callback_add(open, "clicked", __popup_open_url_cb, ad);
+
+  Evas_Object *cancel = elm_button_add(popup);
+  elm_object_text_set(cancel, "Cancel");
+  elm_object_part_content_set(popup, "button2", cancel);
+  evas_object_smart_callback_add(cancel, "clicked", __popup_cancel_url_cb, ad);
+
+  ad->popup = popup;
+  evas_object_show(popup);
+}
+
+void _geol_ok_cb (void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("geolocation permission granted");
+  app_data* ad = (app_data*)data;
+  ewk_geolocation_permission_request_set( ad->geolRequest, EINA_TRUE);
+  __popup_close(ad);
+}
+
+
+void _geol_cancel_cb (void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("geolocation restricted");
+  app_data* ad = (app_data*)data;
+  ewk_geolocation_permission_request_set( ad->geolRequest, EINA_FALSE);
+  __popup_close(ad);
+}
+
+void __geolocation_permission_request_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("geolocation request recieved");
+  app_data* ad = (app_data*)data;
+
+  if (ad->popup) {
+    __popup_close(ad);
+  }
+  Ewk_Geolocation_Permission_Request* permissionRequest=
+      (Ewk_Geolocation_Permission_Request*)event_info;
+  Evas_Object* popup = elm_popup_add(ad->main_window);
+  ewk_geolocation_permission_request_suspend(permissionRequest);
+  ad->geolRequest=permissionRequest;
+
+  elm_object_part_text_set(popup, "title,text", "Geolocation permission request");
+  elm_object_text_set(popup,"Do you want to allow this page to access geolocation data?");
+
+  Evas_Object *ok = elm_button_add(popup);
+  elm_object_text_set(ok, "ok");
+  elm_object_part_content_set(popup, "button1", ok);
+  evas_object_smart_callback_add(ok, "clicked", _geol_ok_cb, ad);
+
+  Evas_Object *cancel = elm_button_add(popup);
+  elm_object_text_set(cancel, "Cancel");
+  elm_object_part_content_set(popup, "button2", cancel);
+  evas_object_smart_callback_add(cancel, "clicked", _geol_cancel_cb, ad);
+  ad->popup = popup;
+  evas_object_show(popup);
+}
+
+// Callback for Allow button press for media request
+void _usermedia_ok_cb (void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_User_Media_Permission_Request* permissionRequest=
+      (Ewk_User_Media_Permission_Request*)event_info;
+  app_data* ad = (app_data*)data;
+  ewk_user_media_permission_request_set(ad->userMediaRequest,EINA_TRUE);
+    __popup_close(ad);
+}
+
+// Callback for Deny button press for media request
+void _usermedia_cancel_cb (void *data, Evas_Object *obj, void *event_info)
+{
+  app_data* ad = (app_data*)data;
+  Ewk_User_Media_Permission_Request* permissionRequest=
+      (Ewk_User_Media_Permission_Request*)event_info;
+  ewk_user_media_permission_request_set(ad->userMediaRequest,EINA_FALSE);
+  __popup_close(ad);
+}
+
+// Callback for showing permission request for media request
+void __usermedia_permission_request_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  app_data* ad = (app_data*)data;
+  if (ad->popup) {
+    __popup_close(ad);
+  }
+  Ewk_User_Media_Permission_Request* permissionRequest=
+      (Ewk_User_Media_Permission_Request*)event_info;
+  Evas_Object* popup = elm_popup_add(ad->main_window);
+  ewk_user_media_permission_request_suspend(permissionRequest);
+
+  ad->userMediaRequest=permissionRequest;
+  elm_object_part_text_set(popup, "title,text", "Media permission request");
+  elm_object_text_set(popup,"Do you want to allow this page to access Media Resources?");
+
+  Evas_Object *ok = elm_button_add(popup);
+  elm_object_text_set(ok, "ok");
+  elm_object_part_content_set(popup, "button1", ok);
+  evas_object_smart_callback_add(ok, "clicked", _usermedia_ok_cb, ad);
+
+  Evas_Object *cancel = elm_button_add(popup);
+  elm_object_text_set(cancel, "Cancel");
+  elm_object_part_content_set(popup, "button2", cancel);
+  evas_object_smart_callback_add(cancel, "clicked", _usermedia_cancel_cb, ad);
+  ad->popup = popup;
+  evas_object_show(popup);
+}
+
+void url_hit_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  LOGD("Send load request\n");
+  app_data *ad = (app_data*) data;
+  const char* url = elm_entry_entry_get( ad->url_entry );
+  set_url_from_user_input(ad->webview, url);
+  hide_imf_panel(ad);
+  evas_object_focus_set(ad->webview, EINA_TRUE);
+}
+
+#if defined(OS_TIZEN_TV)
+/* On Click to Urlbar need to move Toolbar top of SIP
+ * so that SIP and toolbar should not overlap
+ */
+void _url_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  app_data *ad = (app_data*) data;
+  elm_entry_input_panel_enabled_set(ad->url_entry, EINA_TRUE);
+  if( curr_focus == NULL )
+    curr_focus = evas_focus_get(ad->e);
+  evas_object_focus_set(curr_focus, EINA_TRUE);
+  Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->url_entry);
+  if (imf_context)
+  {
+    if(is_imf_shown == 0 && ecore_imf_context_input_panel_state_get(imf_context) != ECORE_IMF_INPUT_PANEL_STATE_SHOW)
+    {
+      is_imf_shown = 1;
+      int x, y, w, h;
+      int width, height;
+      evas_object_geometry_get (ad->bg_tool_box, NULL, NULL, &width, &height);
+      ecore_imf_context_input_panel_geometry_get (imf_context, &x, &y, &w, &h);
+      //evas_object_resize(ad->webview, width, IMF_START_POINT_Y  - TOOL_BOX_HEIGHT); //To resize webview size above toolbar
+      evas_object_move(ad->bg_tool_box, 0, IMF_START_POINT_Y - TOOL_BOX_HEIGHT);
+      evas_object_show(ad->bg_tool_box);
+      evas_object_move(ad->tool_box, 0, IMF_START_POINT_Y - TOOL_BOX_HEIGHT);
+      elm_entry_input_panel_show(ad->url_entry);
+    }
+  }
+}
+#endif
+
+void _imf_panel_state_cb (void *data, Ecore_IMF_Context *ctx, int value)
+{
+  LOGD("_imf_panel_state_cb show\n");
+  app_data *ad = (app_data*) data;
+  int x=0, y=0, w=0, h=0;
+  if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
+  {
+    LOGD("Keypad Up\n");
+    ecore_imf_context_input_panel_geometry_get (ctx, &x, &y, &w, &h);
+    evas_object_move(ad->bg_tool_box, 0, y - TOOL_BOX_HEIGHT);
+    evas_object_show(ad->bg_tool_box);
+    evas_object_move(ad->tool_box, 0, y - TOOL_BOX_HEIGHT);
+    is_imf_shown = 1;
+  }
+  else if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE)
+  {
+    LOGD("Keypad down\n");
+    evas_object_geometry_get(ad->main_window, NULL, NULL, &w, &h);
+    evas_object_move(ad->tool_box, 0, h - TOOL_BOX_HEIGHT);
+    evas_object_hide(ad->bg_tool_box);
+  }
+}
+
+void hide_imf_panel(app_data* data)
+{
+  #if defined(OS_TIZEN_TV)
+/* On SIP close, Toolbar bring back to original position*/
+  if (is_imf_shown == 1)
+  {
+    int width, height;
+    ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+    //evas_object_resize(data->webview, width, height - TOOL_BOX_HEIGHT);
+    evas_object_move(data->bg_tool_box, 0, height - TOOL_BOX_HEIGHT);
+    evas_object_show(data->bg_tool_box);
+    evas_object_move(data->tool_box, 0, height - TOOL_BOX_HEIGHT);
+    evas_object_focus_set(curr_focus, EINA_FALSE);
+    elm_entry_input_panel_hide(data->url_entry);
+    evas_object_focus_set(data->webview, EINA_TRUE);
+    is_imf_shown = 0;
+  }
+  #else
+  evas_object_focus_set(data->url_entry, EINA_FALSE);
+  elm_entry_input_panel_hide(data->url_entry);
+  is_imf_shown = 0;
+  #endif
+}
+
+void _back_btn_cb(void *data, Evas_Object *btn, void *ev)
+{
+  LOGD("Previous Page\n");
+  app_data *ad = (app_data*) data;
+  ewk_view_back(ad->webview);
+  hide_imf_panel(ad);
+}
+
+void _next_btn_cb(void *data, Evas_Object *btn, void *ev)
+{
+  LOGD("Next Page\n");
+  app_data *ad = (app_data*) data;
+  ewk_view_forward(ad->webview);
+  hide_imf_panel(ad);
+}
+
+void _reload_btn_cb(void *data, Evas_Object *btn, void *ev)
+{
+  LOGD("Reoading\n");
+  app_data *ad = (app_data*) data;
+  ewk_view_reload(ad->webview);
+  hide_imf_panel(ad);
+}
+
+void _stop_btn_cb(void *data, Evas_Object *btn, void *ev)
+{
+  LOGD("Stopping\n");
+  app_data *ad = (app_data*) data;
+  ewk_view_stop(ad->webview);
+  hide_imf_panel(ad);
+}
+
+void __policy_response_decide_cb(void *data, Evas_Object *obj, void *ev)
+{
+  LOGD(" callback called __policy_response_decide_cb \n");
+  Ewk_Policy_Decision *policy_decision = (Ewk_Policy_Decision *)ev;
+  Ewk_Policy_Decision_Type policy_type = ewk_policy_decision_type_get(policy_decision);
+  const char *uri = ewk_policy_decision_url_get(policy_decision);
+  const char *cookie = ewk_policy_decision_cookie_get(policy_decision);
+  const char *mime = ewk_policy_decision_response_mime_get(policy_decision);
+  LOGD(" URL : %s\n", uri);
+  LOGD(" cookie : %s\n", cookie);
+  LOGD(" mime type : %s\n", mime);
+  LOGD(" policy type : %d\n", policy_type);
+  ewk_policy_decision_use(policy_decision);
+}
+
+void __navigation_policy_decide_cb(void *data, Evas_Object *obj, void *ev)
+{
+  Ewk_Policy_Decision* decision = (Ewk_Policy_Decision*)ev;
+  LOGD(" callback called __navigation_policy_decide_cb \n");
+  LOGD("URL: %s\n", ewk_policy_decision_url_get(decision));
+  LOGD("Navigation type: %d", ewk_policy_decision_navigation_type_get(decision));
+  // we only set USE
+  // download needs to be handled and ignore wont have any visible difference.
+  LOGD("Decision: USE\n");
+  ewk_policy_decision_use(decision);
+}
+
+#ifdef OS_TIZEN
+void _back_hard_key_cb(void *data, Evas_Object *btn, void *ev)
+{
+  app_data *ad = (app_data*) data;
+
+  if (ad->popup) {
+    __popup_close(ad);
+    return;
+  }
+#if defined(OS_TIZEN_TV)
+  /* SIP in TV has dedicated Close button but in Mobile Backkey is used as Close
+   * For TV, On SIP Close Press only Hide IMF, Don't allow Navigation Back
+   * Navigation back is handled seperatly for Backkey Event, where as
+   * For Mobile, Backkey is used as SIP Close button and Navigation Back
+   */
+  hide_imf_panel(ad);
+#else
+  if (is_imf_shown)
+    evas_object_focus_set(ad->webview, EINA_TRUE);
+#endif
+}
+#endif
+
+
+context_menu_type get_menu_type(app_data *data, Ewk_Context_Menu *menu)
+{
+  //RETV_MSG_IF(!menu, UNKNOWN_MENU, "menu is NULL");
+
+  unsigned short count = ewk_context_menu_item_count(menu);
+  Eina_Bool text = EINA_FALSE;
+  Eina_Bool link = EINA_FALSE;
+  Eina_Bool image = EINA_FALSE;
+  Eina_Bool email_address = EINA_FALSE;
+  Eina_Bool call_number = EINA_FALSE;
+  Eina_Bool selection_mode = EINA_FALSE;
+
+  unsigned short i = 0;
+  for (i = 0 ; i < count ; i++) {
+    Ewk_Context_Menu_Item *item = ewk_context_menu_nth_item_get(menu, i);
+    Ewk_Context_Menu_Item_Tag tag = ewk_context_menu_item_tag_get(item);
+    const char *link_url = ewk_context_menu_item_link_url_get(item);
+//BROWSER_LOGD("tag=%d", tag);
+
+    if (link_url && !strncmp(mailto_scheme, link_url, strlen(mailto_scheme)))
+      email_address = EINA_TRUE;
+    if (link_url && !strncmp(tel_scheme, link_url, strlen(tel_scheme)))
+      call_number = EINA_TRUE;
+    if (tag == EWK_CONTEXT_MENU_ITEM_TAG_TEXT_SELECTION_MODE)
+      selection_mode = EINA_TRUE;
+    if (tag == EWK_CONTEXT_MENU_ITEM_TAG_CLIPBOARD)
+      return INPUT_FIELD;
+    if (tag == EWK_CONTEXT_MENU_ITEM_TAG_SEARCH_WEB)
+      text = EINA_TRUE;
+    if (tag == EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW)
+      link = EINA_TRUE;
+    if (tag == EWK_CONTEXT_MENU_ITEM_TAG_COPY_IMAGE_TO_CLIPBOARD)
+      image = EINA_TRUE;
+  }
+
+  if (email_address && selection_mode)
+          return EMAIL_SCHEME;
+  if (call_number && selection_mode)
+          return TEL_SCHEME;
+  if (text && !link)
+          return TEXT_ONLY;
+  if (link && !image)
+          return TEXT_LINK;
+  if (image && !link)
+          return IMAGE_ONLY;
+  if (image && link)
+          return IMAGE_LINK;
+
+  return UNKNOWN_MENU;
+}
+
+
+void __customize_context_menu_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  app_data * ad = (app_data*)data;
+  Ewk_Context_Menu *menu = (Ewk_Context_Menu*)event_info;
+  context_menu_type menu_type = get_menu_type(ad, menu);
+
+  if (menu_type == UNKNOWN_MENU || menu_type == INPUT_FIELD)
+    return;
+
+  switch (menu_type) {
+    case TEXT_ONLY:
+      show_context_menu_text_only(ad, menu);
+    break;
+
+    case TEXT_LINK:
+      show_context_menu_text_link(ad, menu);
+    break;
+
+    case IMAGE_ONLY:
+      show_context_menu_image_only(ad, menu);
+    break;
+
+    case IMAGE_LINK:
+      show_context_menu_image_link(ad, menu);
+    break;
+
+    case EMAIL_SCHEME:
+      show_context_menu_email_address(ad, menu);
+    break;
+
+    case TEL_SCHEME:
+      show_context_menu_call_number(ad, menu);
+    break;
+
+    default:
+      return;
+    break;
+  }
+}
+
+void __customize_context_menu_item_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+  Ewk_Context_Menu_Item* item = (Ewk_Context_Menu_Item*)event_info;
+
+  switch (ewk_context_menu_item_tag_get(item)) {
+    case EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW:
+      break;
+    default:
+      break;
+  }
+}
+
+void show_context_menu_text_only(app_data *data, Ewk_Context_Menu *menu)
+{
+  unsigned short count = ewk_context_menu_item_count(menu);
+  //RET_MSG_IF(count == 0, "There is no context menu for text only");
+
+  app_data * ad = (app_data*)data;
+  const char *selected_text = ewk_view_text_selection_text_get(ad->webview);
+  Eina_Bool text_selected = EINA_FALSE;
+  if (selected_text && strlen(selected_text) > 0)
+    text_selected = EINA_TRUE;
+
+  Ewk_Context_Menu_Item_Tag *original_ctx_item = NULL;
+  original_ctx_item = (Ewk_Context_Menu_Item_Tag *)malloc(sizeof(Ewk_Context_Menu_Item_Tag) * count);
+  //RET_MSG_IF(original_ctx_item == NULL, "Failed to allocate memory for ctx menu reordering");
+
+  memset(original_ctx_item, 0x00, sizeof(Ewk_Context_Menu_Item_Tag) * count);
+
+  unsigned short i=0;
+  for (i = 0 ; i < count ; i++) {
+    Ewk_Context_Menu_Item *item = ewk_context_menu_nth_item_get(menu, 0);
+    Ewk_Context_Menu_Item_Tag tag = ewk_context_menu_item_tag_get(item);
+
+    original_ctx_item[i] = tag;
+    ewk_context_menu_item_remove(menu, item);
+  }
+
+  /* Select all */
+  for (i = 0 ; i < count ; i++) {
+    if (original_ctx_item[i] == EWK_CONTEXT_MENU_ITEM_TAG_SELECT_ALL) {
+            ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_SELECT_ALL, BR_STRING_CTXMENU_SELECT_ALL, true);
+            break;
+    }
+  }
+
+  /* Copy */
+  if (text_selected == EINA_TRUE) {
+    for (i = 0 ; i < count ; i++) {
+            if (original_ctx_item[i] == EWK_CONTEXT_MENU_ITEM_TAG_COPY) {
+                    ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_COPY, BR_STRING_CTXMENU_COPY, true);
+                    break;
+            }
+    }
+  }
+
+  /*
+  // Share 
+  if (text_selected == EINA_TRUE)
+    ewk_context_menu_item_append(menu, CUSTOM_CONTEXT_MENU_ITEM_SHARE, BR_STRING_SHARE, browser_img_dir"/I01_ctx_popup_icon_share.png", true);
+
+
+  // Search
+  if (text_selected == EINA_TRUE) {
+    for (i = 0 ; i < count ; i++) {
+            if (original_ctx_item[i] == EWK_CONTEXT_MENU_ITEM_TAG_SEARCH_WEB) {
+                    ewk_context_menu_item_append(menu, CUSTOM_CONTEXT_MENU_ITEM_SEARCH, BR_STRING_CTXMENU_WEB_SEARCH, browser_img_dir"/I01_ctx_popup_icon_web_search.png", true);
+                    break;
+            }
+    }
+  }
+
+  // Translator
+  if (text_selected == EINA_TRUE) {
+    for (i = 0 ; i < count ; i++) {
+            if (original_ctx_item[i] == EWK_CONTEXT_MENU_ITEM_TAG_TRANSLATE) {
+                    ewk_context_menu_item_append(menu, EWK_CONTEXT_MENU_ITEM_TAG_TRANSLATE, BR_STRING_CTXMENU_TRANSLATE, browser_img_dir"/I01_ctx_popup_icon_translate.png", true);
+                    break;
+            }
+    }
+  }
+  */
+
+  free(original_ctx_item);
+}
+
+void show_context_menu_text_link(app_data *data, Ewk_Context_Menu *menu)
+{
+  /*
+  ewk_context_menu_item_append_as_action(context_menu, EWK_CONTEXT_MENU_ITEM_TAG_GO_BACK, "Back", 1);
+  ewk_context_menu_item_append_as_action(context_menu, EWK_CONTEXT_MENU_ITEM_TAG_GO_FORWARD, "Forward", 1);
+  ewk_context_menu_item_append_as_action(context_menu, EWK_CONTEXT_MENU_ITEM_TAG_RELOAD, "Reload", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_APPLICATION_BACK_FORWAD_CLEAR, "Bk_fwd_clear", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_APPLICATION_CACHE_RUN, "Run App Cache Test", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_APPLICATION_CACHE_DELETE_ALL, "Delete All App Cache", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_GRAB_SNAPSHOT, "Take Snapshot", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_WEB_DATABASE_GET_ORIGINS, "Get WebDB", 1);
+  ewk_context_menu_item_append_as_action(context_menu, FOR_TEST_WEB_DATABASE_DELETE_ALL, "Clear WebDB", 1);
+  */
+
+}
+
+void show_context_menu_image_only(app_data *data, Ewk_Context_Menu *menu)
+{
+
+
+}
+
+void show_context_menu_image_link(app_data *data, Ewk_Context_Menu *menu)
+{
+
+}
+
+void show_context_menu_email_address(app_data *data, Ewk_Context_Menu *menu)
+{
+}
+
+void show_context_menu_call_number(app_data *data, Ewk_Context_Menu *menu)
+{
+}
+
+
+void enable_customize_contextmenu(app_data *data, Eina_Bool enable)
+{
+  if (enable) {
+    evas_object_smart_callback_add(data->webview, "contextmenu,customize", __customize_context_menu_cb, data);
+    evas_object_smart_callback_add(data->webview, "contextmenu,selected", __customize_context_menu_item_selected_cb, data);
+  } else {
+    evas_object_smart_callback_del(data->webview, "contextmenu,customize", __customize_context_menu_cb);
+    evas_object_smart_callback_del(data->webview, "contextmenu,selected", __customize_context_menu_item_selected_cb);
+  }
+}
+
+//  Added to Support Javascript popup
+Eina_Bool __javascript_alert_cb(Evas_Object* o, const char* alert_text, void* user_data)
+{
+  return EINA_TRUE;
+}
+
+Eina_Bool __javascript_confirm_cb(Evas_Object* o, const char* message, void* user_data)
+{
+  return EINA_TRUE;
+}
+
+Eina_Bool __javascript_prompt_cb(Evas_Object* o, const char* message, const char* default_value, void* user_data)
+{
+  return EINA_TRUE;
+}
+
+#if defined(OS_TIZEN_MOBILE)
+// To support vibration: this is a timeout callback.
+// The original source code author is kinipk.
+Eina_Bool __vibration_timeout_cb(void *data)
+{
+  s_haptic_timer_id = NULL;
+  if (s_haptic_handle) {
+    haptic_stop_effect(s_haptic_handle, s_haptic_effect);
+    haptic_close(s_haptic_handle);
+    s_haptic_handle = NULL;
+  }
+
+  return ECORE_CALLBACK_CANCEL;
+}
+
+// To support vibration: @see |ewk_context_vibration_client_callbacks_set|, also.
+// The original source code author is kinipk.
+void __vibration_on_cb(uint64_t vibration_time, void *data)
+{
+  printf("[%s][%d][%s] called\n", __FUNCTION__, __LINE__, "vibration");
+  uint64_t duration = vibration_time;
+
+  if (s_haptic_timer_id) {
+    ecore_timer_del(s_haptic_timer_id);
+    s_haptic_timer_id = NULL;
+  }
+
+  if (s_haptic_handle) {
+    haptic_stop_effect(s_haptic_handle, s_haptic_effect);
+    haptic_close(s_haptic_handle);
+    s_haptic_handle = NULL;
+  }
+
+  if (haptic_open(HAPTIC_DEVICE_0, &s_haptic_handle) != HAPTIC_ERROR_NONE) {
+    printf("[%s][%d][%s] ERROR: __vibration_on_cb:haptic_open failed\n", __FUNCTION__, __LINE__, "vibration");
+    return;
+  }
+
+  haptic_vibrate_monotone(s_haptic_handle, duration, &s_haptic_effect);
+  double in = (double)((double)(duration) / (double)(1000));
+  printf("[%s][%d][%s] __vibration_on_cb:duration=%f\n", __FUNCTION__, __LINE__, "vibration", in);
+
+  s_haptic_timer_id = ecore_timer_add(in, __vibration_timeout_cb, NULL);
+}
+
+// To support vibration: @see |ewk_context_vibration_client_callbacks_set|, also.
+// The original source code author is kinipk.
+void __vibration_off_cb(void *data)
+{
+  printf("[%s][%d][%s] called\n", __FUNCTION__, __LINE__, "vibration");
+  if (s_haptic_timer_id) {
+    ecore_timer_del(s_haptic_timer_id);
+    s_haptic_timer_id = NULL;
+  }
+
+  if (s_haptic_handle) {
+    haptic_stop_effect(s_haptic_handle, s_haptic_effect);
+    haptic_close(s_haptic_handle);
+    s_haptic_handle = NULL;
+  }
+}
+
+#endif // #if caluse of #if defined(OS_TIZEN_MOBILE)...
diff --git a/tizen_src/ewk/efl_webview_app/org.tizen.chromium-ewk.xml b/tizen_src/ewk/efl_webview_app/org.tizen.chromium-ewk.xml
new file mode 100644 (file)
index 0000000..e0d384d
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.chromium-ewk" version="34.1847.76.35">
+    <label> mini browser application for chromium-ewk package </label>
+    <author href="www.samsung.com" email="sns.park@samsung.com">SWC</author>
+    <description> mini browser application based on chromium-efl </description>
+    <ui-application appid="org.tizen.chromium-ewk" exec="/usr/bin/mini_browser" nodisplay="false" multiple="false" type="capp" taskmanage="true">
+        <icon>/usr/share/icons/mini-browser.png</icon>
+        <label>Chromium-efl MiniBrowser</label>
+        <label xml:lang="en-us">Chromium-efl MiniBrowser</label>
+    </ui-application>
+</manifest>
diff --git a/tizen_src/ewk/org.tizen.chromium-ewktest.manifest b/tizen_src/ewk/org.tizen.chromium-ewktest.manifest
new file mode 100644 (file)
index 0000000..17d5396
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+  <request>
+    <domain name="chromium-efl"/>
+  </request>
+</manifest>
diff --git a/tizen_src/ewk/packaging/S_TRUNK_OWNERS b/tizen_src/ewk/packaging/S_TRUNK_OWNERS
new file mode 100644 (file)
index 0000000..17d3e34
--- /dev/null
@@ -0,0 +1,5 @@
+djmix.kim@samsung.com
+j.majnert@samsung.com
+p.grad@samsung.com
+t.olszak@samsung.com
+youngbok.yoon@samsung.com
diff --git a/tizen_src/ewk/packaging/chromium-ewk.spec b/tizen_src/ewk/packaging/chromium-ewk.spec
new file mode 100755 (executable)
index 0000000..c2d2892
--- /dev/null
@@ -0,0 +1,153 @@
+Name: org.tizen.chromium-ewk
+Summary: EWK Api based on Chromium EFL
+%define ChromiumVersion 34.1847.76
+%define Week 35
+Version: %{ChromiumVersion}.%{Week}
+Release: 1
+Group: Applications/Internet
+License: LGPLv2.1 or BSD
+Source0: %{name}-%{version}.tar.gz
+Source1: org.tizen.chromium-ewk.manifest
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+BuildRequires: cmake
+BuildRequires: pkgconfig(glesv2)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(eina)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(ecore-evas)
+BuildRequires: pkgconfig(ecore-imf)
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(libdri2)
+BuildRequires: pkgconfig(libtbm)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(chromium-efl)
+%if %{!?TIZEN_PROFILE_TV:1}%{?TIZEN_PROFILE_TV:0}
+BuildRequires: pkgconfig(haptic)
+BuildRequires: pkgconfig(efl-assist)
+%endif
+%if 0%{?build_ewk_unittest}
+BuildRequires: glib2
+BuildRequires: glib2-devel
+BuildRequires: efl-assist
+BuildRequires: efl-assist-devel
+BuildRequires: edje
+BuildRequires: edje-devel
+BuildRequires: elementary
+BuildRequires: elementary-devel
+BuildRequires: cmake
+BuildRequires: gtest
+BuildRequires: gtest-devel
+BuildRequires: isf
+BuildRequires: isf-devel
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(isf)
+%endif
+
+
+%description
+EFL API for embedding chromium-efl blink engine port.
+
+%package devel
+Summary: Chromium EWK
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+%description devel
+EFL API for embedding chromium-efl blink engine port. (developement files)
+
+%if 0%{?build_ewk_unittest}
+%package unittest
+Summary: Chromium EWK unittests
+Group: Development/UnitTests
+Requires: %{name} = %{version}-%{release}
+%description unittest
+Chromium EFL unit test utilities
+%endif
+
+%prep
+%setup -q
+
+%build
+
+export CMAKE_EXTRA_ARGS="-DBINDIR=%{_bindir} -DLIBDIR=%{_libdir} \
+                         -DDATADIR=%{_datadir} -DINCLUDEDIR=%{_includedir}
+                         "
+# architecture related configuration + neon temporary workaround
+%ifarch %{arm}
+  export CFLAGS="$(echo $CFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
+  export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
+  export FFLAGS="$(echo $FFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
+%endif
+
+%if %{!?TIZEN_PROFILE_TV:1}%{?TIZEN_PROFILE_TV:0}
+%define OUTPUT_BUILD_PROFILE_TARGET mobile
+%else
+%define OUTPUT_BUILD_PROFILE_TARGET tv
+%endif
+
+%if 0%{?build_ewk_unittest}
+  export CMAKE_EXTRA_ARGS+="-DBUILD_EWK_UNITTEST=1"
+%endif
+
+%if 0%{?_debug_mode}
+%global OUTPUT_FOLDER out.%{OUTPUT_BUILD_PROFILE_TARGET}.${RPM_ARCH}/Debug
+BUILD_TYPE=debug
+%else
+%global OUTPUT_FOLDER out.%{OUTPUT_BUILD_PROFILE_TARGET}.${RPM_ARCH}/Release
+BUILD_TYPE=release
+%endif
+
+build/build.sh %{OUTPUT_BUILD_PROFILE_TARGET} ${BUILD_TYPE}
+
+make %{_smp_mflags} -C "%{OUTPUT_FOLDER}"
+
+%install
+make -C "%{OUTPUT_FOLDER}" DESTDIR="%{buildroot}" install
+
+install -d "%{buildroot}/%{_sysconfdir}"/smack/accesses2.d/
+install -m 0644 %{SOURCE1} "%{buildroot}/usr/share"
+
+%if 0%{?build_ewk_unittest}
+mkdir -p %{buildroot}/opt/usr/resources/
+mkdir -p %{buildroot}/opt/usr/utc_exec/
+cp -r unittest/resources/* %{buildroot}/opt/usr/resources/
+cp "%{OUTPUT_FOLDER}"/utc_exec/* %{buildroot}/opt/usr/utc_exec/
+cp utc_gtest_run.sh %{buildroot}/opt/usr/utc_exec/
+chmod +x %{buildroot}/opt/usr/utc_exec/utc_gtest_run.sh
+%endif
+
+%post
+# apply smack rule
+smack_reload.sh
+
+%postun
+
+%files
+%manifest /usr/share/org.tizen.chromium-ewk.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libchromium-ewk.so
+%{_bindir}/efl_webview_app
+%{_bindir}/mini_browser
+%{_datadir}/packages/%{name}.xml
+%{_datadir}/icons/mini-browser.png
+
+%files devel
+%defattr(644,root,root,-)
+%{_includedir}/chromium-ewk/*.h
+%{_libdir}/pkgconfig/*.pc
+
+%if 0%{?build_ewk_unittest}
+%files unittest
+%defattr(-,root,root,-)
+%manifest org.tizen.chromium-ewktest.manifest
+/opt/usr/utc_exec/*
+/opt/usr/resources/*
+%endif
diff --git a/tizen_src/ewk/packaging/manifest.xml b/tizen_src/ewk/packaging/manifest.xml
new file mode 100644 (file)
index 0000000..58ccfc6
--- /dev/null
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+    <Id>kmcele1k1p</Id>
+    <Version>34.1847.76.35</Version>
+    <Type>C++App</Type>
+    <Descriptions>
+        <Description Locale="eng-PH"/>
+        <Description Locale="zho-SG"/>
+        <Description Locale="kat-GE"/>
+        <Description Locale="est-EE"/>
+        <Description Locale="ukr-UA"/>
+        <Description Locale="srp-RS"/>
+        <Description Locale="hrv-HR"/>
+        <Description Locale="isl-IS"/>
+        <Description Locale="ell-GR"/>
+        <Description Locale="glg-ES"/>
+        <Description Locale="lit-LT"/>
+        <Description Locale="aze-AZ"/>
+        <Description Locale="eng-US"/>
+        <Description Locale="mkd-MK"/>
+        <Description Locale="zho-HK"/>
+        <Description Locale="hye-AM"/>
+        <Description Locale="hun-HU"/>
+        <Description Locale="slk-SK"/>
+        <Description Locale="ces-CZ"/>
+        <Description Locale="fin-FI"/>
+        <Description Locale="ara-AE"/>
+        <Description Locale="ita-IT"/>
+        <Description Locale="eus-ES"/>
+        <Description Locale="tur-TR"/>
+        <Description Locale="rus-RU"/>
+        <Description Locale="cat-ES"/>
+        <Description Locale="kaz-KZ"/>
+        <Description Locale="deu-DE"/>
+        <Description Locale="zho-CN"/>
+        <Description Locale="por-PT"/>
+        <Description Locale="slv-SI"/>
+        <Description Locale="fra-FR"/>
+        <Description Locale="ron-RO"/>
+        <Description Locale="hin-IN"/>
+        <Description Locale="fra-CA"/>
+        <Description Locale="spa-ES"/>
+        <Description Locale="nld-NL"/>
+        <Description Locale="dan-DK"/>
+        <Description Locale="por-BR"/>
+        <Description Locale="bul-BG"/>
+        <Description Locale="zho-TW"/>
+        <Description Locale="jpn-JP"/>
+        <Description Locale="swe-SE"/>
+        <Description Locale="kor-KR"/>
+        <Description Locale="spa-MX"/>
+        <Description Locale="nob-NO"/>
+        <Description Locale="uzb-UZ"/>
+        <Description Locale="pol-PL"/>
+        <Description Locale="gle-IE"/>
+        <Description Locale="eng-GB"/>
+        <Description Locale="lav-LV"/>
+    </Descriptions>
+    <Url/>
+    <Requirements>
+        <Feature Name="http://tizen.org/feature/platform.core.cpu.arch">x86</Feature>
+        <Feature Name="http://tizen.org/feature/platform.core.fpu.arch">vfpv3</Feature>
+    </Requirements>
+    <Apps>
+        <ApiVersion>2.0</ApiVersion>
+        <Privileges>
+            <Privilege>http://tizen.org/privilege/web.privacy</Privilege>
+            <Privilege>http://tizen.org/privilege/web.service</Privilege>
+            <Privilege>http://tizen.org/privilege/alarm</Privilege>
+            <Privilege>http://tizen.org/privilege/application.launch</Privilege>
+            <Privilege>http://tizen.org/privilege/power</Privilege>
+            <Privilege>http://tizen.org/privilege/appmanager.launch</Privilege>
+            <Privilege>http://tizen.org/privilege/content.write</Privilege>
+        </Privileges>
+        <UiApp HwAcceleration="On" Main="True" MenuIconVisible="True" Name="content_shell">
+            <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+            <UiTheme SystemTheme="White"/>
+            <DisplayNames>
+                <DisplayName Locale="eng-PH">Internet</DisplayName>
+                <DisplayName Locale="zho-SG">网络</DisplayName>
+                <DisplayName Locale="kat-GE">ინტერნეტი</DisplayName>
+                <DisplayName Locale="est-EE">Internet</DisplayName>
+                <DisplayName Locale="ukr-UA">Браузер</DisplayName>
+                <DisplayName Locale="srp-RS">Internet</DisplayName>
+                <DisplayName Locale="hrv-HR">Internet</DisplayName>
+                <DisplayName Locale="isl-IS">Internetið</DisplayName>
+                <DisplayName Locale="ell-GR">Internet</DisplayName>
+                <DisplayName Locale="glg-ES">Internet</DisplayName>
+                <DisplayName Locale="lit-LT">Internetas</DisplayName>
+                <DisplayName Locale="aze-AZ">Internet</DisplayName>
+                <DisplayName Locale="eng-US">Internet</DisplayName>
+                <DisplayName Locale="mkd-MK">Интернет</DisplayName>
+                <DisplayName Locale="zho-HK">瀏覽器</DisplayName>
+                <DisplayName Locale="slk-SK">Internet</DisplayName>
+                <DisplayName Locale="hun-HU">Internet</DisplayName>
+                <DisplayName Locale="hye-AM">Ինտերնետ</DisplayName>
+                <DisplayName Locale="ces-CZ">Internet</DisplayName>
+                <DisplayName Locale="fin-FI">Internet</DisplayName>
+                <DisplayName Locale="ara-AE">الإنترنت</DisplayName>
+                <DisplayName Locale="eus-ES">Internet</DisplayName>
+                <DisplayName Locale="ita-IT">Internet</DisplayName>
+                <DisplayName Locale="tur-TR">İnternet</DisplayName>
+                <DisplayName Locale="rus-RU">Интернет</DisplayName>
+                <DisplayName Locale="cat-ES">Internet</DisplayName>
+                <DisplayName Locale="kaz-KZ">Шолушы</DisplayName>
+                <DisplayName Locale="deu-DE">Internet</DisplayName>
+                <DisplayName Locale="zho-CN">互联网</DisplayName>
+                <DisplayName Locale="por-PT">Internet</DisplayName>
+                <DisplayName Locale="slv-SI">Internet</DisplayName>
+                <DisplayName Locale="fra-FR">Internet</DisplayName>
+                <DisplayName Locale="ron-RO">Internet</DisplayName>
+                <DisplayName Locale="hin-IN">इंटरनेट</DisplayName>
+                <DisplayName Locale="fra-CA">Internet</DisplayName>
+                <DisplayName Locale="spa-ES">Internet</DisplayName>
+                <DisplayName Locale="nld-NL">Internet</DisplayName>
+                <DisplayName Locale="dan-DK">Internet</DisplayName>
+                <DisplayName Locale="por-BR">Internet</DisplayName>
+                <DisplayName Locale="bul-BG">Интернет</DisplayName>
+                <DisplayName Locale="zho-TW">網際網路</DisplayName>
+                <DisplayName Locale="jpn-JP">インターネット</DisplayName>
+                <DisplayName Locale="swe-SE">Internet</DisplayName>
+                <DisplayName Locale="kor-KR">인터넷</DisplayName>
+                <DisplayName Locale="spa-MX">Internet</DisplayName>
+                <DisplayName Locale="nob-NO">Internett</DisplayName>
+                <DisplayName Locale="uzb-UZ">Internet</DisplayName>
+                <DisplayName Locale="pol-PL">Internet</DisplayName>
+                <DisplayName Locale="gle-IE">an tIdirlíon</DisplayName>
+                <DisplayName Locale="lav-LV">Internets</DisplayName>
+                <DisplayName Locale="eng-GB">Internet</DisplayName>
+            </DisplayNames>
+            <Icons>
+                <Icon Section="MainMenu" Type="Xhigh">mini-browser.png</Icon>
+            </Icons>
+            <AppControls>
+                <AppControl>
+                    <Operation>http://tizen.org/appcontrol/operation/view</Operation>
+                    <Uri>file</Uri>
+                    <Uri>http</Uri>
+                    <Uri>https</Uri>
+                    <Uri>javascript</Uri>
+                </AppControl>
+                <AppControl>
+                    <MimeType>application/xml</MimeType>
+                    <MimeType>image/svg+xml</MimeType>
+                    <MimeType>text/html</MimeType>
+                    <Operation>http://tizen.org/appcontrol/operation/view</Operation>
+                </AppControl>
+            </AppControls>
+            <LaunchConditions/>
+            <Notifications>
+                <Notification Name="Ticker">On</Notification>
+                <Notification Name="Sound">On</Notification>
+                <Notification Name="Contents">Off</Notification>
+                <Notification Name="Badge">On</Notification>
+            </Notifications>
+        </UiApp>
+    </Apps>
+</Manifest>
diff --git a/tizen_src/ewk/packaging/org.tizen.chromium-ewk.manifest b/tizen_src/ewk/packaging/org.tizen.chromium-ewk.manifest
new file mode 100644 (file)
index 0000000..121b2c6
--- /dev/null
@@ -0,0 +1,11 @@
+<manifest>
+  <assign>
+    <filesystem path="/usr/lib/libchromium-ewk.so" label="_" />
+    <filesystem path="/usr/share/icons/mini-browser.png" label="_" />
+    <filesystem path="/usr/bin/efl_webview_app" label="chromium-efl" exec_label="chromium-efl"/>
+    <filesystem path="/usr/bin/mini_browser" label="chromium-efl" exec_label="chromium-efl"/>
+  </assign>
+  <request>
+    <domain name="chromium-efl"/>
+  </request>
+</manifest>
diff --git a/tizen_src/ewk/resultToHtml.xsl b/tizen_src/ewk/resultToHtml.xsl
new file mode 100755 (executable)
index 0000000..83c7ca3
--- /dev/null
@@ -0,0 +1,148 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template match="testsuites">
+    <html>
+      <head>
+        <title> gTest Report - <xsl:value-of select="@name"/> </title>
+      </head>
+
+      <body bgcolor="#e0e0f0">
+        <div align="center">
+          <h3 style="border: #008fd5 3px solid">
+            <b> gTest Report - <xsl:value-of select="@name"/> </b>
+           </h3>
+        </div>
+
+        <table cols="5" width="90%" align="center">
+          <tr bgcolor="#9573bd">
+            <td colspan="5">
+              <strong>Unit-test Summary</strong>
+            </td>
+          </tr>
+
+          <tr bgcolor="#f0e0f0" >
+            <td width="30%" style="background-color: #32cd32"> Success APIs </td>
+            <td width="20%" style="background-color: #32cd32"> <xsl:value-of select="@successAPIs"/> </td>
+            <td width="50%" style="background-color: #32cd32"> success  : <xsl:value-of select="@success"/> </td>
+          </tr>
+          <tr bgcolor="#f0e0f0" >
+            <td width="30%" style="background-color: #ff9090"> Failure APIs </td>
+            <td width="20%" style="background-color: #ff9090"> <xsl:value-of select="@failureAPIs"/> </td>
+            <td width="50%" style="background-color: #ff9090"> failures : <xsl:value-of select="@failures"/>, disabled : <xsl:value-of select="@disabled"/>, errors : <xsl:value-of select="@errors"/> </td>
+          </tr>
+          <tr bgcolor="#f0e0f0" >
+            <td width="30%" style="background-color: #ba8759"> Total APIs </td>
+            <td width="20%" style="background-color: #ba8759"> <xsl:value-of select="@testAPIs"/> </td>
+            <td width="50%" style="background-color: #ba8759"> total tests : <xsl:value-of select="@tests"/>, time : <xsl:value-of select="@time"/> sec </td>
+          </tr>
+
+            <tr>
+              <td colspan="4" style="background-color: #e0e0f0">
+                <P></P>
+            </td>
+          </tr>
+        </table>
+
+        <hr align="center" width="90%" color="maroon" />
+
+        <table cols="4" width="90%" align="center">
+          <tr>
+            <td colspan="4" style="background-color: #e0e0f0">
+              <P></P>
+            </td>
+          </tr>
+          <tr bgcolor="#9573bd">
+            <td colspan="4"><strong>Result Details</strong></td>
+          </tr>
+          <tr>
+            <td width="25%"> </td>
+            <td width="25%"> </td>
+            <td width="25%"> </td>
+            <td width="25%"> </td>
+           </tr>
+          <xsl:apply-templates/>
+         </table>
+        <p/>
+         <hr align="center" width="90%" color="maroon" />
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="testsuite">
+    <tr>
+      <td colspan="4" style="background-color: #e0e0f0">
+        <P></P>
+      </td>
+    </tr>
+    <tr bgcolor="#8db0d1">
+      <td colspan="2">
+        Test API
+      </td>
+      <td colspan="1">
+        Test type
+      </td>
+      <td colspan="1">
+        Test purposes
+      </td>
+    </tr>
+
+    <xsl:apply-templates/>
+    <tr bgcolor="#ffffc0">
+      <td width="25%">
+        tests: <xsl:value-of select="@tests"/>
+      </td>
+      <td width="25%">
+        disabled: <xsl:value-of select="@disabled"/>
+      </td>
+      <td width="25%">
+        failures: <xsl:value-of select="@failures"/>
+      </td>
+      <td width="25%">
+        errors: <xsl:value-of select="@errors"/>
+      </td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="testcase">
+    <tr bgcolor="#e0f0d0">
+      <td colspan="2"> <xsl:value-of select="substring-after(@classname, 'utc_blink_')"/></td>
+      <td colspan="1">
+        <xsl:value-of select="@name"/>
+      </td>
+      <xsl:choose>
+                <xsl:when test="child::*">
+                    <td bgcolor="#ff5050"> Failed </td>
+                </xsl:when>
+                <xsl:otherwise>
+                    <td bgcolor="#50ff50"> Passed </td>
+               </xsl:otherwise>
+            </xsl:choose>
+    </tr>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="failure">
+    <tr><td colspan="4"  bgcolor="#ff9090">
+        <table width="100%">
+          <tr>
+            <th width="15%"> File Name </th>
+            <td width="50%" bgcolor="#e0eee0">
+              <xsl:value-of select="substring-before(.,':')"/>
+            </td>
+            <th width="20%"> Line Number </th>
+            <td width="10%" bgcolor="#e0eee0">
+              <xsl:value-of select='substring-after(substring-before(.,"&#x000A;"),":")'/>
+            </td>
+          </tr>
+          <tr>
+            <th width="15%"> message </th>
+            <td colspan="3" width="85%" bgcolor="#e0eee0">
+              <xsl:value-of select="@message"/>
+            </td>
+          </tr>
+        </table>
+    </td></tr>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libnspr4.so b/tizen_src/ewk/thirdparty/nss3.15/libnspr4.so
new file mode 100755 (executable)
index 0000000..460ca03
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libnspr4.so differ
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libnss3.so b/tizen_src/ewk/thirdparty/nss3.15/libnss3.so
new file mode 100755 (executable)
index 0000000..7461af0
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libnss3.so differ
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so b/tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so
new file mode 100755 (executable)
index 0000000..b1fd6a4
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so differ
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libplc4.so b/tizen_src/ewk/thirdparty/nss3.15/libplc4.so
new file mode 100755 (executable)
index 0000000..9a1de61
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libplc4.so differ
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libplds4.so b/tizen_src/ewk/thirdparty/nss3.15/libplds4.so
new file mode 100755 (executable)
index 0000000..b3bcbee
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libplds4.so differ
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libsmime3.so b/tizen_src/ewk/thirdparty/nss3.15/libsmime3.so
new file mode 100755 (executable)
index 0000000..6b2dbbc
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libsmime3.so differ
diff --git a/tizen_src/ewk/thirdparty/nss3.15/libssl3.so b/tizen_src/ewk/thirdparty/nss3.15/libssl3.so
new file mode 100755 (executable)
index 0000000..c46c577
Binary files /dev/null and b/tizen_src/ewk/thirdparty/nss3.15/libssl3.so differ
diff --git a/tizen_src/ewk/unittest/CMakeLists.txt b/tizen_src/ewk/unittest/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..63be95a
--- /dev/null
@@ -0,0 +1,389 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(utc_blink_ewk_gtest)
+INCLUDE(FindPkgConfig)
+enable_testing()
+find_package (Threads)
+
+set(LIBRARY_OUTPUT_PATH ../lib)
+set(EXECUTABLE_OUTPUT_PATH ../utc_exec)
+
+SET (UTC_TEST
+  "utc_blink_ewk_auth_challenge_credential_cancel_func.cpp"
+  "utc_blink_ewk_auth_challenge_credential_use_func.cpp"
+  "utc_blink_ewk_auth_challenge_realm_get_func.cpp"
+  "utc_blink_ewk_auth_challenge_suspend_func.cpp"
+  "utc_blink_ewk_autofill_profile_data_get_func.cpp"
+  "utc_blink_ewk_autofill_profile_data_set_func.cpp"
+  "utc_blink_ewk_autofill_profile_delete_func.cpp"
+  "utc_blink_ewk_autofill_profile_id_get_func.cpp"
+  "utc_blink_ewk_autofill_profile_new_func.cpp"
+  "utc_blink_ewk_certificate_policy_decision_allowed_set_func.cpp"
+  "utc_blink_ewk_certificate_policy_decision_certificate_pem_get_func.cpp"
+  "utc_blink_ewk_certificate_policy_decision_suspend_func.cpp"
+  "utc_blink_ewk_certificate_policy_decision_url_get_func.cpp"
+  "utc_blink_ewk_console_message_level_get_func.cpp"
+  "utc_blink_ewk_console_message_line_get_func.cpp"
+  "utc_blink_ewk_console_message_source_get_func.cpp"
+  "utc_blink_ewk_console_message_text_get_func.cpp"
+  "utc_blink_ewk_context_additional_plugin_path_set_func.cpp"
+  "utc_blink_ewk_context_application_cache_delete_all_func.cpp"
+  "utc_blink_ewk_context_application_cache_delete_func.cpp"
+  "utc_blink_ewk_context_application_cache_origins_get_func.cpp"
+  "utc_blink_ewk_context_cache_clear_func.cpp"
+  "utc_blink_ewk_context_cache_disabled_set_func.cpp"
+  "utc_blink_ewk_context_cache_model_get_func.cpp"
+  "utc_blink_ewk_context_cache_model_set_func.cpp"
+  "utc_blink_ewk_context_certificate_file_get_func.cpp"
+  "utc_blink_ewk_context_certificate_file_set_func.cpp"
+  "utc_blink_ewk_context_cookie_manager_get_func.cpp"
+  "utc_blink_ewk_context_default_get_func.cpp"
+  "utc_blink_ewk_context_delete_func.cpp"
+  "utc_blink_ewk_context_did_start_download_callback_set_func.cpp"
+  "utc_blink_ewk_context_form_autofill_profile_add_func.cpp"
+  "utc_blink_ewk_context_form_autofill_profile_get_func.cpp"
+  "utc_blink_ewk_context_form_autofill_profile_get_all_func.cpp"
+  "utc_blink_ewk_context_form_autofill_profile_remove_func.cpp"
+  "utc_blink_ewk_context_form_autofill_profile_set_func.cpp"
+  "utc_blink_ewk_context_form_candidate_data_clear_func.cpp"
+  "utc_blink_ewk_context_form_password_data_clear_func.cpp"
+  "utc_blink_ewk_context_icon_database_icon_object_add_func.cpp"
+  "utc_blink_ewk_context_icon_database_path_set_func.cpp"
+  "utc_blink_ewk_context_local_file_system_all_delete_func.cpp"
+  "utc_blink_ewk_context_local_file_system_delete_func.cpp"
+  "utc_blink_ewk_context_menu_item_append_as_action_func.cpp"
+  "utc_blink_ewk_context_menu_item_append_func.cpp"
+  "utc_blink_ewk_context_menu_item_count_func.cpp"
+  "utc_blink_ewk_context_menu_item_link_url_get_func.cpp"
+  "utc_blink_ewk_context_menu_item_remove_func.cpp"
+  "utc_blink_ewk_context_menu_item_tag_get_func.cpp"
+  "utc_blink_ewk_context_menu_item_image_url_get_func.cpp"
+  "utc_blink_ewk_context_menu_nth_item_get_func.cpp"
+  "utc_blink_ewk_context_memory_sampler_start_func.cpp"
+  "utc_blink_ewk_context_memory_sampler_stop_func.cpp"
+  "utc_blink_ewk_context_new_func.cpp"
+  "utc_blink_ewk_context_notify_low_memory_func.cpp"
+  "utc_blink_ewk_context_pixmap_set_func.cpp"
+  "utc_blink_ewk_context_proxy_uri_get_func.cpp"
+  "utc_blink_ewk_context_proxy_uri_set_func.cpp"
+  "utc_blink_ewk_context_vibration_client_callbacks_set_func.cpp"
+  "utc_blink_ewk_context_web_database_delete_all_func.cpp"
+  "utc_blink_ewk_context_web_database_delete_func.cpp"
+  "utc_blink_ewk_context_web_database_origins_get_func.cpp"
+  "utc_blink_ewk_context_web_indexed_database_delete_all_func.cpp"
+  "utc_blink_ewk_context_web_storage_delete_all_func.cpp"
+  "utc_blink_ewk_context_web_storage_origin_delete_func.cpp"
+  "utc_blink_ewk_context_web_storage_origins_get_func.cpp"
+  "utc_blink_ewk_cookie_manager_accept_policy_set_func.cpp"
+  "utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp"
+  "utc_blink_ewk_cookie_manager_cookies_clear_func.cpp"
+  "utc_blink_ewk_custom_handlers_data_base_url_get_func.cpp"
+  "utc_blink_ewk_custom_handlers_data_result_set_func.cpp"
+  "utc_blink_ewk_custom_handlers_data_target_get_func.cpp"
+  "utc_blink_ewk_custom_handlers_data_title_get_func.cpp"
+  "utc_blink_ewk_custom_handlers_data_url_get_func.cpp"
+  "utc_blink_ewk_error_code_get_func.cpp"
+  "utc_blink_ewk_error_description_get_func.cpp"
+  "utc_blink_ewk_error_type_get_func.cpp"
+  "utc_blink_ewk_error_url_get_func.cpp"
+  "utc_blink_ewk_frame_is_main_frame_func.cpp"
+  "utc_blink_ewk_geolocation_permission_request_origin_get_func.cpp"
+  "utc_blink_ewk_geolocation_permission_request_set_func.cpp"
+  "utc_blink_ewk_geolocation_permission_request_suspend_func.cpp"
+  "utc_blink_ewk_history_back_list_length_get_func.cpp"
+  "utc_blink_ewk_history_forward_list_length_get.cpp"
+  "utc_blink_ewk_history_free_func.cpp"
+  "utc_blink_ewk_history_item_title_get_func.cpp"
+  "utc_blink_ewk_history_item_uri_get_func.cpp"
+  "utc_blink_ewk_history_nth_item_get.cpp"
+  "utc_blink_ewk_hit_test_attribute_hash_get_func.cpp"
+  "utc_blink_ewk_hit_test_free_func.cpp"
+  "utc_blink_ewk_hit_test_image_buffer_get_func.cpp"
+  "utc_blink_ewk_hit_test_image_buffer_length_get_func.cpp"
+  "utc_blink_ewk_hit_test_image_file_name_extension_get_func.cpp"
+  "utc_blink_ewk_hit_test_image_uri_get_func.cpp"
+  "utc_blink_ewk_hit_test_link_label_get_func.cpp"
+  "utc_blink_ewk_hit_test_link_title_get_func.cpp"
+  "utc_blink_ewk_hit_test_link_uri_get_func.cpp"
+  "utc_blink_ewk_hit_test_media_uri_get_func.cpp"
+  "utc_blink_ewk_hit_test_node_value_get_func.cpp"
+  "utc_blink_ewk_hit_test_result_context_get_func.cpp"
+  "utc_blink_ewk_hit_test_tag_name_get_func.cpp"
+  "utc_blink_ewk_init_func.cpp"
+  "utc_blink_ewk_notification_body_get_func.cpp"
+  "utc_blink_ewk_notification_clicked_func.cpp"
+  "utc_blink_ewk_notification_icon_url_get_func.cpp"
+  "utc_blink_ewk_notification_id_get_func.cpp"
+  "utc_blink_ewk_notification_permission_request_origin_get_func.cpp"
+  "utc_blink_ewk_notification_permission_request_set_func.cpp"
+  "utc_blink_ewk_notification_permission_request_suspend_func.cpp"
+  "utc_blink_ewk_notification_security_origin_get_func.cpp"
+  "utc_blink_ewk_notification_showed_func.cpp"
+  "utc_blink_ewk_notification_title_get_func.cpp"
+  "utc_blink_ewk_policy_decision_cookie_get_func.cpp"
+  "utc_blink_ewk_policy_decision_frame_get_func.cpp"
+  "utc_blink_ewk_policy_decision_host_get_func.cpp"
+  "utc_blink_ewk_policy_decision_http_method_get_func.cpp"
+  "utc_blink_ewk_policy_decision_ignore_func.cpp"
+  "utc_blink_ewk_policy_decision_navigation_type_get_func.cpp"
+  "utc_blink_ewk_policy_decision_password_get_func.cpp"
+  "utc_blink_ewk_policy_decision_response_headers_get_func.cpp"
+  "utc_blink_ewk_policy_decision_response_mime_get_func.cpp"
+  "utc_blink_ewk_policy_decision_response_status_code_get_func.cpp"
+  "utc_blink_ewk_policy_decision_scheme_get_func.cpp"
+  "utc_blink_ewk_policy_decision_suspend_func.cpp"
+  "utc_blink_ewk_policy_decision_type_get_func.cpp"
+  "utc_blink_ewk_policy_decision_url_get_func.cpp"
+  "utc_blink_ewk_policy_decision_use_func.cpp"
+  "utc_blink_ewk_policy_decision_userid_get_func.cpp"
+  "utc_blink_ewk_quota_permission_request_is_persistent_get_func.cpp"
+  "utc_blink_ewk_quota_permission_request_origin_host_get_func.cpp"
+  "utc_blink_ewk_quota_permission_request_origin_port_get_func.cpp"
+  "utc_blink_ewk_quota_permission_request_origin_protocol_get_func.cpp"
+  "utc_blink_ewk_quota_permission_request_quota_get_func.cpp"
+  "utc_blink_ewk_security_origin_host_get_func.cpp"
+  "utc_blink_ewk_security_origin_port_get_func.cpp"
+  "utc_blink_ewk_security_origin_protocol_get_func.cpp"
+  "utc_blink_ewk_set_arguments_func.cpp"
+  "utc_blink_ewk_settings_auto_fitting_get_func.cpp"
+  "utc_blink_ewk_settings_auto_fitting_set_func.cpp"
+  "utc_blink_ewk_settings_autofill_password_form_enabled_get_func.cpp"
+  "utc_blink_ewk_settings_autofill_password_form_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_clear_text_selection_automatically_set_func.cpp"
+  "utc_blink_ewk_settings_current_legacy_font_size_mode_set_func.cpp"
+  "utc_blink_ewk_settings_default_encoding_set_func.cpp"
+  "utc_blink_ewk_settings_default_keypad_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_detect_contents_automatically_set_func.cpp"
+  "utc_blink_ewk_settings_edge_effect_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_editable_link_behavior_set_func.cpp"
+  "utc_blink_ewk_settings_extra_feature_set_func.cpp"
+  "utc_blink_ewk_settings_font_default_size_get_func.cpp"
+  "utc_blink_ewk_settings_font_default_size_set_func.cpp"
+  "utc_blink_ewk_settings_force_zoom_set_func.cpp"
+  "utc_blink_ewk_settings_form_candidate_data_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_form_profile_data_enabled_get_func.cpp"
+  "utc_blink_ewk_settings_form_profile_data_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_initial_list_style_position_get_func.cpp"
+  "utc_blink_ewk_settings_initial_list_style_position_set_func.cpp"
+  "utc_blink_ewk_settings_is_encoding_valid_func.cpp"
+  "utc_blink_ewk_settings_javascript_enabled_get_func.cpp"
+  "utc_blink_ewk_settings_javascript_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_link_effect_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_link_magnifier_enabled_get_func.cpp"
+  "utc_blink_ewk_settings_link_magnifier_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_load_remote_images_set_func.cpp"
+  "utc_blink_ewk_settings_loads_images_automatically_set_func.cpp"
+  "utc_blink_ewk_settings_paste_image_uri_mode_set_func.cpp"
+  "utc_blink_ewk_settings_plugins_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_scripts_window_open_set_func.cpp"
+  "utc_blink_ewk_settings_select_word_automatically_set_func.cpp"
+  "utc_blink_ewk_settings_spdy_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_text_autosizing_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func.cpp"
+  "utc_blink_ewk_settings_text_selection_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_text_style_state_enabled_func.cpp"
+  "utc_blink_ewk_settings_text_zoom_enabled_set_func.cpp"
+  "utc_blink_ewk_settings_uses_encoding_detector_set_func.cpp"
+  "utc_blink_ewk_settings_uses_keypad_without_user_action_set_func.cpp"
+  "utc_blink_ewk_shutdown_func.cpp"
+  "utc_blink_ewk_text_style_align_center_get_func.cpp"
+  "utc_blink_ewk_text_style_align_full_get_func.cpp"
+  "utc_blink_ewk_text_style_align_left_get_func.cpp"
+  "utc_blink_ewk_text_style_align_right_get_func.cpp"
+  "utc_blink_ewk_text_style_bg_color_get_func.cpp"
+  "utc_blink_ewk_text_style_bold_get_func.cpp"
+  "utc_blink_ewk_text_style_color_get_func.cpp"
+  "utc_blink_ewk_text_style_font_size_get_func.cpp"
+  "utc_blink_ewk_text_style_has_composition_get_func.cpp"
+  "utc_blink_ewk_text_style_italic_get_func.cpp"
+  "utc_blink_ewk_text_style_ordered_list_get_func.cpp"
+  "utc_blink_ewk_text_style_position_get_func.cpp"
+  "utc_blink_ewk_text_style_underline_get_func.cpp"
+  "utc_blink_ewk_text_style_unordered_list_get_func.cpp"
+  "utc_blink_ewk_user_media_permission_request_set_func.cpp"
+  "utc_blink_ewk_user_media_permission_request_suspend_func.cpp"
+  "utc_blink_ewk_view_add_func.cpp"
+  "utc_blink_ewk_view_add_with_context_func.cpp"
+  "utc_blink_ewk_view_add_with_session_data_func.cpp"
+  "utc_blink_ewk_view_app_name_user_agent_get_func.cpp"
+  "utc_blink_ewk_view_app_name_user_agent_set_func.cpp"
+  "utc_blink_ewk_view_back_forward_list_clear_func.cpp"
+  "utc_blink_ewk_view_back_func.cpp"
+  "utc_blink_ewk_view_back_possible_func.cpp"
+  "utc_blink_ewk_view_browser_font_set_func.cpp"
+  "utc_blink_ewk_view_command_execute_func.cpp"
+  "utc_blink_ewk_view_content_security_policy_set_func.cpp"
+  "utc_blink_ewk_view_contents_pdf_get_func.cpp"
+  "utc_blink_ewk_view_contents_set_func.cpp"
+  "utc_blink_ewk_view_contents_size_get_func.cpp"
+  "utc_blink_ewk_view_context_get_func.cpp"
+  "utc_blink_ewk_view_custom_header_add_func.cpp"
+  "utc_blink_ewk_view_custom_header_remove_func.cpp"
+  "utc_blink_ewk_view_draws_transparent_background_set_func.cpp"
+  "utc_blink_ewk_view_encoding_custom_set_func.cpp"
+  "utc_blink_ewk_view_forward_func.cpp"
+  "utc_blink_ewk_view_forward_possible_func.cpp"
+  "utc_blink_ewk_view_fullscreen_exit_func.cpp"
+  "utc_blink_ewk_view_get_cookies_for_url_func.cpp"
+  "utc_blink_ewk_view_history_get_func.cpp"
+  "utc_blink_ewk_view_hit_test_new_func.cpp"
+  "utc_blink_ewk_view_hit_test_request_func.cpp"
+  "utc_blink_ewk_view_html_contents_set_func.cpp"
+  "utc_blink_ewk_view_inspector_server_stop_func.cpp"
+  "utc_blink_ewk_view_javascript_confirm_reply_func.cpp"
+  "utc_blink_ewk_view_load_progress_get_func.cpp"
+  "utc_blink_ewk_view_mhtml_data_get_func.cpp"
+  "utc_blink_ewk_view_notification_closed_func.cpp"
+  "utc_blink_ewk_view_orientation_lock_callback_set_func.cpp"
+  "utc_blink_ewk_view_orientation_send_func.cpp"
+  "utc_blink_ewk_view_page_visibility_state_set_func.cpp"
+  "utc_blink_ewk_view_plain_text_get_func.cpp"
+  "utc_blink_ewk_view_quota_permission_request_callback_set_func.cpp"
+  "utc_blink_ewk_view_quota_permission_request_cancel_func.cpp"
+  "utc_blink_ewk_view_quota_permission_request_reply_func.cpp"
+  "utc_blink_ewk_view_reload_func.cpp"
+  "utc_blink_ewk_view_resume_func.cpp"
+  "utc_blink_ewk_view_scale_get_func.cpp"
+  "utc_blink_ewk_view_scale_range_get_func.cpp"
+  "utc_blink_ewk_view_scale_set_func.cpp"
+  "utc_blink_ewk_view_screenshot_contents_get_func.cpp"
+  "utc_blink_ewk_view_script_execute_func.cpp"
+  "utc_blink_ewk_view_scroll_by_func.cpp"
+  "utc_blink_ewk_view_scroll_pos_get_func.cpp"
+  "utc_blink_ewk_view_scroll_set_func.cpp"
+  "utc_blink_ewk_view_scroll_size_get_func.cpp"
+  "utc_blink_ewk_view_session_data_get_func.cpp"
+  "utc_blink_ewk_view_settings_get_func.cpp"
+  "utc_blink_ewk_view_stop_func.cpp"
+  "utc_blink_ewk_view_suspend_func.cpp"
+  "utc_blink_ewk_view_text_find_func.cpp"
+  "utc_blink_ewk_view_text_find_highlight_clear_func.cpp"
+  "utc_blink_ewk_view_text_selection_clear_func.cpp"
+  "utc_blink_ewk_view_text_selection_text_get_func.cpp"
+  "utc_blink_ewk_view_text_zoom_get_func.cpp"
+  "utc_blink_ewk_view_text_zoom_set_func.cpp"
+  "utc_blink_ewk_view_title_get_func.cpp"
+  "utc_blink_ewk_view_touch_events_enabled_set_func.cpp"
+  "utc_blink_ewk_view_url_get_func.cpp"
+  "utc_blink_ewk_view_url_request_set_func.cpp"
+  "utc_blink_ewk_view_url_set_func.cpp"
+  "utc_blink_ewk_view_use_settings_font_func.cpp"
+  "utc_blink_ewk_view_user_agent_get_func.cpp"
+  "utc_blink_ewk_view_user_agent_set_func.cpp"
+  "utc_blink_ewk_view_visibility_set_func.cpp"
+  "utc_blink_ewk_view_web_application_capable_get_func.cpp"
+  "utc_blink_ewk_view_web_application_icon_url_get_func.cpp"
+  "utc_blink_ewk_view_web_application_icon_urls_get_func.cpp"
+  "utc_blink_ewk_web_application_icon_data_url_get_func.cpp"
+  "utc_blink_cb_contextmenu_willshow.cpp"
+  "utc_blink_cb_contextmenu_allowed.cpp"
+  "utc_blink_cb_editorclient_candidate_closed.cpp"
+  "utc_blink_cb_editorclient_candidate_opened.cpp"
+  "utc_blink_cb_editorclient_ime_closed.cpp"
+  "utc_blink_cb_editorclient_ime_opened.cpp"
+  "utc_blink_cb_form_submit.cpp"
+  "utc_blink_cb_fullscreen_exitfullscreen.cpp"
+  "utc_blink_cb_fullscreen_enterfullscreen.cpp"
+  "utc_blink_cb_geolocation_valid.cpp"
+  "utc_blink_cb_icon_received.cpp"
+  "utc_blink_cb_inputmethod_changed.cpp"
+  "utc_blink_cb_load_finished.cpp"
+  "utc_blink_cb_load_progress_finished.cpp"
+  "utc_blink_cb_load_progress_started.cpp"
+  "utc_blink_cb_load_progress.cpp"
+  "utc_blink_cb_load_started.cpp"
+  "utc_blink_cb_magnifier_hide.cpp"
+  "utc_blink_cb_magnifier_show.cpp"
+  "utc_blink_cb_popup_blocked.cpp"
+  "utc_blink_cb_protocolhandler_registration_requested.cpp"
+  "utc_blink_cb_protocolhandler_unregistration_requested.cpp"
+  "utc_blink_cb_protocolhandler_isregistered.cpp"
+  "utc_blink_cb_redo_size.cpp"
+  "utc_blink_cb_textselection_mode.cpp"
+  "utc_blink_cb_title_changed.cpp"
+  "utc_blink_cb_undo_size.cpp"
+  "utc_blink_cb_unfocus_direction.cpp"
+  "utc_blink_cb_uri_changed.cpp"
+  "utc_blink_cb_url_changed.cpp"
+  )
+
+
+MESSAGE(STATUS "<<<<<<< ${PROJECT_NAME} >>>>>>>")
+
+pkg_check_modules(Ecore-Evas REQUIRED ecore-evas)
+pkg_check_modules(Elementary REQUIRED elementary)
+pkg_check_modules(Edej REQUIRED edje)
+pkg_check_modules(Gobect REQUIRED gobject-2.0)
+pkg_check_modules(Ecore REQUIRED ecore)
+pkg_check_modules(Ecore_X REQUIRED ecore-x)
+pkg_check_modules(Eina REQUIRED eina)
+pkg_check_modules(Evas REQUIRED evas)
+pkg_check_modules(Dlog REQUIRED dlog)
+pkg_check_modules(Glib REQUIRED glib-2.0)
+pkg_check_modules(X11 REQUIRED x11)
+pkg_check_modules(Scim REQUIRED isf)
+
+include_directories(
+    ${Edej_INCLUDE_DIRS}
+    ${Ecore-Evas_INCLUDE_DIRS}
+    ${Elementary_INCLUDE_DIRS}
+    ${Gobect_INCLUDE_DIRS}
+    ${Ecore_INCLUDE_DIRS}
+    ${Ecore_X_INCLUDE_DIRS}
+    ${Eina_INCLUDE_DIRS}
+    ${Evas_INCLUDE_DIRS}
+    ${Dlog_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
+    ${Scim_INCLUDE_DIRS}
+    ${X11_INCLUDE_DIRS}
+    ${CMAKE_CURRENT_SOURCE_DIR}/../efl_integration/public
+    )
+link_directories(
+    ${Edej_LIBRARY_DIRS}
+    ${Ecore-Evas_LIBRARY_DIRS}
+    ${Elementary_LIBRARY_DIRS}
+    ${Gobect_LIBRARY_DIRS}
+    ${Ecore_LIBRARY_DIRS}
+    ${Ecore_X_LIBRARY_DIRS}
+    ${Eina_LIBRARY_DIRS}
+    ${Evas_LIBRARY_DIRS}
+    ${Dlog_LIBRARY_DIRS}
+    ${Glib_LIBRARY_DIRS}
+    ${Scim_LIBRARY_DIRS}
+    ${X11_LIBRARY_DIRS}
+    )
+
+ADD_LIBRARY(utcLib STATIC
+  "execute_utc_blink.cpp"
+  "utc_blink_ewk_base.cpp"
+  )
+
+ADD_DEFINITIONS(-DOS_TIZEN)
+
+foreach(test ${UTC_TEST})
+  get_filename_component(TName ${test} NAME_WE)
+  add_executable (${TName}
+    ${test}
+    )
+  target_link_libraries(
+    ${TName}
+    ${Edej_LIBRARIES}
+    ${Ecore-Evas_LIBRARIES}
+    ${Elementary_LIBRARIES}
+    chromium-ewk
+    ${Gobect_LIBRARIES}
+    ${Ecore_LIBRARIES}
+    ${Ecore_X_LIBRARIES}
+    ${Eina_LIBRARIES}
+    ${Evas_LIBRARIES}
+    ${Dlog_LIBRARIES}
+    ${Glib_LIBRARIES}
+    ${Scim_LIBRARIES}
+    ${X11_LIBRARIES}
+    gtest
+    pthread
+    utcLib
+    )
+endforeach(test)
+
+
diff --git a/tizen_src/ewk/unittest/S_TRUNK_OWNERS b/tizen_src/ewk/unittest/S_TRUNK_OWNERS
new file mode 100644 (file)
index 0000000..9b304a0
--- /dev/null
@@ -0,0 +1,5 @@
+join.yoon@samsung.com
+j.majnert@samsung.com
+p.grad@samsung.com
+umeshk.patel@samsung.com
+youngbok.yoon@samsung.com
diff --git a/tizen_src/ewk/unittest/execute_utc_blink.cpp b/tizen_src/ewk/unittest/execute_utc_blink.cpp
new file mode 100755 (executable)
index 0000000..b4cf41d
--- /dev/null
@@ -0,0 +1,24 @@
+#include "gtest/gtest.h"
+
+#include <glib-object.h>
+#include <Elementary.h>
+
+#include "ewk_main.h"
+
+int main(int argc, char* argv[])
+{
+  /* 1. Initialization of the EFL (and other) libraries */
+  g_type_init();
+  ewk_init();
+  elm_init(0, NULL);
+
+  elm_config_preferred_engine_set("opengl_x11");
+
+  testing::InitGoogleTest(&argc, argv);
+  int retval = RUN_ALL_TESTS();
+
+  /* 2. Closing whole EWK */
+  ewk_shutdown();
+  return retval;
+}
+
diff --git a/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_new_with_injected_bundle_path_func.cpp b/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_new_with_injected_bundle_path_func.cpp
new file mode 100755 (executable)
index 0000000..d446e62
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_context_new_with_injected_bundle_path
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_new_with_injected_bundle_path : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_context_new_with_injected_bundle_path()
+  {
+  }
+
+  ~utc_blink_ewk_context_new_with_injected_bundle_path()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Checkeing whether a new Ewk_Context is created by a path of injected bundle library.
+          Depricated API
+ */
+TEST_F(utc_blink_ewk_context_new_with_injected_bundle_path, POS_TEST)
+{
+  Eina_Bool result = EINA_FALSE;
+  char* full_path = generate_full_resource_path("/ewk_context/injected_bundle/bundle-sample.so");
+  if (!full_path)
+    utc_fail();
+
+  Ewk_Context* context = ewk_context_new_with_injected_bundle_path(full_path);
+  free(full_path);
+  if (!context)
+    result = EINA_TRUE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a path of injected bundle library.
+ */
+TEST_F(utc_blink_ewk_context_new_with_injected_bundle_path, NEG_TEST)
+{
+  Ewk_Context* context = ewk_context_new_with_injected_bundle_path(NULL);
+  if (context)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_storage_path_reset_func.cpp b/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_storage_path_reset_func.cpp
new file mode 100644 (file)
index 0000000..9d1dc39
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_context_storage_path_reset
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_storage_path_reset : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_context_storage_path_reset()
+  {
+  }
+
+  ~utc_blink_ewk_context_storage_path_reset()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Tests if resets web storage, web database and application cache paths when initialized with proper arguments.
+ */
+TEST_F(utc_blink_ewk_context_storage_path_reset, POS_TEST)
+{
+  Ewk_Context* context = ewk_context_default_get();
+  ewk_context_storage_path_reset(context);
+  utc_pass();
+}
+
+/**
+ * @brief Tests if there is no segmentation fault when invoked with NULL argument.
+ */
+TEST_F(utc_blink_ewk_context_storage_path_reset, NEG_TEST)
+{
+  ewk_context_storage_path_reset(NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_tizen_extensible_api_set_func.cpp b/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_context_tizen_extensible_api_set_func.cpp
new file mode 100644 (file)
index 0000000..9c4ff6c
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_context_tizen_extensible_api_set
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_tizen_extensible_api_set : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_context_tizen_extensible_api_set()
+  {
+  }
+
+  ~utc_blink_ewk_context_tizen_extensible_api_set()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Tests if returns TRUE when initialized with a correct webview and
+ * each extensible api try to set TRUE.
+ */
+TEST_F(utc_blink_ewk_context_tizen_extensible_api_set, POS_TEST)
+{
+  int i;
+  Eina_Bool result = EINA_FALSE;
+  Ewk_Context* context = ewk_view_context_get(test_view.webview);
+  if (!context)
+    utc_fail();
+
+  result = ewk_context_tizen_extensible_api_set(context, EWK_EXTENSIBLE_API_BACKGROUND_MUSIC, EINA_TRUE);
+  utc_check_ne(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initialized with NULL webview.
+ */
+TEST_F(utc_blink_ewk_context_tizen_extensible_api_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_context_tizen_extensible_api_set(NULL, EWK_EXTENSIBLE_API_BACKGROUND_MUSIC, EINA_TRUE);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_view_vertical_panning_hold_set_func.cpp b/tizen_src/ewk/unittest/not_implemented/utc_blink_ewk_view_vertical_panning_hold_set_func.cpp
new file mode 100755 (executable)
index 0000000..e3dc0aa
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_vertical_panning_hold_set : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_vertical_panning_hold_set() {
+  }
+
+  virtual ~utc_blink_ewk_view_vertical_panning_hold_set() {
+  }
+
+  /* Startup function */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  virtual void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+* @brief Check whether it is possible to forward when setting panning functionality on or off
+*/
+TEST_F(utc_blink_ewk_view_vertical_panning_hold_set, POS_TEST)
+{
+  ewk_view_vertical_panning_hold_set(test_view.webview,EINA_TRUE);
+  utc_pass();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_vertical_panning_hold_set, NEG_TEST)
+{
+  ewk_view_vertical_panning_hold_set(NULL,EINA_FALSE);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/resources/common/favicon.html b/tizen_src/ewk/unittest/resources/common/favicon.html
new file mode 100644 (file)
index 0000000..946bec0
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+<head>
+  <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
+</head>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/favicon.ico b/tizen_src/ewk/unittest/resources/common/favicon.ico
new file mode 100644 (file)
index 0000000..76bbd2f
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/common/favicon.ico differ
diff --git a/tizen_src/ewk/unittest/resources/common/logo.png b/tizen_src/ewk/unittest/resources/common/logo.png
new file mode 100755 (executable)
index 0000000..7a940cd
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/common/logo.png differ
diff --git a/tizen_src/ewk/unittest/resources/common/sample.html b/tizen_src/ewk/unittest/resources/common/sample.html
new file mode 100755 (executable)
index 0000000..3170c69
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Test file</title>
+</head>
+<body>
+    <h1>Sample HTML</h1>
+    <p>This is sample html page to be used in test suite when loading of a page is required.</p>
+    <p id="getParaContent">test content</p>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_ js.html b/tizen_src/ewk/unittest/resources/common/sample_ js.html
new file mode 100755 (executable)
index 0000000..908a62c
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Test file</title>
+</head>
+<body onload="alert('Hello')">
+    <h1>SampleJS HTML </h1>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_ js_confirm.html b/tizen_src/ewk/unittest/resources/common/sample_ js_confirm.html
new file mode 100755 (executable)
index 0000000..0830aea
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Test file</title>
+</head>
+<body onload="Confirm('Input')">
+    <h1>SampleJS HTML </h1>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_ js_prompt.html b/tizen_src/ewk/unittest/resources/common/sample_ js_prompt.html
new file mode 100755 (executable)
index 0000000..855537e
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Test file</title>
+</head>
+<body onload="prompt('Input')">
+    <h1>SampleJS HTML </h1>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_1.html b/tizen_src/ewk/unittest/resources/common/sample_1.html
new file mode 100755 (executable)
index 0000000..1874f38
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Test file</title>
+</head>
+<body>
+    <h1>Sample1 HTML 1</h1>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_2.html b/tizen_src/ewk/unittest/resources/common/sample_2.html
new file mode 100755 (executable)
index 0000000..09338d2
--- /dev/null
@@ -0,0 +1,1097 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang="en" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Internet - Wikipedia, the free encyclopedia</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta name="generator" content="MediaWiki 1.20wmf4" />
+<link rel="apple-touch-icon" href="//en.wikipedia.org/apple-touch-icon.png" />
+<link rel="shortcut icon" href="/favicon.ico" />
+<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (en)" />
+<link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd" />
+<link rel="copyright" href="//creativecommons.org/licenses/by-sa/3.0/" />
+<link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom" />
+<link rel="stylesheet" href="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=ext.gadget.teahouse%7Cext.wikihiero%7Cmediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&amp;only=styles&amp;skin=vector&amp;*" type="text/css" media="all" />
+<meta name="ResourceLoaderDynamicStyles" content="" />
+<link rel="stylesheet" href="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=site&amp;only=styles&amp;skin=vector&amp;*" type="text/css" media="all" />
+<style type="text/css" media="all">a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
+
+/* cache key: enwiki:resourceloader:filter:minify-css:7:d5a1bf6cbd05fc6cc2705e47f52062dc */</style>
+
+<script src="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=vector&amp;*" type="text/javascript"></script>
+<script type="text/javascript">if(window.mw){
+mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Internet","wgTitle":"Internet","wgCurRevisionId":496296823,"wgArticleId":14539,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["All articles with dead external links","Articles with dead external links from August 2011","Wikipedia pages semi-protected against vandalism","Wikipedia protected pages without expiry","All articles with unsourced statements","Articles with unsourced statements from April 2012","Use British English from August 2010","Use dmy dates from May 2012","American inventions","Digital technology","Internet","Media technology","New media","Scientific revolution","Virtual reality","1969 introductions","Sociocultural globalization"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgRelevantPageName":"Internet","wgRestrictionEdit":["autoconfirmed"],"wgRestrictionMove":["sysop"],"wgSearchNamespaces":[0],"wgVectorEnabledModules":{"collapsiblenav":true,"collapsibletabs":true,"editwarning":true,"expandablesearch":false,"footercleanup":false,"sectioneditlinks":false,"simplesearch":true,"experiments":true},"wgWikiEditorEnabledModules":{"toolbar":true,"dialogs":true,"hidesig":true,"templateEditor":false,"templates":false,"preview":false,"previewDialog":false,"publish":false,"toc":false},"wgTrackingToken":"50e3b02845cf96937b336430346f2eba","wikilove-recipient":"","wikilove-edittoken":"+\\","wikilove-anon":0,"mbEmailEnabled":true,"mbUserEmail":false,"mbIsEmailConfirmationPending":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1,"quality":2,"pristine":3}}},"wgStableRevisionId":null,"wgCategoryTreePageCategoryOptions":"{\"mode\":0,\"hideprefix\":20,\"showcount\":true,\"namespaces\":false}","Geo":{"city":"","country":""},"wgNoticeProject":"wikipedia"});
+}</script><script type="text/javascript">if(window.mw){
+mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":0,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":false,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":4,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":0,"watchdeletion":0,"watchlistdays":3
+,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"flaggedrevssimpleui":1,"flaggedrevsstable":0,"flaggedrevseditdiffs":true,"flaggedrevsviewdiffs":false,"vector-simplesearch":1,"useeditwarning":1,"vector-collapsiblenav":1,"usebetatoolbar":1,"usebetatoolbar-cgd":1,"wikilove-enabled":1,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"searchNs100":false,"searchNs101":false,"searchNs108":false,"searchNs109":false,"gadget-teahouse":1,"gadget-mySandbox":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","watchToken":false});;},{},{});
+
+/* cache key: enwiki:resourceloader:filter:minify-js:7:15f947b8a5d6ceebd1f399c3a1526c80 */
+}</script>
+<script type="text/javascript">if(window.mw){
+mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
+}</script>
+<!--[if lt IE 7]><style type="text/css">body{behavior:url("/w/skins-1.20wmf4/vector/csshover.min.htc")}</style><![endif]--></head>
+<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Internet skin-vector action-view vector-animateLayout">
+               <div id="mw-page-base" class="noprint"></div>
+               <div id="mw-head-base" class="noprint"></div>
+               <!-- content -->
+               <div id="content" class="mw-body">
+                       <a id="top"></a>
+                       <div id="mw-js-message" style="display:none;"></div>
+                                               <!-- sitenotice -->
+                       <div id="siteNotice"><!-- centralNotice loads here --></div>
+                       <!-- /sitenotice -->
+                                               <!-- firstHeading -->
+                       <h1 id="firstHeading" class="firstHeading"><span dir="auto">Internet</span></h1>
+                       <!-- /firstHeading -->
+                       <!-- bodyContent -->
+                       <div id="bodyContent">
+                                                               <!-- tagline -->
+                               <div id="siteSub">From Wikipedia, the free encyclopedia</div>
+                               <!-- /tagline -->
+                                                               <!-- subtitle -->
+                               <div id="contentSub"></div>
+                               <!-- /subtitle -->
+                                                                                                                               <!-- jumpto -->
+                               <div id="jump-to-nav" class="mw-jump">
+                                       Jump to: <a href="#mw-head">navigation</a>,
+                                       <a href="#p-search">search</a>
+                               </div>
+                               <!-- /jumpto -->
+                                                               <!-- bodycontent -->
+                               <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><table class="infobox" style="width: 18em; text-align: center; border: 1px solid #78866B;">
+<tr>
+<th style="background:orange;"><strong class="selflink">Internet</strong></th>
+</tr>
+<tr>
+<td><a href="/wiki/File:Internet_map_1024.jpg" class="image"><img alt="Internet map 1024.jpg" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Internet_map_1024.jpg/150px-Internet_map_1024.jpg" width="150" height="150" /></a></td>
+</tr>
+<tr>
+<td><small>Routing paths through a portion of the Internet as visualized by the <a href="/wiki/Opte_Project" title="Opte Project">Opte Project</a></small></td>
+</tr>
+<tr>
+<th style="background:orange;">General</th>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_access" title="Internet access">Access</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Internet_censorship" title="Internet censorship">Censorship</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Digital_divide" title="Digital divide">Digital divide</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Digital_rights" title="Digital rights">Digital rights</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Freedom_of_information" title="Freedom of information">Freedom of information</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/History_of_the_Internet" title="History of the Internet">History</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Global_Internet_usage" title="Global Internet usage">Usage</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Internet_democracy" title="Internet democracy">Democracy</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_phenomenon" title="Internet phenomenon" class="mw-redirect">Internet phenomenon</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Internet_privacy" title="Internet privacy">Privacy</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Net_neutrality" title="Net neutrality" class="mw-redirect">Net neutrality</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Sociology_of_the_Internet" title="Sociology of the Internet">Sociology</a></small></td>
+</tr>
+<tr>
+<th style="background:orange;"><a href="/wiki/Internet_governance" title="Internet governance">Internet governance</a></th>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_Corporation_for_Assigned_Names_and_Numbers" title="Internet Corporation for Assigned Names and Numbers" class="mw-redirect">Internet Corporation for Assigned<br />
+Names and Numbers</a> (ICANN)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_Engineering_Task_Force" title="Internet Engineering Task Force">Internet Engineering Task Force</a> (IETF)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_Governance_Forum" title="Internet Governance Forum">Internet Governance Forum</a> (IGF)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_Society" title="Internet Society">Internet Society</a> (ISOC)</small></td>
+</tr>
+<tr>
+<td></td>
+</tr>
+<tr>
+<th style="background:orange;"><a href="/wiki/Information_infrastructure" title="Information infrastructure" class="mw-redirect">Protocols and infrastructure</a></th>
+</tr>
+<tr>
+<td><small><a href="/wiki/Domain_Name_System" title="Domain Name System">Domain Name System</a> (DNS)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Hypertext_Transfer_Protocol" title="Hypertext Transfer Protocol">Hypertext Transfer Protocol</a> (HTTP)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_address" title="Internet address" class="mw-redirect">IP address</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Internet_exchange_point" title="Internet exchange point">Internet exchange point</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_Protocol" title="Internet Protocol">Internet Protocol</a> (IP)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_Protocol_Suite" title="Internet Protocol Suite" class="mw-redirect">Internet Protocol Suite</a> (TCP/IP)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_service_provider" title="Internet service provider">Internet service provider</a> (ISP)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Simple_Mail_Transfer_Protocol" title="Simple Mail Transfer Protocol">Simple Mail Transfer Protocol</a> (SMTP)</small></td>
+</tr>
+<tr>
+<td></td>
+</tr>
+<tr>
+<th style="background:orange;">Services</th>
+</tr>
+<tr>
+<td><small><a href="/wiki/Blogs" title="Blogs" class="mw-redirect">Blogs</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Microblogs" title="Microblogs" class="mw-redirect">Microblogs</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/E-mail" title="E-mail" class="mw-redirect">E-mail</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_fax" title="Internet fax">Fax</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/File_sharing" title="File sharing">File sharing</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/File_transfer" title="File transfer">File transfer</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Instant_messaging" title="Instant messaging">Instant messaging</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Internet_gaming" title="Internet gaming" class="mw-redirect">Gaming</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Internet_TV" title="Internet TV" class="mw-redirect">TV</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Podcast" title="Podcast">Podcast</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/Web_search_engine" title="Web search engine">Search</a></small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/Voice_over_IP" title="Voice over IP">Voice over IP</a> (VoIP)</small></td>
+</tr>
+<tr>
+<td><small><a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a></small></td>
+</tr>
+<tr>
+<td></td>
+</tr>
+<tr>
+<th style="background:orange;">Guides</th>
+</tr>
+<tr>
+<td><small><a href="/wiki/Topic_outline_of_the_Internet" title="Topic outline of the Internet" class="mw-redirect">Outline</a>&#160;<span style="font-weight:bold;">·</span>  <a href="/wiki/List_of_Internet_topics" title="List of Internet topics" class="mw-redirect">Topics</a></small></td>
+</tr>
+<tr>
+<td align="center">
+<table style="background:transparent; border:solid #aaa 1px;">
+<tr>
+<td><a href="/wiki/File:Crystal_Clear_app_browser.png" class="image"><img alt="Crystal Clear app browser.png" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Crystal_Clear_app_browser.png/28px-Crystal_Clear_app_browser.png" width="28" height="28" /></a></td>
+<td style="padding-right:0.5em"><i><b><a href="/wiki/Portal:Internet" title="Portal:Internet">Internet portal</a></b></i></td>
+</tr>
+</table>
+<div class="noprint plainlinks hlist navbar" style=""><span style="word-spacing:0;">This box:</span>
+<ul>
+<li class="nv-view"><a href="/wiki/Template:Internet" title="Template:Internet"><span title="View this template" style="">view</span></a></li>
+<li class="nv-talk"><a href="/wiki/Template_talk:Internet" title="Template talk:Internet"><span title="Discuss this template" style="">talk</span></a></li>
+<li class="nv-edit"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Template:Internet&amp;action=edit"><span title="Edit this template" style="">edit</span></a></li>
+</ul>
+</div>
+</td>
+</tr>
+</table>
+<table class="vertical-navbox nowraplinks" cellspacing="5" style="float: right; clear: right; background-color: #f9f9f9; border: 1px solid #aaa; width:22em; margin: 0 0 1em 1em; padding: 0.2em; border-spacing: 0.4em 0; text-align: center; line-height: 1.4em; font-size: 88%;" cellpadding="0">
+<tr>
+<th class="navbox-title" style="padding: 0.2em 0.4em 0.2em; font-size: 145%; line-height: 1.2em;"><a href="/wiki/Computer_network" title="Computer network">Computer network</a> types by geographical scope</th>
+</tr>
+<tr>
+<td class="" style="padding-top: 0.2em; padding-bottom: 0.2em; text-align:left;">
+<ul>
+<li><a href="/wiki/Near_field_communication" title="Near field communication">Near field (NFC)</a></li>
+<li><a href="/wiki/Body_area_network" title="Body area network">Body (BAN)</a></li>
+<li><a href="/wiki/Personal_area_network" title="Personal area network">Personal (PAN)</a></li>
+<li><a href="/wiki/Near-me_area_network" title="Near-me area network">Near-me (NAN)</a></li>
+<li><a href="/wiki/Local_area_network" title="Local area network">Local (LAN)</a>
+<ul>
+<li><a href="/wiki/Home_network" title="Home network">Home (HAN)</a></li>
+<li><a href="/wiki/Storage_area_network" title="Storage area network">Storage (SAN)</a></li>
+</ul>
+</li>
+<li><a href="/wiki/Campus_network" title="Campus network">Campus (CAN)</a></li>
+<li><a href="/wiki/Backbone_network" title="Backbone network">Backbone</a></li>
+<li><a href="/wiki/Metropolitan_area_network" title="Metropolitan area network">Metropolitan (MAN)</a></li>
+<li><a href="/wiki/Wide_area_network" title="Wide area network">Wide (WAN)</a></li>
+<li><strong class="selflink">Internet</strong></li>
+<li><a href="/wiki/Interplanetary_Internet" title="Interplanetary Internet">Interplanetary Internet</a></li>
+</ul>
+</td>
+</tr>
+<tr>
+<td style="text-align: right; font-size: 115%;">
+<div class="noprint plainlinks hlist navbar mini" style="">
+<ul>
+<li class="nv-view"><a href="/wiki/Template:Area_networks" title="Template:Area networks"><span title="View this template" style="">v</span></a></li>
+<li class="nv-talk"><a href="/wiki/Template_talk:Area_networks" title="Template talk:Area networks"><span title="Discuss this template" style="">t</span></a></li>
+<li class="nv-edit"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Template:Area_networks&amp;action=edit"><span title="Edit this template" style="">e</span></a></li>
+</ul>
+</div>
+</td>
+</tr>
+</table>
+<div class="dablink">This article is about the public worldwide computer network system.  For other uses, see <a href="/wiki/Internet_(disambiguation)" title="Internet (disambiguation)">Internet (disambiguation)</a>.</div>
+<div class="metadata topicon" id="protected-icon" style="display:none; right:55px;"><a href="/wiki/Wikipedia:Protection_policy#semi" title="This article is semi-protected due to vandalism."><img alt="Page semi-protected" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Padlock-silver.svg/20px-Padlock-silver.svg.png" width="20" height="20" /></a></div>
+<p>The <b>Internet</b> is a global system of interconnected <a href="/wiki/Computer_network" title="Computer network">computer networks</a> that use the standard <a href="/wiki/Internet_protocol_suite" title="Internet protocol suite">Internet protocol suite</a> (often called TCP/IP, although not all applications use TCP) to serve billions of users worldwide. It is a <i>network of networks</i> that consists of millions of private, public, academic, business, and government networks, of local to global scope, that are linked by a broad array of electronic, wireless and optical networking technologies. The Internet carries an extensive range of information resources and services, such as the inter-linked <a href="/wiki/Hypertext" title="Hypertext">hypertext</a> documents of the <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a> (WWW) and the <a href="/wiki/Information_infrastructure" title="Information infrastructure" class="mw-redirect">infrastructure</a> to support email.</p>
+<p>Most traditional communications media including telephone, music, film, and television are reshaped or redefined by the Internet, giving birth to new services such as <a href="/wiki/Voice_over_Internet_Protocol" title="Voice over Internet Protocol" class="mw-redirect">Voice over Internet Protocol</a> (VoIP) and <a href="/wiki/Internet_Protocol_Television" title="Internet Protocol Television" class="mw-redirect">Internet Protocol Television</a> (IPTV). Newspaper, book and other print publishing are adapting to <a href="/wiki/Web_site" title="Web site" class="mw-redirect">Web site</a> technology, or are reshaped into <a href="/wiki/Blogging" title="Blogging" class="mw-redirect">blogging</a> and <a href="/wiki/Web_feed" title="Web feed">web feeds</a>. The Internet has enabled and accelerated new forms of human interactions through <a href="/wiki/Instant_messaging" title="Instant messaging">instant messaging</a>, Internet forums, and <a href="/wiki/Social_network_service" title="Social network service" class="mw-redirect">social networking</a>. <a href="/wiki/Online_shopping" title="Online shopping">Online shopping</a> has boomed both for major retail outlets and small <a href="/wiki/Artisan" title="Artisan">artisans</a> and traders. <a href="/wiki/Business-to-business" title="Business-to-business">Business-to-business</a> and <a href="/wiki/Financial_services" title="Financial services">financial services</a> on the Internet affect <a href="/wiki/Supply_chain" title="Supply chain">supply chains</a> across entire industries.</p>
+<p>The origins of the Internet reach back to research of the 1960s, commissioned by the <a href="/wiki/United_States_government" title="United States government" class="mw-redirect">United States government</a> in collaboration with private commercial interests to build robust, fault-tolerant, and distributed computer networks. The funding of a new U.S. <a href="/wiki/Internet_backbone" title="Internet backbone">backbone</a> by the <a href="/wiki/National_Science_Foundation" title="National Science Foundation">National Science Foundation</a> in the 1980s, as well as private funding for other commercial backbones, led to worldwide participation in the development of new networking technologies, and the merger of many networks. The <a href="/wiki/Commercialization" title="Commercialization">commercialization</a> of what was by the 1990s an international network resulted in its popularization and incorporation into virtually every aspect of modern human life. As of 2011, more than 2.2 billion people – nearly a third of <a href="/wiki/World_population" title="World population">Earth's population</a> — use the services of the Internet.<sup id="cite_ref-0" class="reference"><a href="#cite_note-0"><span>[</span>1<span>]</span></a></sup></p>
+<p>The Internet has no centralized governance in either technological implementation or policies for access and usage; each constituent network sets its own standards. Only the overreaching definitions of the two principal <a href="/wiki/Name_space" title="Name space" class="mw-redirect">name spaces</a> in the Internet, the <a href="/wiki/IP_address" title="IP address">Internet Protocol address</a> space and the <a href="/wiki/Domain_Name_System" title="Domain Name System">Domain Name System</a>, are directed by a maintainer organization, the <a href="/wiki/Internet_Corporation_for_Assigned_Names_and_Numbers" title="Internet Corporation for Assigned Names and Numbers" class="mw-redirect">Internet Corporation for Assigned Names and Numbers</a> (ICANN). The technical underpinning and standardization of the core protocols (<a href="/wiki/IPv4" title="IPv4">IPv4</a> and <a href="/wiki/IPv6" title="IPv6">IPv6</a>) is an activity of the <a href="/wiki/Internet_Engineering_Task_Force" title="Internet Engineering Task Force">Internet Engineering Task Force</a> (IETF), a non-profit organization of loosely affiliated international participants that anyone may associate with by contributing technical expertise.</p>
+<table id="toc" class="toc">
+<tr>
+<td>
+<div id="toctitle">
+<h2>Contents</h2>
+</div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Terminology"><span class="tocnumber">1</span> <span class="toctext">Terminology</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#History"><span class="tocnumber">2</span> <span class="toctext">History</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#Technology"><span class="tocnumber">3</span> <span class="toctext">Technology</span></a>
+<ul>
+<li class="toclevel-2 tocsection-4"><a href="#Protocols"><span class="tocnumber">3.1</span> <span class="toctext">Protocols</span></a></li>
+<li class="toclevel-2 tocsection-5"><a href="#Routing"><span class="tocnumber">3.2</span> <span class="toctext">Routing</span></a></li>
+<li class="toclevel-2 tocsection-6"><a href="#General_structure"><span class="tocnumber">3.3</span> <span class="toctext">General structure</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-7"><a href="#Governance"><span class="tocnumber">4</span> <span class="toctext">Governance</span></a></li>
+<li class="toclevel-1 tocsection-8"><a href="#Modern_uses"><span class="tocnumber">5</span> <span class="toctext">Modern uses</span></a></li>
+<li class="toclevel-1 tocsection-9"><a href="#Services"><span class="tocnumber">6</span> <span class="toctext">Services</span></a>
+<ul>
+<li class="toclevel-2 tocsection-10"><a href="#Information"><span class="tocnumber">6.1</span> <span class="toctext">Information</span></a></li>
+<li class="toclevel-2 tocsection-11"><a href="#Communication"><span class="tocnumber">6.2</span> <span class="toctext">Communication</span></a></li>
+<li class="toclevel-2 tocsection-12"><a href="#Data_transfer"><span class="tocnumber">6.3</span> <span class="toctext">Data transfer</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-13"><a href="#Access"><span class="tocnumber">7</span> <span class="toctext">Access</span></a></li>
+<li class="toclevel-1 tocsection-14"><a href="#Users"><span class="tocnumber">8</span> <span class="toctext">Users</span></a></li>
+<li class="toclevel-1 tocsection-15"><a href="#Social_impact"><span class="tocnumber">9</span> <span class="toctext">Social impact</span></a>
+<ul>
+<li class="toclevel-2 tocsection-16"><a href="#Social_networking_and_entertainment"><span class="tocnumber">9.1</span> <span class="toctext">Social networking and entertainment</span></a></li>
+<li class="toclevel-2 tocsection-17"><a href="#Politics_and_political_revolutions"><span class="tocnumber">9.2</span> <span class="toctext">Politics and political revolutions</span></a></li>
+<li class="toclevel-2 tocsection-18"><a href="#Philanthropy"><span class="tocnumber">9.3</span> <span class="toctext">Philanthropy</span></a></li>
+<li class="toclevel-2 tocsection-19"><a href="#Censorship"><span class="tocnumber">9.4</span> <span class="toctext">Censorship</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-20"><a href="#See_also"><span class="tocnumber">10</span> <span class="toctext">See also</span></a></li>
+<li class="toclevel-1 tocsection-21"><a href="#References"><span class="tocnumber">11</span> <span class="toctext">References</span></a></li>
+<li class="toclevel-1 tocsection-22"><a href="#External_links"><span class="tocnumber">12</span> <span class="toctext">External links</span></a>
+<ul>
+<li class="toclevel-2 tocsection-23"><a href="#Organizations"><span class="tocnumber">12.1</span> <span class="toctext">Organizations</span></a></li>
+<li class="toclevel-2 tocsection-24"><a href="#Articles.2C_books.2C_and_journals"><span class="tocnumber">12.2</span> <span class="toctext">Articles, books, and journals</span></a></li>
+</ul>
+</li>
+</ul>
+</td>
+</tr>
+</table>
+<h2> <span class="mw-headline" id="Terminology">Terminology</span></h2>
+<div class="rellink boilerplate seealso">See also: <a href="/wiki/Internet_capitalization_conventions" title="Internet capitalization conventions">Internet capitalization conventions</a></div>
+<p><i>Internet</i> is a short form of the technical term <a href="/wiki/Internetwork" title="Internetwork" class="mw-redirect">internetwork</a>,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span>[</span>2<span>]</span></a></sup> the result of interconnecting computer networks with special gateways or routers. The Internet is also often referred to as <i>the Net</i>.</p>
+<p>The term <i>the Internet</i>, when referring to the entire global system of IP networks, has been treated as a <a href="/wiki/Proper_noun" title="Proper noun">proper noun</a> and written with an initial <a href="/wiki/Capital_letter" title="Capital letter" class="mw-redirect">capital letter</a>. In the media and popular culture, a trend has also developed to regard it as a generic term or common noun and thus write it as "the internet", without capitalization. Some guides specify that the word should be capitalized as a noun but not capitalized as an adjective.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span>[</span>3<span>]</span></a></sup><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span>[</span>4<span>]</span></a></sup></p>
+<p>The terms <i>Internet</i> and <i>World Wide Web</i> are often used in everyday speech without much distinction. However, the Internet and the <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a> are not one and the same. The Internet establishes a global data communications system between computers. In contrast, the Web is one of the <a href="/wiki/Internet_Services" title="Internet Services" class="mw-redirect">services</a> communicated via the Internet. It is a collection of interconnected documents and other <a href="/wiki/Resource_(Web)" title="Resource (Web)">resources</a>, linked by <a href="/wiki/Hyperlink" title="Hyperlink">hyperlinks</a> and <a href="/wiki/Uniform_Resource_Locator" title="Uniform Resource Locator" class="mw-redirect">URLs</a>.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span>[</span>5<span>]</span></a></sup> In addition to the Web, the Internet also powers a multitude of other services, including (among others) email, file transfer, newsgroups, and online games. On the flip side, Web services can exist apart from the internet, such as on a private intranet.</p>
+<h2> <span class="mw-headline" id="History">History</span></h2>
+<div class="thumb tright">
+<div class="thumbinner" style="width:172px;"><a href="/wiki/File:Leonard-Kleinrock-and-IMP1.png" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/68/Leonard-Kleinrock-and-IMP1.png/170px-Leonard-Kleinrock-and-IMP1.png" width="170" height="217" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:Leonard-Kleinrock-and-IMP1.png" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+Professor <a href="/wiki/Leonard_Kleinrock" title="Leonard Kleinrock">Leonard Kleinrock</a> with the first ARPANET <a href="/wiki/Interface_Message_Processor" title="Interface Message Processor">Interface Message Processors</a> at UCLA</div>
+</div>
+</div>
+<div class="rellink relarticle mainarticle">Main articles: <a href="/wiki/History_of_the_Internet" title="History of the Internet">History of the Internet</a>  and <a href="/wiki/History_of_the_World_Wide_Web" title="History of the World Wide Web">History of the World Wide Web</a></div>
+<p>Research into <a href="/wiki/Packet_switching" title="Packet switching">packet switching</a> started in the early 1960s and packet switched networks such as <a href="/wiki/ARPANET" title="ARPANET">ARPANET</a>, <a href="/wiki/Donald_Davies" title="Donald Davies">Mark I</a> at <a href="/wiki/National_Physical_Laboratory_(United_Kingdom)" title="National Physical Laboratory (United Kingdom)">NPL in the UK</a>,<sup id="cite_ref-BBC_Technology_5-0" class="reference"><a href="#cite_note-BBC_Technology-5"><span>[</span>6<span>]</span></a></sup> <a href="/wiki/CYCLADES" title="CYCLADES">CYCLADES</a>,<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span>[</span>7<span>]</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span>[</span>8<span>]</span></a></sup> <a href="/wiki/Merit_Network" title="Merit Network">Merit Network</a>,<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span>[</span>9<span>]</span></a></sup> <a href="/wiki/Tymnet" title="Tymnet">Tymnet</a>, and <a href="/wiki/Telenet" title="Telenet">Telenet</a>, were developed in the late 1960s and early 1970s using a variety of <a href="/wiki/Communications_protocol" title="Communications protocol">protocols</a>. The ARPANET in particular led to the development of protocols for <a href="/wiki/Internetworking" title="Internetworking">internetworking</a>, where multiple separate networks could be joined together into a network of networks.</p>
+<p>The first two nodes of what would become the <a href="/wiki/ARPANET" title="ARPANET">ARPANET</a> were interconnected between <a href="/wiki/Leonard_Kleinrock" title="Leonard Kleinrock">Leonard Kleinrock</a>'s Network Measurement Center at the <a href="/wiki/Henry_Samueli_School_of_Engineering_and_Applied_Science" title="Henry Samueli School of Engineering and Applied Science">UCLA's School of Engineering and Applied Science</a> and <a href="/wiki/Douglas_Engelbart" title="Douglas Engelbart">Douglas Engelbart's</a> NLS system at <a href="/wiki/SRI_International" title="SRI International">SRI International</a> (SRI) in <a href="/wiki/Menlo_Park,_California" title="Menlo Park, California">Menlo Park, California</a>, on 29 October 1969.<sup id="cite_ref-NetValley_9-0" class="reference"><a href="#cite_note-NetValley-9"><span>[</span>10<span>]</span></a></sup> The third site on the ARPANET was the Culler-Fried Interactive Mathematics center at the <a href="/wiki/University_of_California_at_Santa_Barbara" title="University of California at Santa Barbara" class="mw-redirect">University of California at Santa Barbara</a>, and the fourth was the <a href="/wiki/University_of_Utah" title="University of Utah">University of Utah</a> Graphics Department. In an early sign of future growth, there were already fifteen sites connected to the young ARPANET by the end of 1971.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span>[</span>11<span>]</span></a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span>[</span>12<span>]</span></a></sup> These early years were documented in the 1972 film <a href="/wiki/Computer_Networks:_The_Heralds_of_Resource_Sharing" title="Computer Networks: The Heralds of Resource Sharing">Computer Networks: The Heralds of Resource Sharing</a>.</p>
+<p>Early international collaborations on ARPANET were sparse. For various political reasons, European developers were concerned with developing the <a href="/wiki/X.25" title="X.25">X.25</a> networks.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span>[</span>13<span>]</span></a></sup> Notable exceptions were the <i>Norwegian Seismic Array</i> (<a href="/wiki/NORSAR" title="NORSAR">NORSAR</a>) in 1972, followed in 1973 by Sweden with satellite links to the <a href="/wiki/Tanum_Municipality" title="Tanum Municipality">Tanum</a> Earth Station and <a href="/wiki/Peter_T._Kirstein" title="Peter T. Kirstein">Peter T. Kirstein</a>'s research group in the UK, initially at the <a href="/wiki/Institute_of_Computer_Science" title="Institute of Computer Science">Institute of Computer Science</a>, London University and later at <a href="/wiki/University_College_London" title="University College London">University College London</a>.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span>[</span>14<span>]</span></a></sup></p>
+<div class="thumb tright">
+<div class="thumbinner" style="width:222px;"><a href="/wiki/File:NSFNET-backbone-T3.png" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/e/e5/NSFNET-backbone-T3.png/220px-NSFNET-backbone-T3.png" width="220" height="133" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:NSFNET-backbone-T3.png" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+T3 NSFNET Backbone, c. 1992</div>
+</div>
+</div>
+<p>In 1982, the <a href="/wiki/Internet_Protocol_Suite" title="Internet Protocol Suite" class="mw-redirect">Internet Protocol Suite</a> (TCP/IP) was standardized and the concept of a world-wide network of fully interconnected TCP/IP networks called the Internet was introduced. Access to the ARPANET was expanded in 1981 when the <a href="/wiki/National_Science_Foundation" title="National Science Foundation">National Science Foundation</a> (NSF) developed the <a href="/wiki/CSNET" title="CSNET">Computer Science Network</a> (CSNET). In December 1974, <i><a class="external mw-magiclink-rfc" href="//tools.ietf.org/html/rfc675">RFC 675</a> – Specification of Internet Transmission Control Program</i>, by Vinton Cerf, Yogen Dalal, and Carl Sunshine, used the term <i>internet</i>, as a shorthand for <i>internetworking</i>; later <a href="/wiki/Request_for_Comments" title="Request for Comments">RFCs</a> repeat this use, so the word started out as an <a href="/wiki/Adjective" title="Adjective">adjective</a> rather than the <a href="/wiki/Noun" title="Noun">noun</a> it is today.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span>[</span>15<span>]</span></a></sup></p>
+<p>TCP/IP network access expanded again in 1986 when <a href="/wiki/NSFNET" title="NSFNET" class="mw-redirect">NSFNET</a> provided access to <a href="/wiki/Supercomputer" title="Supercomputer">supercomputer</a> sites in the United States from research and education organizations, first at 56 kbit/s and later at 1.5 Mbit/s and 45 Mbit/s.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span>[</span>16<span>]</span></a></sup> Commercial <a href="/wiki/Internet_service_providers" title="Internet service providers" class="mw-redirect">internet service providers</a> (ISPs) began to emerge in the late 1980s and 1990s. The ARPANET was decommissioned in 1990. The Internet was commercialized in 1995 when NSFNET was decommissioned, removing the last restrictions on the use of the Internet to carry commercial traffic.<sup id="cite_ref-ConneXions-April1996_16-0" class="reference"><a href="#cite_note-ConneXions-April1996-16"><span>[</span>17<span>]</span></a></sup> The Internet started a rapid expansion to Europe and Australia in the mid to late 1980s<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span>[</span>18<span>]</span></a></sup><sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span>[</span>19<span>]</span></a></sup> and to Asia in the late 1980s and early 1990s.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span>[</span>20<span>]</span></a></sup></p>
+<div class="thumb tright">
+<div class="thumbinner" style="width:222px;"><a href="/wiki/File:First_Web_Server.jpg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d1/First_Web_Server.jpg/220px-First_Web_Server.jpg" width="220" height="165" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:First_Web_Server.jpg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+This <a href="/wiki/NeXT_Computer" title="NeXT Computer">NeXT Computer</a> was used by <a href="/wiki/Sir_Tim_Berners-Lee" title="Sir Tim Berners-Lee" class="mw-redirect">Sir Tim Berners-Lee</a> at <a href="/wiki/CERN" title="CERN">CERN</a> and became the world's first <a href="/wiki/Web_server" title="Web server">Web server</a>.</div>
+</div>
+</div>
+<p>Since the mid-1990s the Internet has had a tremendous impact on culture and commerce, including the rise of near instant communication by email, <a href="/wiki/Instant_messaging" title="Instant messaging">instant messaging</a>, <a href="/wiki/Voice_over_Internet_Protocol" title="Voice over Internet Protocol" class="mw-redirect">Voice over Internet Protocol</a> (VoIP) "phone calls", <a href="/wiki/Video_chat" title="Video chat" class="mw-redirect">two-way interactive video calls</a>, and the <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a><sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span>[</span>21<span>]</span></a></sup> with its <a href="/wiki/Discussion_forums" title="Discussion forums" class="mw-redirect">discussion forums</a>, blogs, <a href="/wiki/Social_networking" title="Social networking" class="mw-redirect">social networking</a>, and <a href="/wiki/Online_shopping" title="Online shopping">online shopping</a> sites. Increasing amounts of data are transmitted at higher and higher speeds over fiber optic networks operating at 1-Gbit/s, 10-Gbit/s, or more. The Internet continues to grow, driven by ever greater amounts of online information and knowledge, commerce, entertainment and <a href="/wiki/Social_networking" title="Social networking" class="mw-redirect">social networking</a>.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span>[</span>22<span>]</span></a></sup></p>
+<p>During the late 1990s, it was estimated that traffic on the public Internet grew by 100 percent per year, while the mean annual growth in the number of Internet users was thought to be between 20% and 50%.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span>[</span>23<span>]</span></a></sup> This growth is often attributed to the lack of central administration, which allows organic growth of the network, as well as the non-proprietary open nature of the Internet protocols, which encourages vendor interoperability and prevents any one company from exerting too much control over the network.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span>[</span>24<span>]</span></a></sup> As of 31 March 2011, the estimated total number of <a href="/wiki/Internet_users" title="Internet users" class="mw-redirect">Internet users</a> was 2.095&#160;billion (30.2% of world population).<sup id="cite_ref-stats1_24-0" class="reference"><a href="#cite_note-stats1-24"><span>[</span>25<span>]</span></a></sup> It is estimated that in 1993 the Internet carried only 1% of the information flowing through two-way telecommunication, by 2000 this figure had grown to 51%, and by 2007 more than 97% of all telecommunicated information was carried over the Internet.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span>[</span>26<span>]</span></a></sup></p>
+<h2> <span class="mw-headline" id="Technology">Technology</span></h2>
+<h3> <span class="mw-headline" id="Protocols">Protocols</span></h3>
+<div class="rellink relarticle mainarticle">Main article: <a href="/wiki/Internet_protocol_suite" title="Internet protocol suite">Internet protocol suite</a></div>
+<div style="clear:both;"></div>
+<div class="thumb tright">
+<div class="thumbinner" style="width:302px;"><a href="/wiki/File:UDP_encapsulation.svg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3b/UDP_encapsulation.svg/300px-UDP_encapsulation.svg.png" width="300" height="188" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:UDP_encapsulation.svg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+As the user data is processed down through the protocol stack, each layer adds an encapsulation at the sending host. Data is transmitted "over the wire" at the link level, left to right. The encapsulation stack procedure is reversed by the receiving host. Intermediate relays remove and add a new link encapsulation for retransmission, and inspect the IP layer for routing purposes.</div>
+</div>
+</div>
+<table class="vertical-navbox nowraplinks hlist" cellspacing="5" style="float: right; clear: right; background-color: #f9f9f9; border: 1px solid #aaa; width:22em; margin: 0 0 1em 1em; padding: 0.2em; border-spacing: 0.4em 0; text-align: center; line-height: 1.4em; font-size: 88%;" cellpadding="0">
+<tr>
+<th class="" style="padding: 0.2em 0.4em 0.2em; font-size: 145%; line-height: 1.2em;"><a href="/wiki/Internet_protocol_suite" title="Internet protocol suite">Internet protocol suite</a></th>
+</tr>
+<tr>
+<th class="" style="padding-top: 0.2em;&#160;;"><a href="/wiki/Application_layer" title="Application layer">Application layer</a></th>
+</tr>
+<tr>
+<td class="" style="padding-bottom: 0.2em;&#160;;">
+<ul>
+<li><a href="/wiki/Dynamic_Host_Configuration_Protocol" title="Dynamic Host Configuration Protocol">DHCP</a></li>
+<li><a href="/wiki/DHCPv6" title="DHCPv6">DHCPv6</a></li>
+<li><a href="/wiki/Domain_Name_System" title="Domain Name System">DNS</a></li>
+<li><a href="/wiki/File_Transfer_Protocol" title="File Transfer Protocol">FTP</a></li>
+<li><a href="/wiki/Hypertext_Transfer_Protocol" title="Hypertext Transfer Protocol">HTTP</a></li>
+<li><a href="/wiki/Internet_Message_Access_Protocol" title="Internet Message Access Protocol">IMAP</a></li>
+<li><a href="/wiki/Internet_Relay_Chat" title="Internet Relay Chat">IRC</a></li>
+<li><a href="/wiki/Lightweight_Directory_Access_Protocol" title="Lightweight Directory Access Protocol">LDAP</a></li>
+<li><a href="/wiki/Media_Gateway_Control_Protocol" title="Media Gateway Control Protocol">MGCP</a></li>
+<li><a href="/wiki/Network_News_Transfer_Protocol" title="Network News Transfer Protocol">NNTP</a></li>
+<li><a href="/wiki/Border_Gateway_Protocol" title="Border Gateway Protocol">BGP</a></li>
+<li><a href="/wiki/Open_Shortest_Path_First" title="Open Shortest Path First">OSPF</a></li>
+<li><a href="/wiki/Network_Time_Protocol" title="Network Time Protocol">NTP</a></li>
+<li><a href="/wiki/Post_Office_Protocol" title="Post Office Protocol">POP</a></li>
+<li><a href="/wiki/Remote_procedure_call" title="Remote procedure call">RPC</a></li>
+<li><a href="/wiki/Real-time_Transport_Protocol" title="Real-time Transport Protocol">RTP</a></li>
+<li><a href="/wiki/Real_Time_Streaming_Protocol" title="Real Time Streaming Protocol">RTSP</a></li>
+<li><a href="/wiki/Routing_Information_Protocol" title="Routing Information Protocol">RIP</a></li>
+<li><a href="/wiki/Session_Initiation_Protocol" title="Session Initiation Protocol">SIP</a></li>
+<li><a href="/wiki/Simple_Mail_Transfer_Protocol" title="Simple Mail Transfer Protocol">SMTP</a></li>
+<li><a href="/wiki/Simple_Network_Management_Protocol" title="Simple Network Management Protocol">SNMP</a></li>
+<li><a href="/wiki/SOCKS" title="SOCKS">SOCKS</a></li>
+<li><a href="/wiki/Secure_Shell" title="Secure Shell">SSH</a></li>
+<li><a href="/wiki/Telnet" title="Telnet">Telnet</a></li>
+<li><a href="/wiki/Transport_Layer_Security" title="Transport Layer Security">TLS/SSL</a></li>
+<li><a href="/wiki/Extensible_Messaging_and_Presence_Protocol" title="Extensible Messaging and Presence Protocol">XMPP</a></li>
+<li><a href="/wiki/Category:Application_layer_protocols" title="Category:Application layer protocols">(more)</a></li>
+</ul>
+</td>
+</tr>
+<tr>
+<th class="" style="padding-top: 0.2em;&#160;;"><a href="/wiki/Transport_layer" title="Transport layer">Transport layer</a></th>
+</tr>
+<tr>
+<td class="" style="padding-bottom: 0.2em;&#160;;">
+<ul>
+<li><a href="/wiki/Transmission_Control_Protocol" title="Transmission Control Protocol">TCP</a></li>
+<li><a href="/wiki/User_Datagram_Protocol" title="User Datagram Protocol">UDP</a></li>
+<li><a href="/wiki/Datagram_Congestion_Control_Protocol" title="Datagram Congestion Control Protocol">DCCP</a></li>
+<li><a href="/wiki/Stream_Control_Transmission_Protocol" title="Stream Control Transmission Protocol">SCTP</a></li>
+<li><a href="/wiki/Resource_Reservation_Protocol" title="Resource Reservation Protocol">RSVP</a></li>
+<li><a href="/wiki/Category:Transport_layer_protocols" title="Category:Transport layer protocols">(more)</a></li>
+</ul>
+</td>
+</tr>
+<tr>
+<th class="" style="padding-top: 0.2em;&#160;;"><a href="/wiki/Internet_layer" title="Internet layer">Internet layer</a></th>
+</tr>
+<tr>
+<td class="" style="padding-bottom: 0.2em;&#160;;">
+<ul>
+<li><a href="/wiki/Internet_Protocol" title="Internet Protocol">IP</a>
+<ul>
+<li><a href="/wiki/IPv4" title="IPv4">IPv4</a></li>
+<li><a href="/wiki/IPv6" title="IPv6">IPv6</a></li>
+</ul>
+</li>
+<li><a href="/wiki/Internet_Control_Message_Protocol" title="Internet Control Message Protocol">ICMP</a></li>
+<li><a href="/wiki/ICMPv6" title="ICMPv6">ICMPv6</a></li>
+<li><a href="/wiki/Explicit_Congestion_Notification" title="Explicit Congestion Notification">ECN</a></li>
+<li><a href="/wiki/Internet_Group_Management_Protocol" title="Internet Group Management Protocol">IGMP</a></li>
+<li><a href="/wiki/IPsec" title="IPsec">IPsec</a></li>
+<li><a href="/wiki/Category:Internet_layer_protocols" title="Category:Internet layer protocols">(more)</a></li>
+</ul>
+</td>
+</tr>
+<tr>
+<th class="" style="padding-top: 0.2em;&#160;;"><a href="/wiki/Link_layer" title="Link layer">Link layer</a></th>
+</tr>
+<tr>
+<td class="" style="padding-bottom: 0.2em;&#160;;">
+<ul>
+<li><a href="/wiki/Address_Resolution_Protocol" title="Address Resolution Protocol">ARP/InARP</a></li>
+<li><a href="/wiki/Neighbor_Discovery_Protocol" title="Neighbor Discovery Protocol">NDP</a></li>
+<li><a href="/wiki/Tunneling_protocol" title="Tunneling protocol">Tunnels</a>
+<ul>
+<li><a href="/wiki/Layer_2_Tunneling_Protocol" title="Layer 2 Tunneling Protocol">L2TP</a></li>
+</ul>
+</li>
+<li><a href="/wiki/Point-to-point_protocol" title="Point-to-point protocol">PPP</a></li>
+<li><a href="/wiki/Media_access_control" title="Media access control">Media access control</a>
+<ul>
+<li><a href="/wiki/Ethernet" title="Ethernet">Ethernet</a></li>
+<li><a href="/wiki/Digital_subscriber_line" title="Digital subscriber line">DSL</a></li>
+<li><a href="/wiki/Integrated_Services_Digital_Network" title="Integrated Services Digital Network">ISDN</a></li>
+<li><a href="/wiki/Fiber_Distributed_Data_Interface" title="Fiber Distributed Data Interface">FDDI</a></li>
+</ul>
+</li>
+<li><a href="/wiki/Category:Link_protocols" title="Category:Link protocols">(more)</a></li>
+</ul>
+</td>
+</tr>
+<tr>
+<td style="text-align: right; font-size: 115%;">
+<div class="noprint plainlinks hlist navbar mini" style="">
+<ul>
+<li class="nv-view"><a href="/wiki/Template:IPstack" title="Template:IPstack"><span title="View this template" style="">v</span></a></li>
+<li class="nv-talk"><a href="/wiki/Template_talk:IPstack" title="Template talk:IPstack"><span title="Discuss this template" style="">t</span></a></li>
+<li class="nv-edit"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Template:IPstack&amp;action=edit"><span title="Edit this template" style="">e</span></a></li>
+</ul>
+</div>
+</td>
+</tr>
+</table>
+<p>The communications infrastructure of the Internet consists of its hardware components and a system of software layers that control various aspects of the architecture. While the hardware can often be used to support other software systems, it is the design and the rigorous standardization process of the software architecture that characterizes the Internet and provides the foundation for its scalability and success. The responsibility for the architectural design of the Internet software systems has been delegated to the <a href="/wiki/Internet_Engineering_Task_Force" title="Internet Engineering Task Force">Internet Engineering Task Force</a> (IETF).<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span>[</span>27<span>]</span></a></sup> The IETF conducts standard-setting work groups, open to any individual, about the various aspects of Internet architecture. Resulting discussions and final standards are published in a series of publications, each called a <a href="/wiki/Request_for_Comments" title="Request for Comments">Request for Comments</a> (RFC), freely available on the IETF web site. The principal methods of networking that enable the Internet are contained in specially designated RFCs that constitute the <a href="/wiki/Internet_Standard" title="Internet Standard">Internet Standards</a>. Other less rigorous documents are simply informative, experimental, or historical, or document the best current practices (BCP) when implementing Internet technologies.</p>
+<p>The Internet standards describe a framework known as the <a href="/wiki/Internet_protocol_suite" title="Internet protocol suite">Internet protocol suite</a>. This is a model architecture that divides methods into a layered system of protocols (<a class="external mw-magiclink-rfc" href="//tools.ietf.org/html/rfc1122">RFC 1122</a>, <a class="external mw-magiclink-rfc" href="//tools.ietf.org/html/rfc1123">RFC 1123</a>). The layers correspond to the environment or scope in which their services operate. At the top is the <a href="/wiki/Application_layer" title="Application layer">application layer</a>, the space for the application-specific networking methods used in software applications, e.g., a web browser program. Below this top layer, the <a href="/wiki/Transport_layer" title="Transport layer">transport layer</a> connects applications on <i>different hosts</i> via the network (e.g., <a href="/wiki/Client%E2%80%93server_model" title="Client–server model">client–server model</a>) with appropriate data exchange methods. Underlying these layers are the core networking technologies, consisting of two layers. The <a href="/wiki/Internet_layer" title="Internet layer">internet layer</a> enables computers to identify and locate each other via <a href="/wiki/IP_address" title="IP address">Internet Protocol (IP) addresses</a>, and allows them to connect to one-another via intermediate (transit) networks. Last, at the bottom of the architecture, is a software layer, the <a href="/wiki/Link_layer" title="Link layer">link layer</a>, that provides connectivity between hosts on the same local network link, such as a local area network (<a href="/wiki/LAN" title="LAN" class="mw-redirect">LAN</a>) or a <a href="/wiki/Dial-up_Internet_access" title="Dial-up Internet access">dial-up connection</a>. The model, also known as <a href="/wiki/TCP/IP" title="TCP/IP" class="mw-redirect">TCP/IP</a>, is designed to be independent of the underlying hardware, which the model therefore does not concern itself with in any detail. Other models have been developed, such as the <a href="/wiki/Open_Systems_Interconnection" title="Open Systems Interconnection">Open Systems Interconnection</a> (OSI) model, but they are not compatible in the details of description or implementation; many similarities exist and the TCP/IP protocols are usually included in the discussion of OSI networking.</p>
+<p>The most prominent component of the Internet model is the Internet Protocol (IP), which provides addressing systems (<a href="/wiki/IP_address" title="IP address">IP addresses</a>) for computers on the Internet. IP enables internetworking and in essence establishes the Internet itself. IP Version 4 (<a href="/wiki/IPv4" title="IPv4">IPv4</a>) is the initial version used on the first generation of today's Internet and is still in dominant use. It was designed to address up to ~4.3&#160;billion (10<sup>9</sup>) Internet hosts. However, the explosive growth of the Internet has led to <a href="/wiki/IPv4_address_exhaustion" title="IPv4 address exhaustion">IPv4 address exhaustion</a>, which entered its final stage in 2011,<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span>[</span>28<span>]</span></a></sup> when the global address allocation pool was exhausted. A new protocol version, IPv6, was developed in the mid-1990s, which provides vastly larger addressing capabilities and more efficient routing of Internet traffic. <a href="/wiki/IPv6" title="IPv6">IPv6</a> is currently in growing <a href="/wiki/IPv6_deployment" title="IPv6 deployment">deployment</a> around the world, since Internet address registries (<a href="/wiki/Regional_Internet_registry" title="Regional Internet registry">RIRs</a>) began to urge all resource managers to plan rapid adoption and conversion.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span>[</span>29<span>]</span></a></sup></p>
+<p>IPv6 is not interoperable with IPv4. In essence, it establishes a parallel version of the Internet not directly accessible with IPv4 software. This means software upgrades or translator facilities are necessary for networking devices that need to communicate on both networks. Most modern computer operating systems already support both versions of the Internet Protocol. Network infrastructures, however, are still lagging in this development. Aside from the complex array of physical connections that make up its infrastructure, the Internet is facilitated by bi- or multi-lateral commercial contracts (e.g., <a href="/wiki/Peering_agreement" title="Peering agreement" class="mw-redirect">peering agreements</a>), and by technical specifications or protocols that describe how to exchange data over the network. Indeed, the Internet is defined by its interconnections and routing policies.</p>
+<h3> <span class="mw-headline" id="Routing">Routing</span></h3>
+<div class="thumb tright">
+<div class="thumbinner" style="width:502px;"><a href="/wiki/File:Internet_Connectivity_Distribution_%26_Core.svg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Internet_Connectivity_Distribution_%26_Core.svg/500px-Internet_Connectivity_Distribution_%26_Core.svg.png" width="500" height="292" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:Internet_Connectivity_Distribution_%26_Core.svg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+Internet packet routing is accomplished among various tiers of Internet Service Providers.</div>
+</div>
+</div>
+<p><a href="/wiki/Internet_Service_Provider" title="Internet Service Provider" class="mw-redirect">Internet Service Providers</a> connect customers (thought of at the "bottom" of the routing hierarchy) to customers of other ISPs. At the "top" of the routing hierarchy are ten or so <a href="/wiki/Tier_1_network" title="Tier 1 network">Tier 1 networks</a>, large telecommunication companies which exchange traffic directly "across" to all other Tier 1 networks via unpaid <a href="/wiki/Peering" title="Peering">peering</a> agreements. <a href="/wiki/Tier_2_network" title="Tier 2 network">Tier 2 networks</a> buy <a href="/wiki/Internet_transit" title="Internet transit">Internet transit</a> from other ISP to reach at least some parties on the global Internet, though they may also engage in unpaid peering (especially for local partners of a similar size). ISPs can use a single "upstream" provider for connectivity, or use <a href="/wiki/Multihoming" title="Multihoming">multihoming</a> to provide protection from problems with individual links. <a href="/wiki/Internet_exchange_point" title="Internet exchange point">Internet exchange points</a> create physical connections between multiple ISPs, often hosted in buildings owned by independent third parties.<sup class="Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources from April 2012">citation needed</span></a></i>]</sup></p>
+<p>Computers and routers use <a href="/wiki/Routing_table" title="Routing table">routing tables</a> to direct IP packets among locally connected machines. Tables can be constructed manually or automatically via <a href="/wiki/DHCP" title="DHCP" class="mw-redirect">DHCP</a> for an individual computer or a <a href="/wiki/Routing_protocol" title="Routing protocol">routing protocol</a> for routers themselves. In single-homed situations, a <a href="/wiki/Default_route" title="Default route">default route</a> usually points "up" toward an ISP providing transit. Higher-level ISPs use the <a href="/wiki/Border_Gateway_Protocol" title="Border Gateway Protocol">Border Gateway Protocol</a> to sort out paths to any given <a href="/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing">range of IP addresses</a> across the complex connections of the global Internet.<sup class="Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources from April 2012">citation needed</span></a></i>]</sup></p>
+<p>Academic institutions, large companies, governments, and other organizations can perform the same role as ISPs, engaging in peering and purchasing transit on behalf of their internal networks of individual computers. Research networks tend to interconnect into large subnetworks such as <a href="/wiki/GEANT" title="GEANT" class="mw-redirect">GEANT</a>, <a href="/wiki/GLORIAD" title="GLORIAD">GLORIAD</a>, <a href="/wiki/Internet2" title="Internet2">Internet2</a>, and the UK's <a href="/wiki/National_research_and_education_network" title="National research and education network">national research and education network</a>, <a href="/wiki/JANET" title="JANET">JANET</a>. These in turn are built around smaller networks (see the list of <a href="/wiki/Category:Academic_computer_network_organizations" title="Category:Academic computer network organizations">academic computer network organizations</a>).<sup class="Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources from April 2012">citation needed</span></a></i>]</sup></p>
+<p>Not all <a href="/wiki/Computer_networks" title="Computer networks" class="mw-redirect">computer networks</a> are connected to the Internet. For example, some <a href="/wiki/Classified_United_States_website" title="Classified United States website">classified United States websites</a> are only accessible from separate secure networks.<sup class="Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources from April 2012">citation needed</span></a></i>]</sup></p>
+<h3> <span class="mw-headline" id="General_structure">General structure</span></h3>
+<p>The Internet structure and its usage characteristics have been studied extensively. It has been determined that both the Internet IP routing structure and hypertext links of the World Wide Web are examples of <a href="/wiki/Scale-free_network" title="Scale-free network">scale-free networks</a>.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span>[</span>30<span>]</span></a></sup></p>
+<p>Many computer scientists describe the Internet as a "prime example of a large-scale, highly engineered, yet highly complex system".<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span>[</span>31<span>]</span></a></sup> The Internet is heterogeneous; for instance, <a href="/wiki/Data_transfer_rate" title="Data transfer rate" class="mw-redirect">data transfer rates</a> and physical characteristics of connections vary widely. The Internet exhibits "<a href="/wiki/Emergence" title="Emergence">emergent phenomena</a>" that depend on its large-scale organization. For example, data transfer rates exhibit temporal <a href="/wiki/Self-similarity" title="Self-similarity">self-similarity</a>. The principles of the routing and addressing methods for traffic in the Internet reach back to their origins in the 1960s when the eventual scale and popularity of the network could not be anticipated. Thus, the possibility of developing alternative structures is investigated.<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span>[</span>32<span>]</span></a></sup> The Internet structure was found to be highly robust<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span>[</span>33<span>]</span></a></sup> to random failures and very vulnerable to high degree attacks.<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span>[</span>34<span>]</span></a></sup></p>
+<h2> <span class="mw-headline" id="Governance">Governance</span></h2>
+<div class="rellink relarticle mainarticle">Main article: <a href="/wiki/Internet_governance" title="Internet governance">Internet governance</a></div>
+<div class="thumb tright">
+<div class="thumbinner" style="width:222px;"><a href="/wiki/File:Icannheadquarters.jpg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/1/18/Icannheadquarters.jpg/220px-Icannheadquarters.jpg" width="220" height="168" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:Icannheadquarters.jpg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+ICANN headquarters in <a href="/wiki/Marina_Del_Rey" title="Marina Del Rey" class="mw-redirect">Marina Del Rey</a>, California, United States</div>
+</div>
+</div>
+<p>The Internet is a <a href="/wiki/Global_network" title="Global network">globally distributed network</a> comprising many voluntarily interconnected autonomous networks. It operates without a central governing body. However, to maintain interoperability, all technical and policy aspects of the underlying core infrastructure and the principal <a href="/wiki/Name_space" title="Name space" class="mw-redirect">name spaces</a> are administered by the <a href="/wiki/Internet_Corporation_for_Assigned_Names_and_Numbers" title="Internet Corporation for Assigned Names and Numbers" class="mw-redirect">Internet Corporation for Assigned Names and Numbers</a> (ICANN), headquartered in <a href="/wiki/Marina_del_Rey,_California" title="Marina del Rey, California">Marina del Rey, California</a>. ICANN is the authority that coordinates the assignment of unique identifiers for use on the Internet, including <a href="/wiki/Domain_name" title="Domain name">domain names</a>, Internet Protocol (IP) addresses, application port numbers in the transport protocols, and many other parameters. Globally unified name spaces, in which names and numbers are uniquely assigned, are essential for the global reach of the Internet. ICANN is governed by an international board of directors drawn from across the Internet technical, business, academic, and other non-commercial communities. The government of the United States continues to have the primary role in approving changes to the <a href="/wiki/DNS_root_zone" title="DNS root zone">DNS root zone</a> that lies at the heart of the domain name system.<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span>[</span>35<span>]</span></a></sup> ICANN's role in coordinating the assignment of unique identifiers distinguishes it as perhaps the only central coordinating body on the global Internet. On 16 November 2005, the <a href="/wiki/World_Summit_on_the_Information_Society" title="World Summit on the Information Society">World Summit on the Information Society</a>, held in <a href="/wiki/Tunis" title="Tunis">Tunis</a>, established the <a href="/wiki/Internet_Governance_Forum" title="Internet Governance Forum">Internet Governance Forum</a> (IGF) to discuss Internet-related issues.</p>
+<h2> <span class="mw-headline" id="Modern_uses">Modern uses</span></h2>
+<p>The Internet allows greater flexibility in working hours and location, especially with the spread of unmetered high-speed connections. The Internet can be accessed almost anywhere by numerous means, including through <a href="/wiki/Mobile_Internet_device" title="Mobile Internet device">mobile Internet devices</a>. Mobile phones, <a href="/wiki/Datacard" title="Datacard">datacards</a>, <a href="/wiki/Handheld_game_console" title="Handheld game console">handheld game consoles</a> and <a href="/wiki/Cellular_router" title="Cellular router">cellular routers</a> allow users to connect to the Internet <a href="/wiki/Wireless" title="Wireless">wirelessly</a>. Within the limitations imposed by small screens and other limited facilities of such pocket-sized devices, the services of the Internet, including email and the web, may be available. Service providers may restrict the services offered and mobile data charges may be significantly higher than other access methods.</p>
+<p>Educational material at all levels from pre-school to post-doctoral is available from websites. Examples range from <a href="/wiki/CBeebies" title="CBeebies">CBeebies</a>, through school and high-school revision guides, <a href="/wiki/Virtual_university" title="Virtual university">virtual universities</a>, to access to top-end scholarly literature through the likes of <a href="/wiki/Google_Scholar" title="Google Scholar">Google Scholar</a>. For <a href="/wiki/Distance_education" title="Distance education">distance education</a>, help with <a href="/wiki/Homework" title="Homework">homework</a> and other assignments, self-guided learning, whiling away spare time, or just looking up more detail on an interesting fact, it has never been easier for people to access educational information at any level from anywhere. The Internet in general and the <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a> in particular are important enablers of both <a href="/wiki/Education" title="Education">formal</a> and <a href="/wiki/Informal_education" title="Informal education">informal education</a>.</p>
+<p>The low cost and nearly instantaneous sharing of ideas, knowledge, and skills has made <a href="/wiki/Collaboration" title="Collaboration">collaborative</a> work dramatically easier, with the help of <a href="/wiki/Collaborative_software" title="Collaborative software">collaborative software</a>. Not only can a group cheaply communicate and share ideas but the wide reach of the Internet allows such groups more easily to form. An example of this is the <a href="/wiki/Free_software_movement" title="Free software movement">free software movement</a>, which has produced, among other things, <a href="/wiki/Linux" title="Linux">Linux</a>, <a href="/wiki/Mozilla_Firefox" title="Mozilla Firefox" class="mw-redirect">Mozilla Firefox</a>, and <a href="/wiki/OpenOffice.org" title="OpenOffice.org" class="mw-redirect">OpenOffice.org</a>. Internet chat, whether in the form of an <a href="/wiki/IRC" title="IRC" class="mw-redirect">IRC</a> chat room or channel, via an <a href="/wiki/Instant_messaging" title="Instant messaging">instant messaging</a> system, or a <a href="/wiki/Social_networking" title="Social networking" class="mw-redirect">social networking</a> website, allows colleagues to stay in touch in a very convenient way when working at their computers during the day. Messages can be exchanged even more quickly and conveniently than via email. These systems may allow files to be exchanged, drawings and images to be shared, or voice and video contact between team members.</p>
+<p><a href="/wiki/Content_management" title="Content management">Content management</a> systems allow collaborating teams to work on shared sets of documents simultaneously without accidentally destroying each other's work. Business and project teams can share calendars as well as documents and other information. Such collaboration occurs in a wide variety of areas including scientific research, software development, conference planning, political activism and creative writing. Social and political collaboration is also becoming more widespread as both Internet access and <a href="/wiki/Computer_literacy" title="Computer literacy">computer literacy</a> spread.</p>
+<p>The Internet allows computer users to <a href="/wiki/Remote_access" title="Remote access">remotely access</a> other computers and information stores easily, wherever they may be. They may do this with or without <a href="/wiki/Computer_security" title="Computer security">computer security</a>, i.e. authentication and encryption technologies, depending on the requirements. This is encouraging new ways of working from home, collaboration and information sharing in many industries. An accountant sitting at home can <a href="/wiki/Audit" title="Audit">audit</a> the books of a company based in another country, on a <a href="/wiki/Server_(computing)" title="Server (computing)">server</a> situated in a third country that is remotely maintained by IT specialists in a fourth. These accounts could have been created by home-working bookkeepers, in other remote locations, based on information emailed to them from offices all over the world. Some of these things were possible before the widespread use of the Internet, but the cost of private <a href="/wiki/Leased_line" title="Leased line">leased lines</a> would have made many of them infeasible in practice. An office worker away from their desk, perhaps on the other side of the world on a business trip or a holiday, can access their emails, access their data using <a href="/wiki/Cloud_computing" title="Cloud computing">cloud computing</a>, or open a <a href="/wiki/Remote_Desktop_Protocol" title="Remote Desktop Protocol">remote desktop</a> session into their office PC using a secure <a href="/wiki/Virtual_Private_Network" title="Virtual Private Network" class="mw-redirect">Virtual Private Network</a> (VPN) connection on the Internet. This can give the worker complete access to all of their normal files and data, including email and other applications, while away from the office. This concept has been referred to among <a href="/wiki/System_administrator" title="System administrator">system administrators</a> as the Virtual Private Nightmare,<sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span>[</span>36<span>]</span></a></sup> because it extends the secure perimeter of a corporate network into remote locations and its employees' homes.</p>
+<h2> <span class="mw-headline" id="Services">Services</span></h2>
+<h3> <span class="mw-headline" id="Information">Information</span></h3>
+<p>Many people use the terms <i>Internet</i> and <i>World Wide Web</i>, or just the <i>Web</i>, interchangeably, but the two terms are not <a href="/wiki/Synonymous" title="Synonymous" class="mw-redirect">synonymous</a>. The <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a> is a global set of <a href="/wiki/Documents" title="Documents" class="mw-redirect">documents</a>, <a href="/wiki/Computer_graphics" title="Computer graphics">images</a> and other resources, logically interrelated by <a href="/wiki/Hyperlink" title="Hyperlink">hyperlinks</a> and referenced with <a href="/wiki/Uniform_Resource_Identifier" title="Uniform Resource Identifier" class="mw-redirect">Uniform Resource Identifiers</a> (URIs). URIs symbolically identify services, <a href="/wiki/Web_servers" title="Web servers" class="mw-redirect">servers</a>, and other databases, and the documents and resources that they can provide. <a href="/wiki/Hypertext_Transfer_Protocol" title="Hypertext Transfer Protocol">Hypertext Transfer Protocol</a> (HTTP) is the main access protocol of the World Wide Web, but it is only one of the hundreds of communication protocols used on the Internet. <a href="/wiki/Web_service" title="Web service">Web services</a> also use HTTP to allow software systems to communicate in order to share and exchange business logic and data.</p>
+<p>World Wide Web browser software, such as Microsoft's <a href="/wiki/Internet_Explorer" title="Internet Explorer">Internet Explorer</a>, <a href="/wiki/Mozilla_Firefox" title="Mozilla Firefox" class="mw-redirect">Mozilla Firefox</a>, <a href="/wiki/Opera_(web_browser)" title="Opera (web browser)">Opera</a>, <a href="/wiki/Apple_Inc." title="Apple Inc.">Apple</a>'s <a href="/wiki/Safari_(web_browser)" title="Safari (web browser)">Safari</a>, and <a href="/wiki/Google_Chrome" title="Google Chrome">Google Chrome</a>, lets users navigate from one web page to another via hyperlinks embedded in the documents. These documents may also contain any combination of <a href="/wiki/Computer_data" title="Computer data" class="mw-redirect">computer data</a>, including graphics, sounds, <a href="/wiki/Plain_text" title="Plain text">text</a>, <a href="/wiki/Web_video" title="Web video" class="mw-redirect">video</a>, <a href="/wiki/Multimedia" title="Multimedia">multimedia</a> and interactive content that runs while the user is interacting with the page. <a href="/wiki/Client-side_scripting" title="Client-side scripting">Client-side software</a> can include animations, <a href="/wiki/Web_game" title="Web game" class="mw-redirect">games</a>, <a href="/wiki/Office_applications" title="Office applications" class="mw-redirect">office applications</a> and scientific demonstrations. Through <a href="/wiki/Keyword_(Internet_search)" title="Keyword (Internet search)" class="mw-redirect">keyword</a>-driven <a href="/wiki/Internet_research" title="Internet research">Internet research</a> using <a href="/wiki/Web_search_engine" title="Web search engine">search engines</a> like <a href="/wiki/Yahoo!_Search" title="Yahoo! Search">Yahoo!</a> and <a href="/wiki/Google_(search_engine)" title="Google (search engine)" class="mw-redirect">Google</a>, users worldwide have easy, instant access to a vast and diverse amount of online information. Compared to printed media, books, encyclopedias and traditional libraries, the World Wide Web has enabled the decentralization of information on a large scale.</p>
+<p>The Web has also enabled individuals and organizations to <a href="/wiki/Publish" title="Publish" class="mw-redirect">publish</a> ideas and information to a potentially large <a href="/wiki/Audience" title="Audience">audience</a> online at greatly reduced expense and time delay. Publishing a web page, a blog, or building a website involves little initial <a href="/wiki/Cost" title="Cost">cost</a> and many cost-free services are available. Publishing and maintaining large, professional web sites with attractive, diverse and up-to-date information is still a difficult and expensive proposition, however. Many individuals and some companies and groups use <i>web logs</i> or blogs, which are largely used as easily updatable online diaries. Some commercial organizations encourage <a href="/wiki/Employees" title="Employees" class="mw-redirect">staff</a> to communicate advice in their areas of specialization in the hope that visitors will be impressed by the expert knowledge and free information, and be attracted to the corporation as a result. One example of this practice is <a href="/wiki/Microsoft" title="Microsoft">Microsoft</a>, whose <a href="/wiki/Software_developer" title="Software developer">product developers</a> publish their personal blogs in order to pique the public's interest in their work. Collections of personal web pages published by large service providers remain popular, and have become increasingly sophisticated. Whereas operations such as <a href="/wiki/Angelfire" title="Angelfire">Angelfire</a> and <a href="/wiki/GeoCities" title="GeoCities">GeoCities</a> have existed since the early days of the Web, newer offerings from, for example, Facebook and Twitter currently have large followings. These operations often brand themselves as <a href="/wiki/Social_network_service" title="Social network service" class="mw-redirect">social network services</a> rather than simply as web page hosts.</p>
+<p><a href="/wiki/Online_advertising" title="Online advertising">Advertising</a> on popular web pages can be lucrative, and <a href="/wiki/E-commerce" title="E-commerce" class="mw-redirect">e-commerce</a> or the sale of products and services directly via the Web continues to grow.</p>
+<p>When the Web began in the 1990s, a typical web page was stored in completed form on a web server, formatted in <a href="/wiki/HTML" title="HTML">HTML</a>, ready to be sent to a user's browser in response to a request. Over time, the process of creating and serving web pages has become more automated and more dynamic. Websites are often created using <a href="/wiki/Content_management" title="Content management">content management</a> or <a href="/wiki/Wiki" title="Wiki">wiki</a> software with, initially, very little content. Contributors to these systems, who may be paid staff, members of a club or other organization or members of the public, fill underlying databases with content using editing pages designed for that purpose, while casual visitors view and read this content in its final HTML form. There may or may not be editorial, approval and security systems built into the process of taking newly entered content and making it available to the target visitors.</p>
+<h3> <span class="mw-headline" id="Communication">Communication</span></h3>
+<p>Email is an important communications service available on the Internet. The concept of sending electronic text messages between parties in a way analogous to mailing letters or memos predates the creation of the Internet. Pictures, documents and other files are sent as <a href="/wiki/Email_attachment" title="Email attachment">email attachments</a>. Emails can be <a href="/wiki/Carbon_copy" title="Carbon copy">cc-ed</a> to multiple <a href="/wiki/Email_address" title="Email address">email addresses</a>.</p>
+<p><a href="/wiki/Internet_telephony" title="Internet telephony" class="mw-redirect">Internet telephony</a> is another common communications service made possible by the creation of the Internet. <a href="/wiki/VoIP" title="VoIP" class="mw-redirect">VoIP</a> stands for Voice-over-<a href="/wiki/Internet_Protocol" title="Internet Protocol">Internet Protocol</a>, referring to the protocol that underlies all Internet communication. The idea began in the early 1990s with <a href="/wiki/Walkie-talkie" title="Walkie-talkie">walkie-talkie</a>-like voice applications for personal computers. In recent years many VoIP systems have become as easy to use and as convenient as a normal telephone. The benefit is that, as the Internet carries the voice traffic, VoIP can be free or cost much less than a traditional telephone call, especially over long distances and especially for those with always-on Internet connections such as <a href="/wiki/Cable_modem" title="Cable modem">cable</a> or <a href="/wiki/ADSL" title="ADSL" class="mw-redirect">ADSL</a>. VoIP is maturing into a competitive alternative to traditional telephone service. Interoperability between different providers has improved and the ability to call or receive a call from a traditional telephone is available. Simple, inexpensive VoIP network adapters are available that eliminate the need for a personal computer.</p>
+<p>Voice quality can still vary from call to call, but is often equal to and can even exceed that of traditional calls. Remaining problems for VoIP include <a href="/wiki/Emergency_telephone_number" title="Emergency telephone number">emergency telephone number</a> dialing and reliability. Currently, a few VoIP providers provide an emergency service, but it is not universally available. Traditional phones are line-powered and operate during a power failure; VoIP does not do so without a <a href="/wiki/Uninterruptible_power_supply" title="Uninterruptible power supply">backup power source</a> for the phone equipment and the Internet access devices. VoIP has also become increasingly popular for gaming applications, as a form of communication between players. Popular VoIP clients for gaming include <a href="/wiki/Ventrilo" title="Ventrilo">Ventrilo</a> and <a href="/wiki/Teamspeak" title="Teamspeak" class="mw-redirect">Teamspeak</a>. <a href="/wiki/Wii" title="Wii">Wii</a>, <a href="/wiki/PlayStation_3" title="PlayStation 3">PlayStation 3</a>, and <a href="/wiki/Xbox_360" title="Xbox 360">Xbox 360</a> also offer VoIP chat features.</p>
+<h3> <span class="mw-headline" id="Data_transfer">Data transfer</span></h3>
+<p><a href="/wiki/File_sharing" title="File sharing">File sharing</a> is an example of transferring large amounts of data across the Internet. A <a href="/wiki/Computer_file" title="Computer file">computer file</a> can be emailed to customers, colleagues and friends as an attachment. It can be uploaded to a website or <a href="/wiki/File_Transfer_Protocol" title="File Transfer Protocol">FTP</a> server for easy download by others. It can be put into a "shared location" or onto a <a href="/wiki/File_server" title="File server">file server</a> for instant use by colleagues. The load of bulk downloads to many users can be eased by the use of "<a href="/wiki/Mirror_(computing)" title="Mirror (computing)">mirror</a>" servers or <a href="/wiki/Peer-to-peer" title="Peer-to-peer">peer-to-peer</a> networks. In any of these cases, access to the file may be controlled by user <a href="/wiki/Authentication" title="Authentication">authentication</a>, the transit of the file over the Internet may be obscured by <a href="/wiki/Encryption" title="Encryption">encryption</a>, and money may change hands for access to the file. The price can be paid by the remote charging of funds from, for example, a credit card whose details are also passed – usually fully encrypted – across the Internet. The origin and authenticity of the file received may be checked by <a href="/wiki/Digital_signature" title="Digital signature">digital signatures</a> or by <a href="/wiki/MD5" title="MD5">MD5</a> or other message digests. These simple features of the Internet, over a worldwide basis, are changing the production, sale, and distribution of anything that can be reduced to a computer file for transmission. This includes all manner of print publications, software products, news, music, film, video, photography, graphics and the other arts. This in turn has caused seismic shifts in each of the existing industries that previously controlled the production and distribution of these products.</p>
+<p><a href="/wiki/Streaming_media" title="Streaming media">Streaming media</a> is the real-time delivery of digital media for the immediate consumption or enjoyment by end users. Many radio and television broadcasters provide Internet feeds of their live audio and video productions. They may also allow time-shift viewing or listening such as Preview, Classic Clips and Listen Again features. These providers have been joined by a range of pure Internet "broadcasters" who never had on-air licenses. This means that an Internet-connected device, such as a computer or something more specific, can be used to access on-line media in much the same way as was previously possible only with a television or radio receiver. The range of available types of content is much wider, from specialized technical <a href="/wiki/Webcast" title="Webcast">webcasts</a> to on-demand popular multimedia services. <a href="/wiki/Podcast" title="Podcast">Podcasting</a> is a variation on this theme, where – usually audio – material is downloaded and played back on a computer or shifted to a <a href="/wiki/Portable_media_player" title="Portable media player">portable media player</a> to be listened to on the move. These techniques using simple equipment allow anybody, with little censorship or licensing control, to broadcast audio-visual material worldwide.</p>
+<p>Digital media streaming increases the demand for network bandwidth. For example, standard image quality needs 1 Mbit/s link speed for SD 480p, HD 720p quality requires 2.5 Mbit/s, and the top-of-the-line HDX quality needs 4.5 Mbit/s for 1080p.<sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span>[</span>37<span>]</span></a></sup></p>
+<p><a href="/wiki/Webcam" title="Webcam">Webcams</a> are a low-cost extension of this phenomenon. While some webcams can give full-frame-rate video, the picture either is usually small or updates slowly. Internet users can watch animals around an African waterhole, ships in the <a href="/wiki/Panama_Canal" title="Panama Canal">Panama Canal</a>, traffic at a local roundabout or monitor their own premises, live and in real time. Video <a href="/wiki/Chat_rooms" title="Chat rooms" class="mw-redirect">chat rooms</a> and <a href="/wiki/Video_conferencing" title="Video conferencing" class="mw-redirect">video conferencing</a> are also popular with many uses being found for personal webcams, with and without two-way sound. YouTube was founded on 15 February 2005 and is now the leading website for free streaming video with a vast number of users. It uses a <a href="/wiki/Adobe_Flash" title="Adobe Flash">flash</a>-based web player to stream and show video files. Registered users may upload an unlimited amount of video and build their own personal profile. YouTube claims that its users watch hundreds of millions, and upload hundreds of thousands of videos daily.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span>[</span>38<span>]</span></a></sup></p>
+<h2> <span class="mw-headline" id="Access">Access</span></h2>
+<div class="rellink relarticle mainarticle">Main article: <a href="/wiki/Internet_access" title="Internet access">Internet access</a></div>
+<p>Common methods of <a href="/wiki/Internet_access" title="Internet access">Internet access</a> in homes include dial-up, landline <a href="/wiki/Broadband_Internet_access" title="Broadband Internet access" class="mw-redirect">broadband</a> (over <a href="/wiki/Coaxial_cable" title="Coaxial cable">coaxial cable</a>, <a href="/wiki/Fiber_optic" title="Fiber optic" class="mw-redirect">fiber optic</a> or copper wires), <a href="/wiki/Wi-Fi" title="Wi-Fi">Wi-Fi</a>, <a href="/wiki/Satellite_Internet" title="Satellite Internet" class="mw-redirect">satellite</a> and <a href="/wiki/3G" title="3G">3G</a>/<a href="/wiki/4G" title="4G">4G</a> technology <a href="/wiki/Mobile_phone" title="Mobile phone">cell phones</a>. Public places to use the Internet include libraries and <a href="/wiki/Internet_cafe" title="Internet cafe" class="mw-redirect">Internet cafes</a>, where computers with Internet connections are available. There are also <a href="/wiki/Internet_kiosk" title="Internet kiosk" class="mw-redirect">Internet access points</a> in many public places such as airport halls and coffee shops, in some cases just for brief use while standing. Various terms are used, such as "public Internet kiosk", "public access terminal", and "Web <a href="/wiki/Payphone" title="Payphone">payphone</a>". Many hotels now also have public terminals, though these are usually fee-based. These terminals are widely accessed for various usage like ticket booking, bank deposit, online payment etc. Wi-Fi provides wireless access to computer networks, and therefore can do so to the Internet itself. <a href="/wiki/Hotspot_(Wi-Fi)" title="Hotspot (Wi-Fi)">Hotspots</a> providing such access include <a href="/wiki/Wi-Fi#Internet_access" title="Wi-Fi">Wi-Fi cafes</a>, where would-be users need to bring their own wireless-enabled devices such as a laptop or <a href="/wiki/Personal_Digital_Assistant" title="Personal Digital Assistant" class="mw-redirect">PDA</a>. These services may be free to all, free to customers only, or fee-based. A hotspot need not be limited to a confined location. A whole campus or park, or even an entire city can be enabled.</p>
+<p><a href="/wiki/Grassroots" title="Grassroots">Grassroots</a> efforts have led to <a href="/wiki/Wireless_community_network" title="Wireless community network">wireless community networks</a>. Commercial Wi-Fi services covering large city areas are in place in London, <a href="/wiki/Vienna" title="Vienna">Vienna</a>, <a href="/wiki/Toronto" title="Toronto">Toronto</a>, San Francisco, <a href="/wiki/Philadelphia" title="Philadelphia">Philadelphia</a>, Chicago and <a href="/wiki/Pittsburgh" title="Pittsburgh">Pittsburgh</a>. The Internet can then be accessed from such places as a park bench.<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span>[</span>39<span>]</span></a></sup> Apart from Wi-Fi, there have been experiments with proprietary mobile wireless networks like <a href="/wiki/Ricochet_(Internet_service)" title="Ricochet (Internet service)">Ricochet</a>, various high-speed data services over cellular phone networks, and fixed wireless services. High-end mobile phones such as <a href="/wiki/Smartphone" title="Smartphone">smartphones</a> in general come with Internet access through the phone network. Web browsers such as <a href="/wiki/Opera_(web_browser)" title="Opera (web browser)">Opera</a> are available on these advanced handsets, which can also run a wide variety of other Internet software. More mobile phones have Internet access than PCs, though this is not as widely used.<sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span>[</span>40<span>]</span></a></sup> An Internet access provider and protocol matrix differentiates the methods used to get online.</p>
+<p>An Internet blackout or outage can be caused by local signaling interruptions. Disruptions of <a href="/wiki/Submarine_communications_cable" title="Submarine communications cable">submarine communications cables</a> may cause blackouts or slowdowns to large areas, such as in the <a href="/wiki/2008_submarine_cable_disruption" title="2008 submarine cable disruption">2008 submarine cable disruption</a>. Less-developed countries are more vulnerable due to a small number of high-capacity links. Land cables are also vulnerable, as in 2011 when a woman digging for scrap metal severed most connectivity for the nation of Armenia.<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span>[</span>41<span>]</span></a></sup> Internet blackouts affecting almost entire countries can be achieved by governments as a form of <a href="/wiki/Internet_censorship" title="Internet censorship">Internet censorship</a>, as in the blockage of the <a href="/wiki/Internet_in_Egypt" title="Internet in Egypt">Internet in Egypt</a>, whereby approximately 93%<sup id="cite_ref-renesys1_41-0" class="reference"><a href="#cite_note-renesys1-41"><span>[</span>42<span>]</span></a></sup> of networks were without access in 2011 in an attempt to stop mobilization for <a href="/wiki/Egyptian_Revolution_of_2011" title="Egyptian Revolution of 2011" class="mw-redirect">anti-government protests</a>.<sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span>[</span>43<span>]</span></a></sup></p>
+<h2> <span class="mw-headline" id="Users">Users</span></h2>
+<div class="thumb tright">
+<div class="thumbinner" style="width:402px;"><a href="/wiki/File:Internet_users_per_100_inhabitants_ITU.svg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/2/29/Internet_users_per_100_inhabitants_ITU.svg/400px-Internet_users_per_100_inhabitants_ITU.svg.png" width="400" height="264" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:Internet_users_per_100_inhabitants_ITU.svg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+<center><b>Internet users per 100 inhabitants</b>&#160;&#160;&#160;&#160;Source: <a href="/wiki/International_Telecommunication_Union" title="International Telecommunication Union">ITU</a><sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span>[</span>44<span>]</span></a></sup></center>
+</div>
+</div>
+</div>
+<div class="thumb tright">
+<div class="thumbinner" style="width:402px;"><a href="/wiki/File:InternetUsersByLanguagePieChart.svg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/InternetUsersByLanguagePieChart.svg/400px-InternetUsersByLanguagePieChart.svg.png" width="400" height="320" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:InternetUsersByLanguagePieChart.svg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+<center><a href="/wiki/Languages_used_on_the_Internet" title="Languages used on the Internet"><b>Internet users by language</b></a><sup id="cite_ref-NIUBL-IWS_44-0" class="reference"><a href="#cite_note-NIUBL-IWS-44"><span>[</span>45<span>]</span></a></sup></center>
+</div>
+</div>
+</div>
+<div class="thumb tright">
+<div class="thumbinner" style="width:402px;"><a href="/wiki/File:WebsitesByLanguagePieChart.svg" class="image"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/8/88/WebsitesByLanguagePieChart.svg/400px-WebsitesByLanguagePieChart.svg.png" width="400" height="320" class="thumbimage" /></a>
+<div class="thumbcaption">
+<div class="magnify"><a href="/wiki/File:WebsitesByLanguagePieChart.svg" class="internal" title="Enlarge"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>
+<center><a href="/wiki/Languages_used_on_the_Internet" title="Languages used on the Internet"><b>Website content languages</b></a><sup id="cite_ref-UofCLBW_45-0" class="reference"><a href="#cite_note-UofCLBW-45"><span>[</span>46<span>]</span></a></sup></center>
+</div>
+</div>
+</div>
+<div class="rellink boilerplate seealso">See also: <a href="/wiki/Global_Internet_usage" title="Global Internet usage">Global Internet usage</a>, <a href="/wiki/English_on_the_Internet" title="English on the Internet" class="mw-redirect">English on the Internet</a>,&#160;and <a href="/wiki/Unicode" title="Unicode">Unicode</a></div>
+<p>Overall Internet usage has seen tremendous growth. From 2000 to 2009, the number of Internet users globally rose from 394 million to 1.858 billion.<sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span>[</span>47<span>]</span></a></sup> By 2010, 22 percent of the world's population had access to computers with 1 billion <a href="/wiki/Google" title="Google">Google</a> searches every day, 300 million Internet users reading blogs, and 2 billion videos viewed daily on YouTube.<sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span>[</span>48<span>]</span></a></sup></p>
+<p>The prevalent language for communication on the Internet has been English. This may be a result of the origin of the Internet, as well as the language's role as a <a href="/wiki/Lingua_franca" title="Lingua franca">lingua franca</a>. Early computer systems were limited to the characters in the <a href="/wiki/ASCII" title="ASCII">American Standard Code for Information Interchange</a> (ASCII), a subset of the <a href="/wiki/Latin_alphabet" title="Latin alphabet">Latin alphabet</a>.</p>
+<p>After English (27%), the most requested languages on the <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a> are Chinese (23%), Spanish (8%), Japanese (5%), Portuguese and German (4% each), Arabic, French and Russian (3% each), and Korean (2%).<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span>[</span>49<span>]</span></a></sup> By region, 42% of the world's <a href="/wiki/Internet_users" title="Internet users" class="mw-redirect">Internet users</a> are based in Asia, 24% in Europe, 14% in North America, 10% in Latin America and the <a href="/wiki/Caribbean" title="Caribbean">Caribbean</a> taken together, 6% in Africa, 3% in the Middle East and 1% in Australia/Oceania.<sup id="cite_ref-inetstats_49-0" class="reference"><a href="#cite_note-inetstats-49"><span>[</span>50<span>]</span></a></sup> The Internet's technologies have developed enough in recent years, especially in the use of <a href="/wiki/Unicode" title="Unicode">Unicode</a>, that good facilities are available for development and communication in the world's widely used languages. However, some glitches such as <i><a href="/wiki/Mojibake" title="Mojibake">mojibake</a></i> (incorrect display of some languages' characters) still remain.</p>
+<p>In an American study in 2005, the percentage of men using the Internet was very slightly ahead of the percentage of women, although this difference reversed in those under 30. Men logged on more often, spent more time online, and were more likely to be broadband users, whereas women tended to make more use of opportunities to communicate (such as email). Men were more likely to use the Internet to pay bills, participate in auctions, and for recreation such as downloading music and videos. Men and women were equally likely to use the Internet for shopping and banking.<sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span>[</span>51<span>]</span></a></sup> More recent studies indicate that in 2008, women significantly outnumbered men on most social networking sites, such as Facebook and Myspace, although the ratios varied with age.<sup id="cite_ref-51" class="reference"><a href="#cite_note-51"><span>[</span>52<span>]</span></a></sup> In addition, women watched more streaming content, whereas men downloaded more.<sup id="cite_ref-52" class="reference"><a href="#cite_note-52"><span>[</span>53<span>]</span></a></sup> In terms of blogs, men were more likely to blog in the first place; among those who blog, men were more likely to have a professional blog, whereas women were more likely to have a personal blog.<sup id="cite_ref-53" class="reference"><a href="#cite_note-53"><span>[</span>54<span>]</span></a></sup></p>
+<h2> <span class="mw-headline" id="Social_impact">Social impact</span></h2>
+<div class="rellink relarticle mainarticle">Main article: <a href="/wiki/Sociology_of_the_Internet" title="Sociology of the Internet">Sociology of the Internet</a></div>
+<p>The Internet has enabled entirely new forms of social interaction, activities, and organizing, thanks to its basic features such as widespread usability and access. In the first decade of the 21st century, the first generation is raised with widespread availability of Internet connectivity, bringing consequences and concerns in areas such as personal privacy and identity, and distribution of copyrighted materials. These "<a href="/wiki/Digital_natives" title="Digital natives" class="mw-redirect">digital natives</a>" face a variety of challenges that were not present for prior generations.</p>
+<h3> <span class="mw-headline" id="Social_networking_and_entertainment">Social networking and entertainment</span></h3>
+<div class="rellink boilerplate seealso">See also: <a href="/wiki/Social_networking_service#Social_impact" title="Social networking service">Social networking service#Social impact</a></div>
+<p>Many people use the World Wide Web to access news, weather and sports reports, to plan and book vacations and to find out more about their interests. People use <a href="/wiki/Online_chat" title="Online chat">chat</a>, messaging and email to make and stay in touch with friends worldwide, sometimes in the same way as some previously had <a href="/wiki/Pen_pal" title="Pen pal">pen pals</a>. The Internet has seen a growing number of <a href="/wiki/Web_desktop" title="Web desktop">Web desktops</a>, where users can access their files and settings via the Internet.</p>
+<p><a href="/wiki/Social_network_service" title="Social network service" class="mw-redirect">Social networking</a> websites such as Facebook, Twitter, and MySpace have created new ways to socialize and interact. Users of these sites are able to add a wide variety of information to pages, to pursue common interests, and to connect with others. It is also possible to find existing acquaintances, to allow communication among existing groups of people. Sites like <a href="/wiki/LinkedIn" title="LinkedIn">LinkedIn</a> foster commercial and business connections. YouTube and <a href="/wiki/Flickr" title="Flickr">Flickr</a> specialize in users' videos and photographs.</p>
+<p>The Internet has been a major outlet for leisure activity since its inception, with entertaining social experiments such as <a href="/wiki/MUD" title="MUD">MUDs</a> and <a href="/wiki/MOO" title="MOO">MOOs</a> being conducted on university servers, and humor-related <a href="/wiki/Usenet" title="Usenet">Usenet</a> groups receiving much traffic. Today, many <a href="/wiki/Internet_forums" title="Internet forums" class="mw-redirect">Internet forums</a> have sections devoted to games and funny videos; short cartoons in the form of <a href="/wiki/Flash_animation" title="Flash animation">Flash movies</a> are also popular. Over 6&#160;million people use blogs or message boards as a means of communication and for the sharing of ideas. The pornography and gambling industries have taken advantage of the World Wide Web, and often provide a significant source of advertising revenue for other websites.<sup id="cite_ref-54" class="reference"><a href="#cite_note-54"><span>[</span>55<span>]</span></a></sup> Although many governments have attempted to restrict both industries' use of the Internet, in general this has failed to stop their widespread popularity.<sup id="cite_ref-55" class="reference"><a href="#cite_note-55"><span>[</span>56<span>]</span></a></sup></p>
+<p>Another area of leisure activity on the Internet is <a href="/wiki/Multiplayer_gaming" title="Multiplayer gaming" class="mw-redirect">multiplayer gaming</a>.<sup id="cite_ref-56" class="reference"><a href="#cite_note-56"><span>[</span>57<span>]</span></a></sup> This form of recreation creates communities, where people of all ages and origins enjoy the fast-paced world of multiplayer games. These range from <a href="/wiki/MMORPG" title="MMORPG" class="mw-redirect">MMORPG</a> to <a href="/wiki/First-person_shooter" title="First-person shooter">first-person shooters</a>, from <a href="/wiki/Role-playing_video_game" title="Role-playing video game">role-playing video games</a> to <a href="/wiki/Online_gambling" title="Online gambling">online gambling</a>. While online gaming has been around since the 1970s, modern modes of online gaming began with subscription services such as <a href="/wiki/GameSpy_Arcade" title="GameSpy Arcade">GameSpy</a> and <a href="/wiki/MPlayer.com" title="MPlayer.com">MPlayer</a>.<sup id="cite_ref-57" class="reference"><a href="#cite_note-57"><span>[</span>58<span>]</span></a></sup> Non-subscribers were limited to certain types of game play or certain games. Many people use the Internet to access and download music, movies and other works for their enjoyment and relaxation. Free and fee-based services exist for all of these activities, using centralized servers and distributed peer-to-peer technologies. Some of these sources exercise more care with respect to the original artists' copyrights than others.</p>
+<p>Internet usage has been correlated to users' loneliness.<sup id="cite_ref-58" class="reference"><a href="#cite_note-58"><span>[</span>59<span>]</span></a></sup> Lonely people tend to use the Internet as an outlet for their feelings and to share their stories with others, such as in the "<a href="/wiki/I_am_lonely_will_anyone_speak_to_me" title="I am lonely will anyone speak to me">I am lonely will anyone speak to me</a>" thread.</p>
+<p><a href="/wiki/Cybersectarianism" title="Cybersectarianism">Cybersectarianism</a> is a new organizational form which involves: "highly dispersed small groups of practitioners that may remain largely anonymous within the larger social context and operate in relative secrecy, while still linked remotely to a larger network of believers who share a set of practices and texts, and often a common devotion to a particular leader. Overseas supporters provide funding and support; domestic practitioners distribute tracts, participate in acts of resistance, and share information on the internal situation with outsiders. Collectively, members and practitioners of such sects construct viable virtual communities of faith, exchanging personal testimonies and engaging in collective study via email, on-line chat rooms and web-based message boards."<sup id="cite_ref-59" class="reference"><a href="#cite_note-59"><span>[</span>60<span>]</span></a></sup></p>
+<p><a href="/wiki/Cyberslacking" title="Cyberslacking" class="mw-redirect">Cyberslacking</a> can become a drain on corporate resources; the average UK employee spent 57 minutes a day surfing the Web while at work, according to a 2003 study by Peninsula Business Services.<sup id="cite_ref-60" class="reference"><a href="#cite_note-60"><span>[</span>61<span>]</span></a></sup> <a href="/wiki/Internet_addiction_disorder" title="Internet addiction disorder">Internet addiction disorder</a> is excessive computer use that interferes with daily life. Psychologist Nicolas Carr believe that Internet use has other <a href="/wiki/How_internet_use_affects_humans" title="How internet use affects humans" class="mw-redirect">effects on individuals</a>, for instance improving skills of scan-reading and interfering with the deep thinking that leads to true creativity.<sup id="cite_ref-61" class="reference"><a href="#cite_note-61"><span>[</span>62<span>]</span></a></sup></p>
+<h3> <span class="mw-headline" id="Politics_and_political_revolutions">Politics and political revolutions</span></h3>
+<p>The Internet has achieved new relevance as a political tool. The presidential campaign of <a href="/wiki/Howard_Dean" title="Howard Dean">Howard Dean</a> in 2004 in the United States was notable for its success in soliciting donation via the Internet. Many political groups use the Internet to achieve a new method of organizing in order to carry out their mission, having given rise to <a href="/wiki/Internet_activism" title="Internet activism">Internet activism</a>, most notably practiced by rebels in the <a href="/wiki/Arab_Spring" title="Arab Spring">Arab Spring</a>.<sup id="cite_ref-cascading_62-0" class="reference"><a href="#cite_note-cascading-62"><span>[</span>63<span>]</span></a></sup><sup id="cite_ref-63" class="reference"><a href="#cite_note-63"><span>[</span>64<span>]</span></a></sup></p>
+<p>The <i><a href="/wiki/New_York_Times" title="New York Times" class="mw-redirect">New York Times</a></i> suggested that <a href="/wiki/Social_media" title="Social media">social media</a> websites such as Facebook and Twitter helped people organize the political revolutions in Egypt where it helped certain classes of protesters organize protests, communicate grievances, and disseminate information.<sup id="cite_ref-64" class="reference"><a href="#cite_note-64"><span>[</span>65<span>]</span></a></sup></p>
+<p>The potential of the Internet as a civic tool of communicative power was thoroughly explored by <a href="/w/index.php?title=Simon_R._B._Berdal&amp;action=edit&amp;redlink=1" class="new" title="Simon R. B. Berdal (page does not exist)">Simon R. B. Berdal</a> in his thesis of 2004:</p>
+<blockquote class="templatequote">
+<div class="Bug6200"><i>As the globally evolving Internet provides ever new access points to virtual discourse forums, it also promotes new civic relations and associations within which communicative power may flow and accumulate. Thus, traditionally ... national-embedded peripheries get entangled into greater, international peripheries, with stronger combined powers... The Internet, as a consequence, changes the topology of the "centre-periphery" model, by stimulating conventional peripheries to interlink into "super-periphery" structures, which enclose and "besiege" several centres at once.</i><sup id="cite_ref-simonBerdal2004_65-0" class="reference"><a href="#cite_note-simonBerdal2004-65"><span>[</span>66<span>]</span></a></sup></div>
+</blockquote>
+<p>Berdal, therefore, extends the <a href="/wiki/J%C3%BCrgen_Habermas" title="Jürgen Habermas">Habermasian</a> notion of the <a href="/wiki/Public_sphere" title="Public sphere">Public sphere</a> to the Internet, and underlines the inherent global and civic nature that intervowen Internet technologies provide. To limit the growing civic potential of the Internet, Berdal also notes how "self-protective measures" are put in place by those threatened by it:</p>
+<blockquote class="templatequote">
+<div class="Bug6200">If we consider China’s attempts to filter "unsuitable material" from the Internet, most of us would agree that this resembles a self-protective measure by the system against the growing civic potentials of the Internet. Nevertheless, both types represent limitations to "peripheral capacities". Thus, the Chinese government tries to prevent communicative power to build up and unleash (as the <a href="/wiki/Tiananmen_Square_protests_of_1989" title="Tiananmen Square protests of 1989">1989 Tiananmen Square uprising</a> suggests, the government may find it wise to install "upstream measures"). Even though limited, the Internet is proving to be an empowering tool also to the Chinese periphery: Analysts believe that Internet petitions have influenced policy implementation in favour of the public’s online-articulated will ...<sup id="cite_ref-simonBerdal2004_65-1" class="reference"><a href="#cite_note-simonBerdal2004-65"><span>[</span>66<span>]</span></a></sup></div>
+</blockquote>
+<h3> <span class="mw-headline" id="Philanthropy">Philanthropy</span></h3>
+<p>The spread of low-cost internet access in developing countries has opened up new possibilities for <a href="/wiki/Category:Peer-to-peer_charities" title="Category:Peer-to-peer charities">peer-to-peer charities</a>, which allow individuals to contribute small amounts to charitable projects for other individuals. Websites such as <a href="/wiki/DonorsChoose" title="DonorsChoose">DonorsChoose</a> and <a href="/wiki/GlobalGiving" title="GlobalGiving">GlobalGiving</a> allow small-scale donors to direct funds to individual projects of their choice.</p>
+<p>A popular twist on internet-based philanthropy is the use of <a href="/wiki/Peer-to-peer_lending" title="Peer-to-peer lending" class="mw-redirect">peer-to-peer lending</a> for charitable purposes. <a href="/wiki/Kiva" title="Kiva">Kiva</a> pioneered this concept in 2005, offering the first web-based service to publish individual loan profiles for funding. Kiva raises funds for local intermediary <a href="/wiki/Microfinance" title="Microfinance">microfinance</a> organizations which post stories and updates on behalf of the borrowers. Lenders can contribute as little as $25 to loans of their choice, and receive their money back as borrowers repay. Kiva falls short of being a pure peer-to-peer charity, in that loans are disbursed before being funded by lenders and borrowers do not communicate with lenders themselves.<sup id="cite_ref-66" class="reference"><a href="#cite_note-66"><span>[</span>67<span>]</span></a></sup><sup id="cite_ref-67" class="reference"><a href="#cite_note-67"><span>[</span>68<span>]</span></a></sup></p>
+<p>However, the recent spread of cheap internet access in <a href="/wiki/Developing_countries" title="Developing countries" class="mw-redirect">developing countries</a> has made genuine international person-to-person philanthropy increasingly feasible. In 2009 the US-based nonprofit <a href="/wiki/Zidisha" title="Zidisha">Zidisha</a> tapped into this trend to offer the first person-to-person <a href="/wiki/Microfinance" title="Microfinance">microfinance</a> platform to link lenders and borrowers across international borders without intermediaries. Inspired by interactive websites such as Facebook and <a href="/wiki/EBay" title="EBay">eBay</a>, <a href="/wiki/Zidisha" title="Zidisha">Zidisha</a> facilitates direct dialogue and microlending transactions between individual web users worldwide and computer-literate, low-income entrepreneurs in developing countries. <a href="/wiki/Zidisha" title="Zidisha">Zidisha</a> members can fund loans for as little as a dollar, which the borrowers then use to develop business activities that improve their families' incomes while repaying loans to the members with interest. <a href="/wiki/Zidisha" title="Zidisha">Zidisha</a> borrowers access the internet via public cybercafes, donated laptops in village schools, and even smart phones, then create their own profile pages through which they share photos and information about themselves and their businesses. As they repay their loans, borrowers continue to share updates and dialogue with lenders via their profile pages. This direct web-based connection allows <a href="/wiki/Zidisha" title="Zidisha">Zidisha</a> members themselves to take on many of the communication and recording tasks traditionally performed by local organizations, bypassing geographic barriers and dramatically reducing the cost of <a href="/wiki/Microfinance" title="Microfinance">microfinance</a> services to the entrepreneurs.<sup id="cite_ref-68" class="reference"><a href="#cite_note-68"><span>[</span>69<span>]</span></a></sup></p>
+<h3> <span class="mw-headline" id="Censorship">Censorship</span></h3>
+<div class="rellink relarticle mainarticle">Main articles: <a href="/wiki/Internet_censorship" title="Internet censorship">Internet censorship</a>  and <a href="/wiki/Internet_freedom" title="Internet freedom" class="mw-redirect">Internet freedom</a></div>
+<p>Some governments, such as those of <a href="/wiki/Iran" title="Iran">Iran</a>, North Korea, <a href="/wiki/Burma" title="Burma">Burma</a>, the People's Republic of China, and <a href="/wiki/Saudi_Arabia" title="Saudi Arabia">Saudi Arabia</a>, restrict what people in their countries can access on the Internet, especially political and religious content. This is accomplished through software that filters domains and content so that they may not be easily accessed or obtained without elaborate circumvention.<sup id="cite_ref-69" class="reference"><a href="#cite_note-69"><span>[</span>70<span>]</span></a></sup></p>
+<p>In Norway, Denmark, Finland, and Sweden, major Internet service providers have voluntarily, possibly to avoid such an arrangement being turned into law, agreed to restrict access to sites listed by authorities. While this list of forbidden URLs is supposed to contain addresses of only known child pornography sites, the content of the list is secret.<sup id="cite_ref-The_Register_70-0" class="reference"><a href="#cite_note-The_Register-70"><span>[</span>71<span>]</span></a></sup> Many countries, including the United States, have enacted laws against the possession or distribution of certain material, such as <a href="/wiki/Child_pornography" title="Child pornography">child pornography</a>, via the Internet, but do not mandate filtering software. There are many free and commercially available software programs, called <a href="/wiki/Content-control_software" title="Content-control software">content-control software</a>, with which a user can choose to block offensive websites on individual computers or networks, in order to limit a child's access to pornographic materials or depiction of violence.</p>
+<h2> <span class="mw-headline" id="See_also">See also</span></h2>
+<div class="noprint tright portal" style="border:solid #aaa 1px; margin:0.5em 0 0.5em 0.5em;">
+<table style="background:#f9f9f9; font-size:85%; line-height:110%; max-width:175px;">
+<tr>
+<td style="text-align: center;"><a href="/wiki/File:Crystal_Clear_app_browser.png" class="image"><img alt="Portal icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Crystal_Clear_app_browser.png/28px-Crystal_Clear_app_browser.png" width="28" height="28" /></a></td>
+<td style="padding: 0 0.2em; vertical-align: middle; font-style: italic; font-weight: bold"><a href="/wiki/Portal:Internet" title="Portal:Internet">Internet  portal</a></td>
+</tr>
+</table>
+</div>
+<ul>
+<li><a href="/wiki/Outline_of_the_Internet" title="Outline of the Internet">Outline of the Internet</a></li>
+<li><a href="/wiki/Index_of_Internet-related_articles" title="Index of Internet-related articles">Index of Internet-related articles</a></li>
+</ul>
+<div style="clear:both;"></div>
+<h2> <span class="mw-headline" id="References">References</span></h2>
+<div class="reflist references-column-count references-column-count-2" style="-moz-column-count: 2; -webkit-column-count: 2; column-count: 2; list-style-type: decimal;">
+<ol class="references">
+<li id="cite_note-0"><span class="mw-cite-backlink"><b><a href="#cite_ref-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.internetworldstats.com/stats.htm">Internet World Stats</a>, updated 31 March 2011. Retrieved 8 November 2011.</span></li>
+<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><span class="citation book"><a rel="nofollow" class="external text" href="http://dictionary.oed.com/cgi/entry/00304286">"Internet, n."</a>. <i><a href="/wiki/Oxford_English_Dictionary" title="Oxford English Dictionary">Oxford English Dictionary</a></i> (Draft ed.). March 2009<span class="printonly">. <a rel="nofollow" class="external free" href="http://dictionary.oed.com/cgi/entry/00304286">http://dictionary.oed.com/cgi/entry/00304286</a></span><span class="reference-accessdate">. Retrieved 26 October 2010</span>. "Shortened &lt; INTERNETWORK n., perhaps influenced by similar words in -net"</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Internet%2C+n.&amp;rft.atitle=%5B%5BOxford+English+Dictionary%5D%5D&amp;rft.date=March+2009&amp;rft.edition=Draft&amp;rft_id=http%3A%2F%2Fdictionary.oed.com%2Fcgi%2Fentry%2F00304286&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://forum.wordreference.com/showthread.php?t=56782&amp;p=405068#post405068">"internet or Internet"</a>, Word Reference Forum, 6 October 2005</span></li>
+<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.chicagomanualofstyle.org/16/ch07/ch07_sec076.html?para=">"7.76 Terms like 'web' and 'Internet'"</a>, <i>Chicago Manual of Style</i>, University of Chicago, 16th edition</span></li>
+<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.w3.org/TR/html401/struct/links.html#h-12.1">"Links"</a>. <i>HTML 4.01 Specification</i>. World Wide Web Consortium. HTML 4.01 Specification<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.w3.org/TR/html401/struct/links.html#h-12.1">http://www.w3.org/TR/html401/struct/links.html#h-12.1</a></span><span class="reference-accessdate">. Retrieved 13 August 2008</span>. "[T]he link (or hyperlink, or Web link) [is] the basic hypertext construct. A link is a connection from one Web resource to another. Although a simple concept, the link has been one of the primary forces driving the success of the Web."</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Links&amp;rft.atitle=HTML+4.01+Specification&amp;rft.date=HTML+4.01+Specification&amp;rft.pub=World+Wide+Web+Consortium&amp;rft_id=http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml401%2Fstruct%2Flinks.html%23h-12.1&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-BBC_Technology-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-BBC_Technology_5-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://news.bbc.co.uk/1/hi/technology/8331253.stm">Celebrating 40 years of the net</a>, by Mark Ward, Technology correspondent, BBC News, 29 October 2009</span></li>
+<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.cs.utexas.edu/users/chris/think/Cyclades/index.shtml">"A Technical History of CYCLADES"</a>, <i>Technical Histories of the Internet &amp; other Network Protocols</i>, Computer Science Department, University of Texas Austin</span></li>
+<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.informatik.uni-trier.de/~ley/db/conf/ifip/ifip1977.html#Zimmermann77">"The Cyclades Experience: Results and Impacts"</a>, Zimmermann, H., Proc. IFIP'77 Congress, Toronto, August 1977, pp. 465–469</span></li>
+<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.merit.edu/about/history/article.php"><i>A Chronicle of Merit's Early History</i></a>, John Mulcahy, 1989, Merit Network, Ann Arbor, Michigan</span></li>
+<li id="cite_note-NetValley-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-NetValley_9-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.netvalley.com/intval.html">"Roads and Crossroads of Internet History"</a> by Gregory Gromov. 1995</span></li>
+<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><span class="citation book"><a href="/wiki/Katie_Hafner" title="Katie Hafner">Hafner, Katie</a> (1998). <i>Where Wizards Stay Up Late: The Origins Of The Internet</i>. Simon &amp; Schuster. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-684-83267-4" title="Special:BookSources/0-684-83267-4">0-684-83267-4</a>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Where+Wizards+Stay+Up+Late%3A+The+Origins+Of+The+Internet&amp;rft.aulast=Hafner&amp;rft.aufirst=Katie&amp;rft.au=Hafner%2C%26%2332%3BKatie&amp;rft.date=1998&amp;rft.pub=Simon+%26+Schuster&amp;rft.isbn=0-684-83267-4&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><span class="citation Journal"><a href="/w/index.php?title=Ronda_Hauben&amp;action=edit&amp;redlink=1" class="new" title="Ronda Hauben (page does not exist)">Ronda Hauben</a> (2001). <a rel="nofollow" class="external text" href="http://www.columbia.edu/~rh120/other/tcpdigest_paper.txt"><i>From the ARPANET to the Internet</i></a><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.columbia.edu/~rh120/other/tcpdigest_paper.txt">http://www.columbia.edu/~rh120/other/tcpdigest_paper.txt</a></span><span class="reference-accessdate">. Retrieved 28 May 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=From+the+ARPANET+to+the+Internet&amp;rft.aulast=%5B%5BRonda+Hauben%5D%5D&amp;rft.au=%5B%5BRonda+Hauben%5D%5D&amp;rft.date=2001&amp;rft_id=http%3A%2F%2Fwww.columbia.edu%2F%7Erh120%2Fother%2Ftcpdigest_paper.txt&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://web.archive.org/web/20030405153523/http://www.sigtel.com/tel_hist_brief.html">"Events in British Telecomms History"</a>. <i>Events in British TelecommsHistory</i>. Archived from <a rel="nofollow" class="external text" href="http://www.sigtel.com/tel_hist_brief.html">the original</a> on 5 April 2003<span class="printonly">. <a rel="nofollow" class="external free" href="http://web.archive.org/web/20030405153523/http://www.sigtel.com/tel_hist_brief.html">http://web.archive.org/web/20030405153523/http://www.sigtel.com/tel_hist_brief.html</a></span><span class="reference-accessdate">. Retrieved 25 November 2005</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Events+in+British+Telecomms+History&amp;rft.atitle=Events+in+British+TelecommsHistory&amp;rft_id=http%3A%2F%2Fweb.archive.org%2Fweb%2F20030405153523%2Fhttp%3A%2F%2Fwww.sigtel.com%2Ftel_hist_brief.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.norsar.no/pc-5-30-NORSAR-and-the-Internet.aspx">"NORSAR and the Internet"</a>. NORSAR<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.norsar.no/pc-5-30-NORSAR-and-the-Internet.aspx">http://www.norsar.no/pc-5-30-NORSAR-and-the-Internet.aspx</a></span><span class="reference-accessdate">. Retrieved 5 June 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=NORSAR+and+the+Internet&amp;rft.atitle=&amp;rft.pub=NORSAR&amp;rft_id=http%3A%2F%2Fwww.norsar.no%2Fpc-5-30-NORSAR-and-the-Internet.aspx&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><span class="citation Journal"><a href="/w/index.php?title=Barry_M._Leiner&amp;action=edit&amp;redlink=1" class="new" title="Barry M. Leiner (page does not exist)">Barry M. Leiner</a>, <a href="/wiki/Vinton_G._Cerf" title="Vinton G. Cerf" class="mw-redirect">Vinton G. Cerf</a>, <a href="/wiki/David_D._Clark" title="David D. Clark">David D. Clark</a>, <a href="/wiki/Robert_E._Kahn" title="Robert E. Kahn" class="mw-redirect">Robert E. Kahn</a>, <a href="/wiki/Leonard_Kleinrock" title="Leonard Kleinrock">Leonard Kleinrock</a>, <a href="/w/index.php?title=Daniel_C._Lynch&amp;action=edit&amp;redlink=1" class="new" title="Daniel C. Lynch (page does not exist)">Daniel C. Lynch</a>, <a href="/wiki/Jon_Postel" title="Jon Postel">Jon Postel</a>, <a href="/wiki/Lawrence_Roberts_(scientist)" title="Lawrence Roberts (scientist)">Larry G. Roberts</a>, <a href="/wiki/Stephen_Wolff" title="Stephen Wolff">Stephen Wolff</a> (2003). <a rel="nofollow" class="external text" href="http://www.isoc.org/internet/history/brief.shtml"><i>A Brief History of Internet</i></a><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.isoc.org/internet/history/brief.shtml">http://www.isoc.org/internet/history/brief.shtml</a></span><span class="reference-accessdate">. Retrieved 28 May 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=A+Brief+History+of+Internet&amp;rft.aulast=%5B%5BBarry+M.+Leiner%5D%5D%2C+%5B%5BVinton+G.+Cerf%5D%5D%2C+%5B%5BDavid+D.+Clark%5D%5D%2C+%5B%5BRobert+E.+Kahn%5D%5D%2C+%5B%5BLeonard+Kleinrock%5D%5D%2C+%5B%5BDaniel+C.+Lynch%5D%5D%2C+%5B%5BJon+Postel%5D%5D%2C+%5B%5BLawrence+Roberts+%28scientist%29%7CLarry+G.+Roberts%5D%5D%2C+%5B%5BStephen+Wolff%5D%5D&amp;rft.au=%5B%5BBarry+M.+Leiner%5D%5D%2C+%5B%5BVinton+G.+Cerf%5D%5D%2C+%5B%5BDavid+D.+Clark%5D%5D%2C+%5B%5BRobert+E.+Kahn%5D%5D%2C+%5B%5BLeonard+Kleinrock%5D%5D%2C+%5B%5BDaniel+C.+Lynch%5D%5D%2C+%5B%5BJon+Postel%5D%5D%2C+%5B%5BLawrence+Roberts+%28scientist%29%7CLarry+G.+Roberts%5D%5D%2C+%5B%5BStephen+Wolff%5D%5D&amp;rft.date=2003&amp;rft_id=http%3A%2F%2Fwww.isoc.org%2Finternet%2Fhistory%2Fbrief.shtml&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.merit.edu/about/history/pdf/NSFNET_final.pdf"><i>NSFNET: A Partnership for High-Speed Networking, Final Report 1987-1995</i></a>, Karen D. Frazer, Merit Network, Inc., 1995</span></li>
+<li id="cite_note-ConneXions-April1996-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-ConneXions-April1996_16-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.merit.edu/networkresearch/projecthistory/nsfnet/nsfnet_article.php">"Retiring the NSFNET Backbone Service: Chronicling the End of an Era"</a>, Susan R. Harris and Elise Gerich, <i>ConneXions</i>, Vol. 10, No. 4, April 1996</span></li>
+<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><span class="citation Journal"><a href="/w/index.php?title=Ben_Segal&amp;action=edit&amp;redlink=1" class="new" title="Ben Segal (page does not exist)">Ben Segal</a> (1995). <a rel="nofollow" class="external text" href="http://www.cern.ch/ben/TCPHIST.html"><i>A Short History of Internet Protocols at CERN</i></a><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.cern.ch/ben/TCPHIST.html">http://www.cern.ch/ben/TCPHIST.html</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=A+Short+History+of+Internet+Protocols+at+CERN&amp;rft.aulast=%5B%5BBen+Segal%5D%5D&amp;rft.au=%5B%5BBen+Segal%5D%5D&amp;rft.date=1995&amp;rft_id=http%3A%2F%2Fwww.cern.ch%2Fben%2FTCPHIST.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><a href="/wiki/RIPE" title="RIPE">Réseaux IP Européens</a> (RIPE)</span></li>
+<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.apan.net/meetings/busan03/cs-history.htm">"Internet History in Asia"</a>. <i>16th APAN Meetings/Advanced Network Conference in Busan</i><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.apan.net/meetings/busan03/cs-history.htm">http://www.apan.net/meetings/busan03/cs-history.htm</a></span><span class="reference-accessdate">. Retrieved 25 December 2005</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Internet+History+in+Asia&amp;rft.atitle=16th+APAN+Meetings%2FAdvanced+Network+Conference+in+Busan&amp;rft_id=http%3A%2F%2Fwww.apan.net%2Fmeetings%2Fbusan03%2Fcs-history.htm&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://news.bbc.co.uk/2/hi/science/nature/5242252.stm">How the web went world wide</a>, Mark Ward, Technology Correspondent, BBC News. Retrieved 24 January 2011</span></li>
+<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://clickz.com/showPage.html?page=3626274">"Brazil, Russia, India and China to Lead Internet Growth Through 2011"</a>. Clickz.com<span class="printonly">. <a rel="nofollow" class="external free" href="http://clickz.com/showPage.html?page=3626274">http://clickz.com/showPage.html?page=3626274</a></span><span class="reference-accessdate">. Retrieved 28 May 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Brazil%2C+Russia%2C+India+and+China+to+Lead+Internet+Growth+Through+2011&amp;rft.atitle=&amp;rft.pub=Clickz.com&amp;rft_id=http%3A%2F%2Fclickz.com%2FshowPage.html%3Fpage%3D3626274&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><span class="citation Journal">Coffman, K. G; <a href="/wiki/Odlyzko" title="Odlyzko" class="mw-redirect">Odlyzko</a>, A. M. (2 October 1998) (PDF). <a rel="nofollow" class="external text" href="http://www.dtc.umn.edu/~odlyzko/doc/internet.size.pdf"><i>The size and growth rate of the Internet</i></a>. AT&amp;T Labs<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.dtc.umn.edu/~odlyzko/doc/internet.size.pdf">http://www.dtc.umn.edu/~odlyzko/doc/internet.size.pdf</a></span><span class="reference-accessdate">. Retrieved 21 May 2007</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+size+and+growth+rate+of+the+Internet&amp;rft.aulast=Coffman%2C+K.+G%3B+%5B%5BOdlyzko%5D%5D%2C+A.+M.&amp;rft.au=Coffman%2C+K.+G%3B+%5B%5BOdlyzko%5D%5D%2C+A.+M.&amp;rft.date=2+October+1998&amp;rft.pub=AT%26T+Labs&amp;rft_id=http%3A%2F%2Fwww.dtc.umn.edu%2F%7Eodlyzko%2Fdoc%2Finternet.size.pdf&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><span class="citation book">Comer, Douglas (2006). <i>The Internet book</i>. Prentice Hall. p.&#160;64. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-13-233553-0" title="Special:BookSources/0-13-233553-0">0-13-233553-0</a>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Internet+book&amp;rft.aulast=Comer&amp;rft.aufirst=Douglas&amp;rft.au=Comer%2C%26%2332%3BDouglas&amp;rft.date=2006&amp;rft.pages=p.%26nbsp%3B64&amp;rft.pub=Prentice+Hall&amp;rft.isbn=0-13-233553-0&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-stats1-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-stats1_24-0">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.internetworldstats.com/stats.htm">"World Internet Users and Population Stats"</a>. <i>Internet World Stats</i>. Miniwatts Marketing Group. 22 June 2011<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.internetworldstats.com/stats.htm">http://www.internetworldstats.com/stats.htm</a></span><span class="reference-accessdate">. Retrieved 23 June 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=World+Internet+Users+and+Population+Stats&amp;rft.atitle=Internet+World+Stats&amp;rft.date=22+June+2011&amp;rft.pub=Miniwatts+Marketing+Group&amp;rft_id=http%3A%2F%2Fwww.internetworldstats.com%2Fstats.htm&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.sciencemag.org/content/suppl/2011/02/08/science.1200970.DC1/Hilbert-SOM.pdf">"The World’s Technological Capacity to Store, Communicate, and Compute Information"</a>, Martin Hilbert and Priscila López (April 2011), <a href="/wiki/Science_(journal)" title="Science (journal)"><i>Science</i></a>, 332(6025), 60–65.</span></li>
+<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.ietf.org/">"IETF Home Page"</a>. Ietf.org<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.ietf.org/">http://www.ietf.org/</a></span><span class="reference-accessdate">. Retrieved 20 June 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=IETF+Home+Page&amp;rft.atitle=&amp;rft.pub=Ietf.org&amp;rft_id=http%3A%2F%2Fwww.ietf.org%2F&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><span class="citation web">Huston, Geoff. <a rel="nofollow" class="external text" href="http://www.potaroo.net/tools/ipv4/index.html">"IPv4 Address Report, daily generated"</a><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.potaroo.net/tools/ipv4/index.html">http://www.potaroo.net/tools/ipv4/index.html</a></span><span class="reference-accessdate">. Retrieved 20 May 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=IPv4+Address+Report%2C+daily+generated&amp;rft.atitle=&amp;rft.aulast=Huston&amp;rft.aufirst=Geoff&amp;rft.au=Huston%2C%26%2332%3BGeoff&amp;rft_id=http%3A%2F%2Fwww.potaroo.net%2Ftools%2Fipv4%2Findex.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="https://www.arin.net/knowledge/about_resources/ceo_letter.pdf">"Notice of Internet Protocol version 4 (IPv4) Address Depletion"</a> (PDF)<span class="printonly">. <a rel="nofollow" class="external free" href="https://www.arin.net/knowledge/about_resources/ceo_letter.pdf">https://www.arin.net/knowledge/about_resources/ceo_letter.pdf</a></span><span class="reference-accessdate">. Retrieved 7 August 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Notice+of+Internet+Protocol+version+4+%28IPv4%29+Address+Depletion&amp;rft.atitle=&amp;rft_id=https%3A%2F%2Fwww.arin.net%2Fknowledge%2Fabout_resources%2Fceo_letter.pdf&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><span class="citation Journal">A. L. Barab´asi, R. Albert; Barabási, Albert-László (2002). <a rel="nofollow" class="external text" href="http://rmp.aps.org/abstract/RMP/v74/i1/p47_1">"Statistical mechanics of complex networks"</a>. <i>Rev. Mod. Phys</i> <b>74</b>: 47–94. <a href="/wiki/Digital_object_identifier" title="Digital object identifier">DOI</a>:<a rel="nofollow" class="external text" href="http://dx.doi.org/10.1103%2FRevModPhys.74.47">10.1103/RevModPhys.74.47</a><span class="printonly">. <a rel="nofollow" class="external free" href="http://rmp.aps.org/abstract/RMP/v74/i1/p47_1">http://rmp.aps.org/abstract/RMP/v74/i1/p47_1</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=Statistical+mechanics+of+complex+networks&amp;rft.jtitle=Rev.+Mod.+Phys&amp;rft.aulast=A.+L.+Barab%C2%B4asi&amp;rft.aufirst=R.+Albert&amp;rft.au=A.+L.+Barab%C2%B4asi%2C%26%2332%3BR.+Albert&amp;rft.au=Barab%C3%A1si%2C%26%2332%3BAlbert-L%C3%A1szl%C3%B3&amp;rft.date=2002&amp;rft.volume=74&amp;rft.pages=47%E2%80%9394&amp;rft_id=info:doi/10.1103%2FRevModPhys.74.47&amp;rft_id=http%3A%2F%2Frmp.aps.org%2Fabstract%2FRMP%2Fv74%2Fi1%2Fp47_1&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text">Walter Willinger, Ramesh Govindan, Sugih Jamin, Vern Paxson, and Scott Shenker (2002). <a rel="nofollow" class="external text" href="http://www.pnas.org/cgi/content/full/99/suppl_1/2573">Scaling phenomena in the Internet</a>, in <i>Proceedings of the National Academy of Sciences, 99</i>, suppl. 1, 2573–2580</span></li>
+<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><span class="citation news">Jesdanun, Anick (16 April 2007). <a rel="nofollow" class="external text" href="http://seattletimes.nwsource.com/html/businesstechnology/2003667811_btrebuildnet16.html">"Internet Makeover? Some argue it's time"</a>. Seattletimes.nwsource.com<span class="printonly">. <a rel="nofollow" class="external free" href="http://seattletimes.nwsource.com/html/businesstechnology/2003667811_btrebuildnet16.html">http://seattletimes.nwsource.com/html/businesstechnology/2003667811_btrebuildnet16.html</a></span><span class="reference-accessdate">. Retrieved 8 August 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Internet+Makeover%3F+Some+argue+it%27s+time&amp;rft.atitle=&amp;rft.aulast=Jesdanun&amp;rft.aufirst=Anick&amp;rft.au=Jesdanun%2C%26%2332%3BAnick&amp;rft.date=16+April+2007&amp;rft.pub=Seattletimes.nwsource.com&amp;rft_id=http%3A%2F%2Fseattletimes.nwsource.com%2Fhtml%2Fbusinesstechnology%2F2003667811_btrebuildnet16.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><span class="citation Journal">R. Cohen, K. Erez, D. ben-Avraham, <a href="/wiki/Shlomo_Havlin" title="Shlomo Havlin">S. Havlin</a> (2000). <a rel="nofollow" class="external text" href="http://havlin.biu.ac.il/Publications.php?keyword=Resilience+of+the+Internet+to+random+breakdowns&amp;year=*&amp;match=all">"Resilience of the Internet to random breakdowns"</a>. <i>Phys. Rev. Lett</i> <b>85</b>: 4625<span class="printonly">. <a rel="nofollow" class="external free" href="http://havlin.biu.ac.il/Publications.php?keyword=Resilience+of+the+Internet+to+random+breakdowns&amp;year=*&amp;match=all">http://havlin.biu.ac.il/Publications.php?keyword=Resilience+of+the+Internet+to+random+breakdowns&amp;year=*&amp;match=all</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=Resilience+of+the+Internet+to+random+breakdowns&amp;rft.jtitle=Phys.+Rev.+Lett&amp;rft.aulast=R.+Cohen&amp;rft.aufirst=K.+Erez%2C+D.+ben-Avraham%2C+%5B%5BShlomo+Havlin%7CS.+Havlin%5D%5D&amp;rft.au=R.+Cohen%2C%26%2332%3BK.+Erez%2C+D.+ben-Avraham%2C+%5B%5BShlomo+Havlin%7CS.+Havlin%5D%5D&amp;rft.date=2000&amp;rft.volume=85&amp;rft.pages=4625&amp;rft_id=http%3A%2F%2Fhavlin.biu.ac.il%2FPublications.php%3Fkeyword%3DResilience%2Bof%2Bthe%2BInternet%2Bto%2Brandom%2Bbreakdowns%26year%3D%2A%26match%3Dall&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><span class="citation Journal">R. Cohen, K. Erez, D. ben-Avraham, <a href="/wiki/Shlomo_Havlin" title="Shlomo Havlin">S. Havlin</a>; Erez, K; Ben-Avraham, D; Havlin, S (2001). <a rel="nofollow" class="external text" href="http://havlin.biu.ac.il/Publications.php?keyword=Breakdown+of+the+Internet+under+intentional+attack&amp;year=*&amp;match=all">"Breakdown of the Internet under intentional attack"</a>. <i>Phys. Rev. Lett</i> <b>86</b> (16): 3682–5. <a href="/wiki/Digital_object_identifier" title="Digital object identifier">DOI</a>:<a rel="nofollow" class="external text" href="http://dx.doi.org/10.1103%2FPhysRevLett.86.3682">10.1103/PhysRevLett.86.3682</a>. <a href="/wiki/PubMed_Identifier" title="PubMed Identifier" class="mw-redirect">PMID</a>&#160;<a rel="nofollow" class="external text" href="//www.ncbi.nlm.nih.gov/pubmed/11328053">11328053</a><span class="printonly">. <a rel="nofollow" class="external free" href="http://havlin.biu.ac.il/Publications.php?keyword=Breakdown+of+the+Internet+under+intentional+attack&amp;year=*&amp;match=all">http://havlin.biu.ac.il/Publications.php?keyword=Breakdown+of+the+Internet+under+intentional+attack&amp;year=*&amp;match=all</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=Breakdown+of+the+Internet+under+intentional+attack&amp;rft.jtitle=Phys.+Rev.+Lett&amp;rft.aulast=R.+Cohen&amp;rft.aufirst=K.+Erez%2C+D.+ben-Avraham%2C+%5B%5BShlomo+Havlin%7CS.+Havlin%5D%5D&amp;rft.au=R.+Cohen%2C%26%2332%3BK.+Erez%2C+D.+ben-Avraham%2C+%5B%5BShlomo+Havlin%7CS.+Havlin%5D%5D&amp;rft.au=Erez%2C%26%2332%3BK&amp;rft.au=Ben-Avraham%2C%26%2332%3BD&amp;rft.au=Havlin%2C%26%2332%3BS&amp;rft.date=2001&amp;rft.volume=86&amp;rft.issue=16&amp;rft.pages=3682%E2%80%935&amp;rft_id=info:doi/10.1103%2FPhysRevLett.86.3682&amp;rft_id=info:pmid/11328053&amp;rft_id=http%3A%2F%2Fhavlin.biu.ac.il%2FPublications.php%3Fkeyword%3DBreakdown%2Bof%2Bthe%2BInternet%2Bunder%2Bintentional%2Battack%26year%3D%2A%26match%3Dall&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.theregister.co.uk/2005/07/01/bush_net_policy/">"Bush administration annexes internet"</a>, Kieren McCarthy, The Register, 1 July 2005</span></li>
+<li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://librenix.com/?inode=5013">"The Virtual Private Nightmare: VPN"</a>. Librenix. 4 August 2004<span class="printonly">. <a rel="nofollow" class="external free" href="http://librenix.com/?inode=5013">http://librenix.com/?inode=5013</a></span><span class="reference-accessdate">. Retrieved 21 July 2010</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=The+Virtual+Private+Nightmare%3A+VPN&amp;rft.atitle=&amp;rft.date=4+August+2004&amp;rft.pub=Librenix&amp;rft_id=http%3A%2F%2Flibrenix.com%2F%3Finode%3D5013&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><span class="citation web">Morrison, Geoff (18 November 2010). <a rel="nofollow" class="external text" href="http://www.msnbc.msn.com/id/40241749/ns/technology_and_science-tech_and_gadgets">"What to know before buying a 'connected' TV - Technology &amp; science - Tech and gadgets - Tech Holiday Guide"</a>. MSNBC<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.msnbc.msn.com/id/40241749/ns/technology_and_science-tech_and_gadgets">http://www.msnbc.msn.com/id/40241749/ns/technology_and_science-tech_and_gadgets</a></span><span class="reference-accessdate">. Retrieved 8 August 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=What+to+know+before+buying+a+%27connected%27+TV+-+Technology+%26+science+-+Tech+and+gadgets+-+Tech+Holiday+Guide&amp;rft.atitle=&amp;rft.aulast=Morrison&amp;rft.aufirst=Geoff&amp;rft.au=Morrison%2C%26%2332%3BGeoff&amp;rft.date=18+November+2010&amp;rft.pub=MSNBC&amp;rft_id=http%3A%2F%2Fwww.msnbc.msn.com%2Fid%2F40241749%2Fns%2Ftechnology_and_science-tech_and_gadgets&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.webcitation.org/5qyMMarNd">"YouTube Fact Sheet"</a>. YouTube, LLC. Archived from <a rel="nofollow" class="external text" href="http://www.youtube.com/t/fact_sheet">the original</a> on 4 July 2010<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.webcitation.org/5qyMMarNd">http://www.webcitation.org/5qyMMarNd</a></span><span class="reference-accessdate">. Retrieved 20 January 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=YouTube+Fact+Sheet&amp;rft.atitle=&amp;rft.pub=YouTube%2C+LLC&amp;rft_id=http%3A%2F%2Fwww.webcitation.org%2F5qyMMarNd&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><span class="citation web">Pasternak, Sean B. (7 March 2006). <a rel="nofollow" class="external text" href="http://www.bloomberg.com/apps/news?pid=10000082&amp;sid=aQ0ZfhMa4XGQ&amp;refer=canada">"Toronto Hydro to Install Wireless Network in Downtown Toronto"</a>. Bloomberg<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.bloomberg.com/apps/news?pid=10000082&amp;sid=aQ0ZfhMa4XGQ&amp;refer=canada">http://www.bloomberg.com/apps/news?pid=10000082&amp;sid=aQ0ZfhMa4XGQ&amp;refer=canada</a></span><span class="reference-accessdate">. Retrieved 8 August 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Toronto+Hydro+to+Install+Wireless+Network+in+Downtown+Toronto&amp;rft.atitle=&amp;rft.aulast=Pasternak&amp;rft.aufirst=Sean+B.&amp;rft.au=Pasternak%2C%26%2332%3BSean+B.&amp;rft.date=7+March+2006&amp;rft.pub=Bloomberg&amp;rft_id=http%3A%2F%2Fwww.bloomberg.com%2Fapps%2Fnews%3Fpid%3D10000082%26sid%3DaQ0ZfhMa4XGQ%26refer%3Dcanada&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text">"By 2013, mobile phones will overtake PCs as the most common Web access device worldwide", according a forecast in <a rel="nofollow" class="external text" href="http://www.gartner.com/it/page.jsp?id=1278413">"Gartner Highlights Key Predictions for IT Organizations and Users in 2010 and Beyond"</a>, Gartner, Inc., 13 January 2010</span></li>
+<li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><span class="citation news"><a rel="nofollow" class="external text" href="http://www.guardian.co.uk/world/2011/apr/06/georgian-woman-cuts-web-access">"Georgian woman cuts off web access to whole of Armenia"</a>. The Guardian. 6 April 2011<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.guardian.co.uk/world/2011/apr/06/georgian-woman-cuts-web-access">http://www.guardian.co.uk/world/2011/apr/06/georgian-woman-cuts-web-access</a></span><span class="reference-accessdate">. Retrieved 11 April 2012</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Georgian+woman+cuts+off+web+access+to+whole+of+Armenia&amp;rft.atitle=&amp;rft.date=6+April+2011&amp;rft.series=The+Guardian&amp;rft_id=http%3A%2F%2Fwww.guardian.co.uk%2Fworld%2F2011%2Fapr%2F06%2Fgeorgian-woman-cuts-web-access&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-renesys1-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-renesys1_41-0">^</a></b></span> <span class="reference-text"><span class="citation web">Cowie, James. <a rel="nofollow" class="external text" href="http://www.renesys.com/blog/2011/01/egypt-leaves-the-internet.shtml">"Egypt Leaves the Internet"</a>. <a href="/w/index.php?title=Renesys&amp;action=edit&amp;redlink=1" class="new" title="Renesys (page does not exist)">Renesys</a>. <a rel="nofollow" class="external text" href="http://www.webcitation.org/5w51j0pga">Archived</a> from the original on 28 January 2011<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.renesys.com/blog/2011/01/egypt-leaves-the-internet.shtml">http://www.renesys.com/blog/2011/01/egypt-leaves-the-internet.shtml</a></span><span class="reference-accessdate">. Retrieved 28 January 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Egypt+Leaves+the+Internet&amp;rft.atitle=&amp;rft.aulast=Cowie&amp;rft.aufirst=James&amp;rft.au=Cowie%2C%26%2332%3BJames&amp;rft.pub=%5B%5BRenesys%5D%5D&amp;rft_id=http%3A%2F%2Fwww.renesys.com%2Fblog%2F2011%2F01%2Fegypt-leaves-the-internet.shtml&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><span class="citation news"><a rel="nofollow" class="external text" href="http://www.bbc.co.uk/news/technology-12306041">"Egypt severs internet connection amid growing unrest"</a>. <i>BBC News</i>. 28 January 2011<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.bbc.co.uk/news/technology-12306041">http://www.bbc.co.uk/news/technology-12306041</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=Egypt+severs+internet+connection+amid+growing+unrest&amp;rft.jtitle=BBC+News&amp;rft.date=28+January+2011&amp;rft_id=http%3A%2F%2Fwww.bbc.co.uk%2Fnews%2Ftechnology-12306041&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.itu.int/ITU-D/ict/statistics/material/excel/2011/Internet_users_01-11.xls">"Internet users per 100 inhabitants 2001–2011"</a>, International Telecommunications Union, Geneva, accessed 4 April 2012</span></li>
+<li id="cite_note-NIUBL-IWS-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-NIUBL-IWS_44-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.internetworldstats.com/stats7.htm">"Number of Internet Users by Language"</a>, <i>Internet World Stats</i>, Miniwatts Marketing Group, 31 May 2011, accessed 22 April 2012</span></li>
+<li id="cite_note-UofCLBW-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-UofCLBW_45-0">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://w3techs.com/technologies/overview/content_language/all">"Usage of content languages for websites"</a>. <i>W3Techs.com</i><span class="printonly">. <a rel="nofollow" class="external free" href="http://w3techs.com/technologies/overview/content_language/all">http://w3techs.com/technologies/overview/content_language/all</a></span><span class="reference-accessdate">. Retrieved 30 December 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Usage+of+content+languages+for+websites&amp;rft.atitle=W3Techs.com&amp;rft_id=http%3A%2F%2Fw3techs.com%2Ftechnologies%2Foverview%2Fcontent_language%2Fall&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.itu.int/ITU-D/ict/statistics/">Internet users graphs</a>, Market Information and Statistics, International Telecommunications Union</span></li>
+<li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external free" href="http://www.antaranews.com/en/news/71940/google-earth-demonstrates-how-technology-benefits-ris-civil-society-govt">http://www.antaranews.com/en/news/71940/google-earth-demonstrates-how-technology-benefits-ris-civil-society-govt</a></span></li>
+<li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.internetworldstats.com/stats7.htm">Internet World Stats</a>, updated for 30 June 2010. Retrieved 20 Feb 2011.</span></li>
+<li id="cite_note-inetstats-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-inetstats_49-0">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.internetworldstats.com/stats.htm">World Internet Usage Statistics News and Population Stats</a> updated for 30 June 2010. Retrieved 20 Feb 2011.</span></li>
+<li id="cite_note-50"><span class="mw-cite-backlink"><b><a href="#cite_ref-50">^</a></b></span> <span class="reference-text">How men and women use the Internet Pew Research Center 28 December 2005</span></li>
+<li id="cite_note-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-51">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://business.rapleaf.com/company_press_2008_07_29.html">"Rapleaf Study on Social Network Users"</a><span class="printonly">. <a rel="nofollow" class="external free" href="http://business.rapleaf.com/company_press_2008_07_29.html">http://business.rapleaf.com/company_press_2008_07_29.html</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Rapleaf+Study+on+Social+Network+Users&amp;rft.atitle=&amp;rft_id=http%3A%2F%2Fbusiness.rapleaf.com%2Fcompany_press_2008_07_29.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span><sup class="noprint Inline-Template"><span title="&#160;since August 2011" style="white-space: nowrap;">[<i><a href="/wiki/Wikipedia:Link_rot" title="Wikipedia:Link rot">dead link</a></i>]</span></sup></span></li>
+<li id="cite_note-52"><span class="mw-cite-backlink"><b><a href="#cite_ref-52">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.entrepreneur.com/tradejournals/article/178175272.html">"Women Ahead Of Men In Online Tv, Dvr, Games, And Social Media."</a>. Entrepreneur.com. 1 May 2008<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.entrepreneur.com/tradejournals/article/178175272.html">http://www.entrepreneur.com/tradejournals/article/178175272.html</a></span><span class="reference-accessdate">. Retrieved 8 August 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Women+Ahead+Of+Men+In+Online+Tv%2C+Dvr%2C+Games%2C+And+Social+Media.&amp;rft.atitle=&amp;rft.date=1+May+2008&amp;rft.pub=Entrepreneur.com&amp;rft_id=http%3A%2F%2Fwww.entrepreneur.com%2Ftradejournals%2Farticle%2F178175272.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-53"><span class="mw-cite-backlink"><b><a href="#cite_ref-53">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://technorati.com/blogging/state-of-the-blogosphere/">"Technorati's State of the Blogosphere"</a>. Technorati<span class="printonly">. <a rel="nofollow" class="external free" href="http://technorati.com/blogging/state-of-the-blogosphere/">http://technorati.com/blogging/state-of-the-blogosphere/</a></span><span class="reference-accessdate">. Retrieved 8 August 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Technorati%27s+State+of+the+Blogosphere&amp;rft.atitle=&amp;rft.pub=Technorati&amp;rft_id=http%3A%2F%2Ftechnorati.com%2Fblogging%2Fstate-of-the-blogosphere%2F&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-54"><span class="mw-cite-backlink"><b><a href="#cite_ref-54">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://internet-filter-review.toptenreviews.com/internet-pornography-statistics.html">"Internet Pornography Statistics"</a>, Jerry Ropelato, Top Ten Reviews, 2006</span></li>
+<li id="cite_note-55"><span class="mw-cite-backlink"><b><a href="#cite_ref-55">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://abcnews.go.com/Business/SmallBiz/story?id=4151592">"Do It Yourself! Amateur Porn Stars Make Bank"</a>, Russell Goldman, ABC News, 22 January 2008</span></li>
+<li id="cite_note-56"><span class="mw-cite-backlink"><b><a href="#cite_ref-56">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://internetgames.about.com/od/gamingnews/a/trendsdecade.htm">"Top Online Game Trends of the Decade"</a>, Dave Spohn, About.com, 15 December 2009</span></li>
+<li id="cite_note-57"><span class="mw-cite-backlink"><b><a href="#cite_ref-57">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://internetgames.about.com/od/gamingnews/a/timeline.htm">"Internet Game Timeline: 1963 – 2004"</a>, Dave Spohn, About.com, 2 June 2011</span></li>
+<li id="cite_note-58"><span class="mw-cite-backlink"><b><a href="#cite_ref-58">^</a></b></span> <span class="reference-text"><span class="citation web">Carole Hughes, Boston College. <a rel="nofollow" class="external text" href="https://www2.bc.edu/~hughesc/abstract.html">"The Relationship Between Internet Use and Loneliness Among College Students"</a>. Boston College<span class="printonly">. <a rel="nofollow" class="external free" href="https://www2.bc.edu/~hughesc/abstract.html">https://www2.bc.edu/~hughesc/abstract.html</a></span><span class="reference-accessdate">. Retrieved 11 August 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=The+Relationship+Between+Internet+Use+and+Loneliness+Among+College+Students&amp;rft.atitle=&amp;rft.aulast=Carole+Hughes%2C+Boston+College&amp;rft.au=Carole+Hughes%2C+Boston+College&amp;rft.pub=Boston+College&amp;rft_id=https%3A%2F%2Fwww2.bc.edu%2F%7Ehughesc%2Fabstract.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-59"><span class="mw-cite-backlink"><b><a href="#cite_ref-59">^</a></b></span> <span class="reference-text">Patricia M. Thornton, "The New Cybersects: Resistance and Repression in the Reform era. “ In Elizabeth Perry and Mark Selden, eds., <i>Chinese Society: Change, Conflict and Resistance</i> (second edition) (London and New York: Routledge, 2003), pp. 149–50.</span></li>
+<li id="cite_note-60"><span class="mw-cite-backlink"><b><a href="#cite_ref-60">^</a></b></span> <span class="reference-text"><span class="citation news"><a rel="nofollow" class="external text" href="http://www.teliqo.com/news/net-abuse-hits-small-city-firms/">"Net abuse hits small city firms"</a>. <i>The Scotsman</i> (Edinburgh). 11 September 2003<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.teliqo.com/news/net-abuse-hits-small-city-firms/">http://www.teliqo.com/news/net-abuse-hits-small-city-firms/</a></span><span class="reference-accessdate">. Retrieved 7 August 2009</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=Net+abuse+hits+small+city+firms&amp;rft.jtitle=The+Scotsman&amp;rft.date=11+September+2003&amp;rft.place=Edinburgh&amp;rft_id=http%3A%2F%2Fwww.teliqo.com%2Fnews%2Fnet-abuse-hits-small-city-firms%2F&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-61"><span class="mw-cite-backlink"><b><a href="#cite_ref-61">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.theshallowsbook.com/nicholascarr/Nicholas_Carrs_The_Shallows.html"><i>The Shallows: What the Internet Is Doing to Our Brains</i></a>, Nicholas Carr, W. W. Norton, 7 June 2010, 276 pp., <a href="/wiki/Special:BookSources/0393072223" class="internal mw-magiclink-isbn">ISBN 0-393-07222-3</a>, <a href="/wiki/Special:BookSources/9780393072228" class="internal mw-magiclink-isbn">ISBN 978-0-393-07222-8</a></span></li>
+<li id="cite_note-cascading-62"><span class="mw-cite-backlink"><b><a href="#cite_ref-cascading_62-0">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.miller-mccune.com/politics/the-cascading-effects-of-the-arab-spring-28575/">"The Arab Uprising's Cascading Effects"</a>. Miller-mccune.com. 23 February 2011<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.miller-mccune.com/politics/the-cascading-effects-of-the-arab-spring-28575/">http://www.miller-mccune.com/politics/the-cascading-effects-of-the-arab-spring-28575/</a></span><span class="reference-accessdate">. Retrieved 27 February 2011</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=The+Arab+Uprising%27s+Cascading+Effects&amp;rft.atitle=&amp;rft.date=23+February+2011&amp;rft.pub=Miller-mccune.com&amp;rft_id=http%3A%2F%2Fwww.miller-mccune.com%2Fpolitics%2Fthe-cascading-effects-of-the-arab-spring-28575%2F&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-63"><span class="mw-cite-backlink"><b><a href="#cite_ref-63">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.etd.ceu.hu/2011/chokoshvili_davit.pdf">The Role of the Internet in Democratic Transition: Case Study of the Arab Spring</a>, Davit Chokoshvili, Master's Thesis, June 2011</span></li>
+<li id="cite_note-64"><span class="mw-cite-backlink"><b><a href="#cite_ref-64">^</a></b></span> <span class="reference-text"><span class="citation news">Kirkpatrick, David D. (9 February 2011). <a rel="nofollow" class="external text" href="http://www.nytimes.com/2011/02/10/world/middleeast/10youth.html">"Wired and Shrewd, Young Egyptians Guide Revolt"</a>. <i>The New York Times</i><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.nytimes.com/2011/02/10/world/middleeast/10youth.html">http://www.nytimes.com/2011/02/10/world/middleeast/10youth.html</a></span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.atitle=Wired+and+Shrewd%2C+Young+Egyptians+Guide+Revolt&amp;rft.jtitle=The+New+York+Times&amp;rft.aulast=Kirkpatrick&amp;rft.aufirst=David+D.&amp;rft.au=Kirkpatrick%2C%26%2332%3BDavid+D.&amp;rft.date=9+February+2011&amp;rft_id=http%3A%2F%2Fwww.nytimes.com%2F2011%2F02%2F10%2Fworld%2Fmiddleeast%2F10youth.html&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-simonBerdal2004-65"><span class="mw-cite-backlink">^ <a href="#cite_ref-simonBerdal2004_65-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-simonBerdal2004_65-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><span class="citation" id="CITEREFBerdal2004">Berdal, S.R.B. (2004) (PDF), <a rel="nofollow" class="external text" href="http://www.duo.uio.no/publ/informatikk/2004/20535/SimonBerdal.pdf"><i>Public deliberation on the Web: A Habermasian inquiry into online discourse</i></a>, Oslo: University of Oslo<span class="printonly">, <a rel="nofollow" class="external free" href="http://www.duo.uio.no/publ/informatikk/2004/20535/SimonBerdal.pdf">http://www.duo.uio.no/publ/informatikk/2004/20535/SimonBerdal.pdf</a></span></span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Public+deliberation+on+the+Web%3A+A+Habermasian+inquiry+into+online+discourse&amp;rft.aulast=Berdal&amp;rft.aufirst=S.R.B.&amp;rft.au=Berdal%2C%26%2332%3BS.R.B.&amp;rft.date=2004&amp;rft.place=Oslo&amp;rft.pub=University+of+Oslo&amp;rft_id=http%3A%2F%2Fwww.duo.uio.no%2Fpubl%2Finformatikk%2F2004%2F20535%2FSimonBerdal.pdf&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+<li id="cite_note-66"><span class="mw-cite-backlink"><b><a href="#cite_ref-66">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://blogs.cgdev.org/open_book/2009/10/kiva-is-not-quite-what-it-seems.php"><i>Kiva Is Not Quite What It Seems</i></a>, by David Roodman, Center for Global Development, 2 Oct. 2009, as accessed 2 &amp; 16 Jan 2010</span></li>
+<li id="cite_note-67"><span class="mw-cite-backlink"><b><a href="#cite_ref-67">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.nytimes.com/2009/11/09/business/global/09kiva.html?_r=1&amp;scp=1&amp;sq=Kiva&amp;st=cse"><i>Confusion on Where Money Lent via Kiva Goes</i></a>, by Stephanie Strom, in The New York Times, 8 Nov. 2009, as accessed 2 &amp; 16 Jan 2010</span></li>
+<li id="cite_note-68"><span class="mw-cite-backlink"><b><a href="#cite_ref-68">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.microfinancefocus.com/news/2010/02/07/zidisha-set-to-expand-in-peer-to-peer-microfinance-julia-kurnia/">"Zidisha Set to "Expand" in Peer-to-Peer Microfinance", Microfinance Focus, Feb 2010</a></span></li>
+<li id="cite_note-69"><span class="mw-cite-backlink"><b><a href="#cite_ref-69">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&amp;tid=12187"><i>Access Controlled: The Shaping of Power, Rights, and Rule in Cyberspace</i></a>, Ronald J. Deibert, John G. Palfrey, Rafal Rohozinski, and Jonathan Zittrain (eds), MIT Press, April 2010, <a href="/wiki/Special:BookSources/0262514354" class="internal mw-magiclink-isbn">ISBN 0-262-51435-4</a>, <a href="/wiki/Special:BookSources/9780262514354" class="internal mw-magiclink-isbn">ISBN 978-0-262-51435-4</a></span></li>
+<li id="cite_note-The_Register-70"><span class="mw-cite-backlink"><b><a href="#cite_ref-The_Register_70-0">^</a></b></span> <span class="reference-text"><span class="citation web"><a rel="nofollow" class="external text" href="http://www.theregister.co.uk/2008/02/18/finnish_policy_censor_activist/">"Finland censors anti-censorship site"</a>. <i><a href="/wiki/The_Register" title="The Register">The Register</a></i>. 18 February 2008<span class="printonly">. <a rel="nofollow" class="external free" href="http://www.theregister.co.uk/2008/02/18/finnish_policy_censor_activist/">http://www.theregister.co.uk/2008/02/18/finnish_policy_censor_activist/</a></span><span class="reference-accessdate">. Retrieved 19 February 2008</span>.</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.btitle=Finland+censors+anti-censorship+site&amp;rft.atitle=%5B%5BThe+Register%5D%5D&amp;rft.date=18+February+2008&amp;rft_id=http%3A%2F%2Fwww.theregister.co.uk%2F2008%2F02%2F18%2Ffinnish_policy_censor_activist%2F&amp;rfr_id=info:sid/en.wikipedia.org:Internet"><span style="display: none;">&#160;</span></span></span></li>
+</ol>
+</div>
+<h2> <span class="mw-headline" id="External_links">External links</span></h2>
+<table class="metadata plainlinks mbox-small" style="border:1px solid #aaa; background-color:#f9f9f9;">
+<tr>
+<td colspan="2" style="margin: auto; text-align: center">Find more about <b>Internet</b> on Wikipedia's <a href="/wiki/Wikipedia:Wikimedia_sister_projects" title="Wikipedia:Wikimedia sister projects">sister projects</a>:</td>
+</tr>
+<tr>
+<td><a href="//en.wiktionary.org/wiki/Special:Search/Internet" title="Search Wiktionary"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Wiktionary-logo-en.svg/23px-Wiktionary-logo-en.svg.png" width="23" height="25" /></a></td>
+<td><a class="external text" href="//en.wiktionary.org/wiki/Special:Search/Internet">Definitions and translations</a> from Wiktionary<br /></td>
+</tr>
+<tr>
+<td><a href="//commons.wikimedia.org/wiki/Special:Search/Internet" title="Search Commons"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/18px-Commons-logo.svg.png" width="18" height="25" /></a></td>
+<td><a class="external text" href="//commons.wikimedia.org/wiki/Special:Search/Internet">Images and media</a> from Commons<br /></td>
+</tr>
+<tr>
+<td><a href="//en.wikiversity.org/wiki/Special:Search/Internet" title="Search Wikiversity"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Wikiversity-logo-en.svg/25px-Wikiversity-logo-en.svg.png" width="25" height="23" /></a></td>
+<td><a class="external text" href="//en.wikiversity.org/wiki/Special:Search/Internet">Learning resources</a> from Wikiversity<br /></td>
+</tr>
+<tr>
+<td><a href="//en.wikinews.org/wiki/Special:Search/Internet" title="Search Wikinews"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/2/24/Wikinews-logo.svg/25px-Wikinews-logo.svg.png" width="25" height="14" /></a></td>
+<td><a class="external text" href="//en.wikinews.org/wiki/Special:Search/Internet">News stories</a> from Wikinews<br /></td>
+</tr>
+<tr>
+<td><a href="//en.wikiquote.org/wiki/Special:Search/Internet" title="Search Wikiquote"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikiquote-logo.svg/21px-Wikiquote-logo.svg.png" width="21" height="25" /></a></td>
+<td><a class="external text" href="//en.wikiquote.org/wiki/Special:Search/Internet">Quotations</a> from Wikiquote<br /></td>
+</tr>
+<tr>
+<td><a href="//en.wikisource.org/wiki/Special:Search/Internet" title="Search Wikisource"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/24px-Wikisource-logo.svg.png" width="24" height="25" /></a></td>
+<td><a class="external text" href="//en.wikisource.org/wiki/Special:Search/Internet">Source texts</a> from Wikisource<br /></td>
+</tr>
+<tr>
+<td><a href="//en.wikibooks.org/wiki/Special:Search/Internet" title="Search Wikibooks"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/25px-Wikibooks-logo.svg.png" width="25" height="25" /></a></td>
+<td><a class="external text" href="//en.wikibooks.org/wiki/Special:Search/Internet">Textbooks</a> from Wikibooks<br /></td>
+</tr>
+</table>
+<table class="metadata mbox-small" style="border:1px solid #aaa; background-color:#f9f9f9;">
+<tr>
+<td class="mbox-image"><img alt="Book icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Office-book.svg/30px-Office-book.svg.png" width="30" height="30" /></td>
+<td class="mbox-text" style=""><i><b><a href="/wiki/Book:Internet" title="Book:Internet">Book: Internet</a></b></i></td>
+</tr>
+<tr>
+<td colspan="2" class="mbox-text" style=""><small><a href="/wiki/Wikipedia:Books" title="Wikipedia:Books">Wikipedia books</a> are collections of articles that can be downloaded or ordered in print.</small></td>
+</tr>
+</table>
+<h3> <span class="mw-headline" id="Organizations">Organizations</span></h3>
+<ul>
+<li><a rel="nofollow" class="external text" href="http://www.isoc.org/">The Internet Society</a></li>
+<li><a rel="nofollow" class="external text" href="http://cyber.law.harvard.edu/">Berkman Center for Internet and Society</a></li>
+<li><a rel="nofollow" class="external text" href="http://ec.europa.eu/information_society/index_en.htm">European Commission Information Society</a></li>
+<li><a rel="nofollow" class="external text" href="http://www.livinginternet.com/">Living Internet</a>, Internet history and related information, including information from many creators of the Internet</li>
+</ul>
+<h3> <span class="mw-headline" id="Articles.2C_books.2C_and_journals">Articles, books, and journals</span></h3>
+<ul>
+<li><a rel="nofollow" class="external text" href="http://www.firstmonday.org/"><i>First Monday</i></a>, a peer-reviewed journal on the Internet established in 1996 as a Great Cities Initiative of the University Library of the <a href="/wiki/University_of_Illinois_at_Chicago" title="University of Illinois at Chicago">University of Illinois at Chicago</a>, ISSN: 1396-0466</li>
+<li><a rel="nofollow" class="external text" href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-1405196866.html"><i>Rise of the Network Society</i></a>, Manual Castells, Wiley-Blackwell, 1996 (1st ed) and 2009 (2nd ed), <a href="/wiki/Special:BookSources/9781405196864" class="internal mw-magiclink-isbn">ISBN 978-1-4051-9686-4</a></li>
+<li><a rel="nofollow" class="external text" href="http://www.nsf.gov/about/history/nsf0050/internet/internet.htm">"The Internet: Changing the Way We Communicate"</a> in <a rel="nofollow" class="external text" href="http://www.nsf.gov/about/history/nsf0050/index.jsp"><i>America's Investment in the Future</i></a>, <a href="/wiki/National_Science_Foundation" title="National Science Foundation">National Science Foundation</a>, Arlington, Va. USA, 2000</li>
+<li><a rel="nofollow" class="external text" href="http://www.oup.com/us/catalog/general/subject/Sociology/EnvironmentTechnology/?view=usa&amp;ci=9780199255771">“Lessons from the History of the Internet”</a>, Manuel Castells, in <i>The Internet Galaxy</i>, Ch. 1, pp 9–35, Oxford University Press, 2001, <a href="/wiki/Special:BookSources/9780199255771" class="internal mw-magiclink-isbn">ISBN 978-0-19-925577-1</a> ISBN10: 0-19-925577-6</li>
+<li><a rel="nofollow" class="external text" href="http://www.osce.org/fom/13836">"Media Freedom Internet Cookbook"</a> by the <a href="/wiki/OSCE_Representative_on_Freedom_of_the_Media" title="OSCE Representative on Freedom of the Media">OSCE Representative on Freedom of the Media</a> Vienna, 2004</li>
+<li><a rel="nofollow" class="external text" href="http://discovermagazine.com/2007/jun/how-much-does-the-internet-weigh">"How Much Does The Internet Weigh?</a>", by Stephen Cass, <a href="/wiki/Discover_(magazine)" title="Discover (magazine)"><i>Discover</i></a>, 2007</li>
+<li><a rel="nofollow" class="external text" href="http://www.sciencenews.org/view/generic/id/8651/title/Mapping_a_Medusa_The_Internet_spreads_its_tentacles">"Mapping a medusa: The Internet spreads its tentacles"</a>, Julie Rehmeyer, <i>Science News</i>, Vol. 171, No. 25, pp.&#160;387–388, 23 June 2007</li>
+<li><a rel="nofollow" class="external text" href="http://www.routledge.com/books/details/9780415352277/"><i>Internet</i></a>, Lorenzo Cantoni &amp; Stefano Tardini, Routledge, 2006, <a href="/wiki/Special:BookSources/9780203698884" class="internal mw-magiclink-isbn">ISBN 978-0-203-69888-4</a></li>
+<li><a rel="nofollow" class="external text" href="http://www.southbourne.com/articles/internet-explained"><i>The Internet Explained</i></a>, Vincent Zegna &amp; Mike Pepper, Sonet Digital, November 2005, Pages 1 - 7.</li>
+</ul>
+
+
+<!-- 
+NewPP limit report
+Preprocessor node count: 29582/1000000
+Post-expand include size: 195685/2048000 bytes
+Template argument size: 69526/2048000 bytes
+Highest expansion depth: 21/40
+Expensive parser function count: 8/500
+-->
+
+<!-- Saved in parser cache with key enwiki:pcache:idhash:14539-0!*!0!!en!4!* and timestamp 20120606164010 -->
+</div>                         <!-- /bodycontent -->
+                                                               <!-- printfooter -->
+                               <div class="printfooter">
+                               Retrieved from "<a href="http://en.wikipedia.org/w/index.php?title=Internet&amp;oldid=496296823">http://en.wikipedia.org/w/index.php?title=Internet&amp;oldid=496296823</a>"                            </div>
+                               <!-- /printfooter -->
+                                                                                               <!-- catlinks -->
+                               <div id='catlinks' class='catlinks'><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/wiki/Category:American_inventions" title="Category:American inventions">American inventions</a></li><li><a href="/wiki/Category:Digital_technology" title="Category:Digital technology">Digital technology</a></li><li><a href="/wiki/Category:Internet" title="Category:Internet">Internet</a></li><li><a href="/wiki/Category:Media_technology" title="Category:Media technology">Media technology</a></li><li><a href="/wiki/Category:New_media" title="Category:New media">New media</a></li><li><a href="/wiki/Category:Scientific_revolution" title="Category:Scientific revolution">Scientific revolution</a></li><li><a href="/wiki/Category:Virtual_reality" title="Category:Virtual reality">Virtual reality</a></li><li><a href="/wiki/Category:1969_introductions" title="Category:1969 introductions">1969 introductions</a></li><li><a href="/wiki/Category:Sociocultural_globalization" title="Category:Sociocultural globalization">Sociocultural globalization</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:All_articles_with_dead_external_links" title="Category:All articles with dead external links">All articles with dead external links</a></li><li><a href="/wiki/Category:Articles_with_dead_external_links_from_August_2011" title="Category:Articles with dead external links from August 2011">Articles with dead external links from August 2011</a></li><li><a href="/wiki/Category:Wikipedia_pages_semi-protected_against_vandalism" title="Category:Wikipedia pages semi-protected against vandalism">Wikipedia pages semi-protected against vandalism</a></li><li><a href="/wiki/Category:Wikipedia_protected_pages_without_expiry" title="Category:Wikipedia protected pages without expiry">Wikipedia protected pages without expiry</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_April_2012" title="Category:Articles with unsourced statements from April 2012">Articles with unsourced statements from April 2012</a></li><li><a href="/wiki/Category:Use_British_English_from_August_2010" title="Category:Use British English from August 2010">Use British English from August 2010</a></li><li><a href="/wiki/Category:Use_dmy_dates_from_May_2012" title="Category:Use dmy dates from May 2012">Use dmy dates from May 2012</a></li></ul></div></div>                         <!-- /catlinks -->
+                                                                                               <div class="visualClear"></div>
+                               <!-- debughtml -->
+                                                               <!-- /debughtml -->
+                       </div>
+                       <!-- /bodyContent -->
+               </div>
+               <!-- /content -->
+               <!-- header -->
+               <div id="mw-head" class="noprint">
+                       
+<!-- 0 -->
+<div id="p-personal" class="">
+       <h5>Personal tools</h5>
+       <ul>
+               <li id="pt-login"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Internet" title="You are encouraged to log in; however, it is not mandatory. [o]" accesskey="o">Log in</a></li>
+               <li id="pt-createaccount"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Internet&amp;type=signup">Create account</a></li>
+       </ul>
+</div>
+
+<!-- /0 -->
+                       <div id="left-navigation">
+                               
+<!-- 0 -->
+<div id="p-namespaces" class="vectorTabs">
+       <h5>Namespaces</h5>
+       <ul>
+                                       <li  id="ca-nstab-main" class="selected"><span><a href="/wiki/Internet"  title="View the content page [c]" accesskey="c">Article</a></span></li>
+                                       <li  id="ca-talk"><span><a href="/wiki/Talk:Internet"  title="Discussion about the content page [t]" accesskey="t">Talk</a></span></li>
+                       </ul>
+</div>
+
+<!-- /0 -->
+
+<!-- 1 -->
+<div id="p-variants" class="vectorMenu emptyPortlet">
+       <h4>
+               </h4>
+       <h5><span>Variants</span><a href="#"></a></h5>
+       <div class="menu">
+               <ul>
+                                       </ul>
+       </div>
+</div>
+
+<!-- /1 -->
+                       </div>
+                       <div id="right-navigation">
+                               
+<!-- 0 -->
+<div id="p-views" class="vectorTabs">
+       <h5>Views</h5>
+       <ul>
+                                       <li id="ca-view" class="selected"><span><a href="/wiki/Internet" >Read</a></span></li>
+                                       <li id="ca-viewsource"><span><a href="/w/index.php?title=Internet&amp;action=edit"  title="This page is protected.&#10;You can view its source [e]" accesskey="e">View source</a></span></li>
+                                       <li id="ca-history" class="collapsible"><span><a href="/w/index.php?title=Internet&amp;action=history"  title="Past versions of this page [h]" accesskey="h">View history</a></span></li>
+                       </ul>
+</div>
+
+<!-- /0 -->
+
+<!-- 1 -->
+<div id="p-cactions" class="vectorMenu emptyPortlet">
+       <h5><span>Actions</span><a href="#"></a></h5>
+       <div class="menu">
+               <ul>
+                                       </ul>
+       </div>
+</div>
+
+<!-- /1 -->
+
+<!-- 2 -->
+<div id="p-search">
+       <h5><label for="searchInput">Search</label></h5>
+       <form action="/w/index.php" id="searchform">
+                               <div id="simpleSearch">
+                                               <input type="text" name="search" value="" title="Search Wikipedia [f]" accesskey="f" id="searchInput" />                                                <button type="submit" name="button" title="Search Wikipedia for this text" id="searchButton" width="12" height="13"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/vector/images/search-ltr.png?303-4" alt="Search" /></button>                                                           <input type='hidden' name="title" value="Special:Search"/>
+               </div>
+       </form>
+</div>
+
+<!-- /2 -->
+                       </div>
+               </div>
+               <!-- /header -->
+               <!-- panel -->
+                       <div id="mw-panel" class="noprint">
+                               <!-- logo -->
+                                       <div id="p-logo"><a style="background-image: url(//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png);" href="/wiki/Main_Page"  title="Visit the main page"></a></div>
+                               <!-- /logo -->
+                               
+<!-- navigation -->
+<div class="portal" id='p-navigation'>
+       <h5>Navigation</h5>
+       <div class="body">
+               <ul>
+                       <li id="n-mainpage-description"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z">Main page</a></li>
+                       <li id="n-contents"><a href="/wiki/Portal:Contents" title="Guides to browsing Wikipedia">Contents</a></li>
+                       <li id="n-featuredcontent"><a href="/wiki/Portal:Featured_content" title="Featured content – the best of Wikipedia">Featured content</a></li>
+                       <li id="n-currentevents"><a href="/wiki/Portal:Current_events" title="Find background information on current events">Current events</a></li>
+                       <li id="n-randompage"><a href="/wiki/Special:Random" title="Load a random article [x]" accesskey="x">Random article</a></li>
+                       <li id="n-sitesupport"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=20120521SB001&amp;uselang=en" title="Support us">Donate to Wikipedia</a></li>
+               </ul>
+       </div>
+</div>
+
+<!-- /navigation -->
+
+<!-- SEARCH -->
+
+<!-- /SEARCH -->
+
+<!-- interaction -->
+<div class="portal" id='p-interaction'>
+       <h5>Interaction</h5>
+       <div class="body">
+               <ul>
+                       <li id="n-help"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia">Help</a></li>
+                       <li id="n-aboutsite"><a href="/wiki/Wikipedia:About" title="Find out about Wikipedia">About Wikipedia</a></li>
+                       <li id="n-portal"><a href="/wiki/Wikipedia:Community_portal" title="About the project, what you can do, where to find things">Community portal</a></li>
+                       <li id="n-recentchanges"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li>
+                       <li id="n-contact"><a href="/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia">Contact Wikipedia</a></li>
+               </ul>
+       </div>
+</div>
+
+<!-- /interaction -->
+
+<!-- TOOLBOX -->
+<div class="portal" id='p-tb'>
+       <h5>Toolbox</h5>
+       <div class="body">
+               <ul>
+                       <li id="t-whatlinkshere"><a href="/wiki/Special:WhatLinksHere/Internet" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j">What links here</a></li>
+                       <li id="t-recentchangeslinked"><a href="/wiki/Special:RecentChangesLinked/Internet" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
+                       <li id="t-upload"><a href="/wiki/Wikipedia:Upload" title="Upload files [u]" accesskey="u">Upload file</a></li>
+                       <li id="t-specialpages"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li>
+                       <li id="t-permalink"><a href="/w/index.php?title=Internet&amp;oldid=496296823" title="Permanent link to this revision of the page">Permanent link</a></li>
+<li id="t-cite"><a href="/w/index.php?title=Special:Cite&amp;page=Internet&amp;id=496296823" title="Information on how to cite this page">Cite this page</a></li>              </ul>
+       </div>
+</div>
+
+<!-- /TOOLBOX -->
+
+<!-- coll-print_export -->
+<div class="portal" id='p-coll-print_export'>
+       <h5>Print/export</h5>
+       <div class="body">
+               <ul id="collectionPortletList"><li id="coll-create_a_book"><a href="/w/index.php?title=Special:Book&amp;bookcmd=book_creator&amp;referer=Internet" title="Create a book or page collection" rel="nofollow">Create a book</a></li><li id="coll-download-as-rl"><a href="/w/index.php?title=Special:Book&amp;bookcmd=render_article&amp;arttitle=Internet&amp;oldid=496296823&amp;writer=rl" title="Download a PDF version of this wiki page" rel="nofollow">Download as PDF</a></li><li id="t-print"><a href="/w/index.php?title=Internet&amp;printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li></ul>    </div>
+</div>
+
+<!-- /coll-print_export -->
+
+<!-- LANGUAGES -->
+<div class="portal" id='p-lang'>
+       <h5>Languages</h5>
+       <div class="body">
+               <ul>
+                       <li class="interwiki-ace"><a href="//ace.wikipedia.org/wiki/Intern%C3%A8t" title="Internèt" lang="ace" hreflang="ace">Acèh</a></li>
+                       <li class="interwiki-af"><a href="//af.wikipedia.org/wiki/Internet" title="Internet" lang="af" hreflang="af">Afrikaans</a></li>
+                       <li class="interwiki-als"><a href="//als.wikipedia.org/wiki/Internet" title="Internet" lang="als" hreflang="als">Alemannisch</a></li>
+                       <li class="interwiki-am"><a href="//am.wikipedia.org/wiki/%E1%8B%B5%E1%88%A8_%E1%8C%88%E1%8C%BD_%E1%88%98%E1%88%A8%E1%89%A5" title="ድረ ገጽ መረብ" lang="am" hreflang="am">አማርኛ</a></li>
+                       <li class="interwiki-ar"><a href="//ar.wikipedia.org/wiki/%D8%A5%D9%86%D8%AA%D8%B1%D9%86%D8%AA" title="إنترنت" lang="ar" hreflang="ar">العربية</a></li>
+                       <li class="interwiki-an"><a href="//an.wikipedia.org/wiki/Internet" title="Internet" lang="an" hreflang="an">Aragonés</a></li>
+                       <li class="interwiki-arc"><a href="//arc.wikipedia.org/wiki/%DC%90%DC%A2%DC%9B%DC%AA%DC%A2%DC%9B" title="ܐܢܛܪܢܛ" lang="arc" hreflang="arc">ܐܪܡܝܐ</a></li>
+                       <li class="interwiki-as"><a href="//as.wikipedia.org/wiki/%E0%A6%87%E0%A6%A3%E0%A7%8D%E0%A6%9F%E0%A6%BE%E0%A7%B0%E0%A6%A8%E0%A7%87%E0%A6%9F" title="ইণ্টাৰনেট" lang="as" hreflang="as">অসমীয়া</a></li>
+                       <li class="interwiki-ast"><a href="//ast.wikipedia.org/wiki/Rede_Internet" title="Rede Internet" lang="ast" hreflang="ast">Asturianu</a></li>
+                       <li class="interwiki-az"><a href="//az.wikipedia.org/wiki/%C4%B0nternet" title="İnternet" lang="az" hreflang="az">Azərbaycanca</a></li>
+                       <li class="interwiki-bm"><a href="//bm.wikipedia.org/wiki/%C6%90nt%C9%9Brin%C9%9Bti" title="Ɛntɛrinɛti" lang="bm" hreflang="bm">Bamanankan</a></li>
+                       <li class="interwiki-bn"><a href="//bn.wikipedia.org/wiki/%E0%A6%87%E0%A6%A8%E0%A7%8D%E0%A6%9F%E0%A6%BE%E0%A6%B0%E0%A6%A8%E0%A7%87%E0%A6%9F" title="ইন্টারনেট" lang="bn" hreflang="bn">বাংলা</a></li>
+                       <li class="interwiki-zh-min-nan"><a href="//zh-min-nan.wikipedia.org/wiki/Internet" title="Internet" lang="zh-min-nan" hreflang="zh-min-nan">Bân-lâm-gú</a></li>
+                       <li class="interwiki-map-bms"><a href="//map-bms.wikipedia.org/wiki/Internet" title="Internet" lang="map-bms" hreflang="map-bms">Basa Banyumasan</a></li>
+                       <li class="interwiki-ba"><a href="//ba.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="ba" hreflang="ba">Башҡортса</a></li>
+                       <li class="interwiki-be"><a href="//be.wikipedia.org/wiki/%D0%86%D0%BD%D1%82%D1%8D%D1%80%D0%BD%D1%8D%D1%82" title="Інтэрнэт" lang="be" hreflang="be">Беларуская</a></li>
+                       <li class="interwiki-be-x-old"><a href="//be-x-old.wikipedia.org/wiki/%D0%86%D0%BD%D1%82%D1%8D%D1%80%D0%BD%D1%8D%D1%82" title="Інтэрнэт" lang="be-x-old" hreflang="be-x-old">‪Беларуская (тарашкевіца)‬</a></li>
+                       <li class="interwiki-bh"><a href="//bh.wikipedia.org/wiki/%E0%A4%87%E0%A4%82%E0%A4%9F%E0%A4%B0%E0%A4%A8%E0%A5%87%E0%A4%9F" title="इंटरनेट" lang="bh" hreflang="bh">भोजपुरी</a></li>
+                       <li class="interwiki-bg"><a href="//bg.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="bg" hreflang="bg">Български</a></li>
+                       <li class="interwiki-bar"><a href="//bar.wikipedia.org/wiki/Internetz" title="Internetz" lang="bar" hreflang="bar">Boarisch</a></li>
+                       <li class="interwiki-bs"><a href="//bs.wikipedia.org/wiki/Internet" title="Internet" lang="bs" hreflang="bs">Bosanski</a></li>
+                       <li class="interwiki-br"><a href="//br.wikipedia.org/wiki/Internet" title="Internet" lang="br" hreflang="br">Brezhoneg</a></li>
+                       <li class="interwiki-ca"><a href="//ca.wikipedia.org/wiki/Internet" title="Internet" lang="ca" hreflang="ca">Català</a></li>
+                       <li class="interwiki-cv"><a href="//cv.wikipedia.org/wiki/%D0%A2%D0%B5%D1%82%D0%B5%D0%BB" title="Тетел" lang="cv" hreflang="cv">Чӑвашла</a></li>
+                       <li class="interwiki-ceb"><a href="//ceb.wikipedia.org/wiki/Internet" title="Internet" lang="ceb" hreflang="ceb">Cebuano</a></li>
+                       <li class="interwiki-cs"><a href="//cs.wikipedia.org/wiki/Internet" title="Internet" lang="cs" hreflang="cs">Česky</a></li>
+                       <li class="interwiki-cy"><a href="//cy.wikipedia.org/wiki/Rhyngrwyd" title="Rhyngrwyd" lang="cy" hreflang="cy">Cymraeg</a></li>
+                       <li class="interwiki-da"><a href="//da.wikipedia.org/wiki/Internet" title="Internet" lang="da" hreflang="da">Dansk</a></li>
+                       <li class="interwiki-de"><a href="//de.wikipedia.org/wiki/Internet" title="Internet" lang="de" hreflang="de">Deutsch</a></li>
+                       <li class="interwiki-et"><a href="//et.wikipedia.org/wiki/Internet" title="Internet" lang="et" hreflang="et">Eesti</a></li>
+                       <li class="interwiki-el"><a href="//el.wikipedia.org/wiki/%CE%94%CE%B9%CE%B1%CE%B4%CE%AF%CE%BA%CF%84%CF%85%CE%BF" title="Διαδίκτυο" lang="el" hreflang="el">Ελληνικά</a></li>
+                       <li class="interwiki-eml"><a href="//eml.wikipedia.org/wiki/La_Raid_d%C3%A4l_Raid" title="La Raid däl Raid" lang="eml" hreflang="eml">Emiliàn e rumagnòl</a></li>
+                       <li class="interwiki-es"><a href="//es.wikipedia.org/wiki/Internet" title="Internet" lang="es" hreflang="es">Español</a></li>
+                       <li class="interwiki-eo"><a href="//eo.wikipedia.org/wiki/Interreto" title="Interreto" lang="eo" hreflang="eo">Esperanto</a></li>
+                       <li class="interwiki-ext"><a href="//ext.wikipedia.org/wiki/Internet" title="Internet" lang="ext" hreflang="ext">Estremeñu</a></li>
+                       <li class="interwiki-eu"><a href="//eu.wikipedia.org/wiki/Internet" title="Internet" lang="eu" hreflang="eu">Euskara</a></li>
+                       <li class="interwiki-fa"><a href="//fa.wikipedia.org/wiki/%D8%A7%DB%8C%D9%86%D8%AA%D8%B1%D9%86%D8%AA" title="اینترنت" lang="fa" hreflang="fa">فارسی</a></li>
+                       <li class="interwiki-fo"><a href="//fo.wikipedia.org/wiki/Alnet" title="Alnet" lang="fo" hreflang="fo">Føroyskt</a></li>
+                       <li class="interwiki-fr"><a href="//fr.wikipedia.org/wiki/Internet" title="Internet" lang="fr" hreflang="fr">Français</a></li>
+                       <li class="interwiki-fy"><a href="//fy.wikipedia.org/wiki/Ynternet" title="Ynternet" lang="fy" hreflang="fy">Frysk</a></li>
+                       <li class="interwiki-fur"><a href="//fur.wikipedia.org/wiki/Internet" title="Internet" lang="fur" hreflang="fur">Furlan</a></li>
+                       <li class="interwiki-ga"><a href="//ga.wikipedia.org/wiki/Idirl%C3%ADon" title="Idirlíon" lang="ga" hreflang="ga">Gaeilge</a></li>
+                       <li class="interwiki-gv"><a href="//gv.wikipedia.org/wiki/Eddyr-voggyl" title="Eddyr-voggyl" lang="gv" hreflang="gv">Gaelg</a></li>
+                       <li class="interwiki-gd"><a href="//gd.wikipedia.org/wiki/Eadar-l%C3%ACon" title="Eadar-lìon" lang="gd" hreflang="gd">Gàidhlig</a></li>
+                       <li class="interwiki-gl"><a href="//gl.wikipedia.org/wiki/Internet" title="Internet" lang="gl" hreflang="gl">Galego</a></li>
+                       <li class="interwiki-gan"><a href="//gan.wikipedia.org/wiki/%E4%BA%92%E8%81%AF%E7%B6%B2" title="互聯網" lang="gan" hreflang="gan">贛語</a></li>
+                       <li class="interwiki-gu"><a href="//gu.wikipedia.org/wiki/%E0%AA%87%E0%AA%A8%E0%AB%8D%E0%AA%9F%E0%AA%B0%E0%AA%A8%E0%AB%87%E0%AA%9F" title="ઇન્ટરનેટ" lang="gu" hreflang="gu">ગુજરાતી</a></li>
+                       <li class="interwiki-xal"><a href="//xal.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="xal" hreflang="xal">Хальмг</a></li>
+                       <li class="interwiki-ko"><a href="//ko.wikipedia.org/wiki/%EC%9D%B8%ED%84%B0%EB%84%B7" title="인터넷" lang="ko" hreflang="ko">한국어</a></li>
+                       <li class="interwiki-ha"><a href="//ha.wikipedia.org/wiki/Yanar_gizo" title="Yanar gizo" lang="ha" hreflang="ha">هَوُسَ</a></li>
+                       <li class="interwiki-hy"><a href="//hy.wikipedia.org/wiki/%D5%80%D5%A1%D5%B4%D5%A1%D6%81%D5%A1%D5%B6%D6%81" title="Համացանց" lang="hy" hreflang="hy">Հայերեն</a></li>
+                       <li class="interwiki-hi"><a href="//hi.wikipedia.org/wiki/%E0%A4%85%E0%A4%82%E0%A4%A4%E0%A4%B0%E0%A4%9C%E0%A4%BE%E0%A4%B2" title="अंतरजाल" lang="hi" hreflang="hi">हिन्दी</a></li>
+                       <li class="interwiki-hsb"><a href="//hsb.wikipedia.org/wiki/Internet" title="Internet" lang="hsb" hreflang="hsb">Hornjoserbsce</a></li>
+                       <li class="interwiki-hr"><a href="//hr.wikipedia.org/wiki/Internet" title="Internet" lang="hr" hreflang="hr">Hrvatski</a></li>
+                       <li class="interwiki-io"><a href="//io.wikipedia.org/wiki/Interreto" title="Interreto" lang="io" hreflang="io">Ido</a></li>
+                       <li class="interwiki-ig"><a href="//ig.wikipedia.org/wiki/Intanet" title="Intanet" lang="ig" hreflang="ig">Igbo</a></li>
+                       <li class="interwiki-ilo"><a href="//ilo.wikipedia.org/wiki/Internet" title="Internet" lang="ilo" hreflang="ilo">Ilokano</a></li>
+                       <li class="interwiki-id"><a href="//id.wikipedia.org/wiki/Internet" title="Internet" lang="id" hreflang="id">Bahasa Indonesia</a></li>
+                       <li class="interwiki-ia"><a href="//ia.wikipedia.org/wiki/Internet" title="Internet" lang="ia" hreflang="ia">Interlingua</a></li>
+                       <li class="interwiki-iu"><a href="//iu.wikipedia.org/wiki/%E1%96%83%E1%95%86%E1%93%B4%E1%90%85%E1%94%AD%E1%92%83%E1%91%AF%E1%91%A6_%E1%91%8E%E1%91%8E%E1%95%8B%E1%96%85%E1%93%AF%E1%92%AA%E1%94%AA%E1%91%A6" title="ᖃᕆᓴᐅᔭᒃᑯᑦ ᑎᑎᕋᖅᓯᒪᔪᑦ" lang="iu" hreflang="iu">ᐃᓄᒃᑎᑐᑦ/inuktitut</a></li>
+                       <li class="interwiki-os"><a href="//os.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="os" hreflang="os">Ирон</a></li>
+                       <li class="interwiki-is"><a href="//is.wikipedia.org/wiki/Interneti%C3%B0" title="Internetið" lang="is" hreflang="is">Íslenska</a></li>
+                       <li class="interwiki-it"><a href="//it.wikipedia.org/wiki/Internet" title="Internet" lang="it" hreflang="it">Italiano</a></li>
+                       <li class="interwiki-he"><a href="//he.wikipedia.org/wiki/%D7%90%D7%99%D7%A0%D7%98%D7%A8%D7%A0%D7%98" title="אינטרנט" lang="he" hreflang="he">עברית</a></li>
+                       <li class="interwiki-jv"><a href="//jv.wikipedia.org/wiki/Intern%C3%A8t" title="Internèt" lang="jv" hreflang="jv">Basa Jawa</a></li>
+                       <li class="interwiki-kn"><a href="//kn.wikipedia.org/wiki/%E0%B2%85%E0%B2%82%E0%B2%A4%E0%B2%B0%E0%B3%8D%E0%B2%9C%E0%B2%BE%E0%B2%B2" title="ಅಂತರ್ಜಾಲ" lang="kn" hreflang="kn">ಕನ್ನಡ</a></li>
+                       <li class="interwiki-ka"><a href="//ka.wikipedia.org/wiki/%E1%83%98%E1%83%9C%E1%83%A2%E1%83%94%E1%83%A0%E1%83%9C%E1%83%94%E1%83%A2%E1%83%98" title="ინტერნეტი" lang="ka" hreflang="ka">ქართული</a></li>
+                       <li class="interwiki-csb"><a href="//csb.wikipedia.org/wiki/Internet" title="Internet" lang="csb" hreflang="csb">Kaszëbsczi</a></li>
+                       <li class="interwiki-kk"><a href="//kk.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="kk" hreflang="kk">Қазақша</a></li>
+                       <li class="interwiki-sw"><a href="//sw.wikipedia.org/wiki/Intaneti" title="Intaneti" lang="sw" hreflang="sw">Kiswahili</a></li>
+                       <li class="interwiki-ht"><a href="//ht.wikipedia.org/wiki/Ent%C3%A8net" title="Entènet" lang="ht" hreflang="ht">Kreyòl ayisyen</a></li>
+                       <li class="interwiki-ku"><a href="//ku.wikipedia.org/wiki/%C3%8Enternet" title="Înternet" lang="ku" hreflang="ku">Kurdî</a></li>
+                       <li class="interwiki-ky"><a href="//ky.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="ky" hreflang="ky">Кыргызча</a></li>
+                       <li class="interwiki-lez"><a href="//lez.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="lez" hreflang="lez">Лезги</a></li>
+                       <li class="interwiki-lo"><a href="//lo.wikipedia.org/wiki/%E0%BA%AD%E0%BA%B4%E0%BA%99%E0%BB%80%E0%BA%95%E0%BA%B5%E0%BB%80%E0%BA%99%E0%BA%B1%E0%BA%94" title="ອິນເຕີເນັດ" lang="lo" hreflang="lo">ລາວ</a></li>
+                       <li class="interwiki-ltg"><a href="//ltg.wikipedia.org/wiki/%C5%A0k%C4%81rsteiklys" title="Škārsteiklys" lang="ltg" hreflang="ltg">Latgaļu</a></li>
+                       <li class="interwiki-la"><a href="//la.wikipedia.org/wiki/Interrete" title="Interrete" lang="la" hreflang="la">Latina</a></li>
+                       <li class="interwiki-lv"><a href="//lv.wikipedia.org/wiki/Internets" title="Internets" lang="lv" hreflang="lv">Latviešu</a></li>
+                       <li class="interwiki-lb"><a href="//lb.wikipedia.org/wiki/Internet" title="Internet" lang="lb" hreflang="lb">Lëtzebuergesch</a></li>
+                       <li class="interwiki-lt"><a href="//lt.wikipedia.org/wiki/Internetas" title="Internetas" lang="lt" hreflang="lt">Lietuvių</a></li>
+                       <li class="interwiki-lij"><a href="//lij.wikipedia.org/wiki/Internet" title="Internet" lang="lij" hreflang="lij">Ligure</a></li>
+                       <li class="interwiki-li"><a href="//li.wikipedia.org/wiki/Internet" title="Internet" lang="li" hreflang="li">Limburgs</a></li>
+                       <li class="interwiki-ln"><a href="//ln.wikipedia.org/wiki/%C6%90nt%C9%9Brn%C9%9B%CC%81t%C9%9B" title="Ɛntɛrnɛ́tɛ" lang="ln" hreflang="ln">Lingála</a></li>
+                       <li class="interwiki-lmo"><a href="//lmo.wikipedia.org/wiki/Internet" title="Internet" lang="lmo" hreflang="lmo">Lumbaart</a></li>
+                       <li class="interwiki-hu"><a href="//hu.wikipedia.org/wiki/Internet" title="Internet" lang="hu" hreflang="hu">Magyar</a></li>
+                       <li class="interwiki-mk"><a href="//mk.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="mk" hreflang="mk">Македонски</a></li>
+                       <li class="interwiki-mg"><a href="//mg.wikipedia.org/wiki/Internet" title="Internet" lang="mg" hreflang="mg">Malagasy</a></li>
+                       <li class="interwiki-ml"><a href="//ml.wikipedia.org/wiki/%E0%B4%87%E0%B4%A8%E0%B5%8D%E0%B4%B1%E0%B5%BC%E0%B4%A8%E0%B5%86%E0%B4%B1%E0%B5%8D%E0%B4%B1%E0%B5%8D" title="ഇന്റർനെറ്റ്" lang="ml" hreflang="ml">മലയാളം</a></li>
+                       <li class="interwiki-mr"><a href="//mr.wikipedia.org/wiki/%E0%A4%AE%E0%A4%B9%E0%A4%BE%E0%A4%9C%E0%A4%BE%E0%A4%B2" title="महाजाल" lang="mr" hreflang="mr">मराठी</a></li>
+                       <li class="interwiki-arz"><a href="//arz.wikipedia.org/wiki/%D8%A7%D9%86%D8%AA%D8%B1%D9%86%D8%AA" title="انترنت" lang="arz" hreflang="arz">مصرى</a></li>
+                       <li class="interwiki-mzn"><a href="//mzn.wikipedia.org/wiki/%D8%A7%DB%8C%D9%86%D8%AA%D8%B1%D9%86%D8%AA" title="اینترنت" lang="mzn" hreflang="mzn">مازِرونی</a></li>
+                       <li class="interwiki-ms"><a href="//ms.wikipedia.org/wiki/Internet" title="Internet" lang="ms" hreflang="ms">Bahasa Melayu</a></li>
+                       <li class="interwiki-mwl"><a href="//mwl.wikipedia.org/wiki/Anternete" title="Anternete" lang="mwl" hreflang="mwl">Mirandés</a></li>
+                       <li class="interwiki-mn"><a href="//mn.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D1%8D%D1%82" title="Интернэт" lang="mn" hreflang="mn">Монгол</a></li>
+                       <li class="interwiki-my"><a href="//my.wikipedia.org/wiki/%E1%80%A1%E1%80%84%E1%80%BA%E1%80%90%E1%80%AC%E1%80%94%E1%80%80%E1%80%BA" title="အင်တာနက်" lang="my" hreflang="my">မြန်မာဘာသာ</a></li>
+                       <li class="interwiki-nah"><a href="//nah.wikipedia.org/wiki/M%C4%81tlatz%C4%81lantli" title="Mātlatzālantli" lang="nah" hreflang="nah">Nāhuatl</a></li>
+                       <li class="interwiki-nl"><a href="//nl.wikipedia.org/wiki/Internet" title="Internet" lang="nl" hreflang="nl">Nederlands</a></li>
+                       <li class="interwiki-nds-nl"><a href="//nds-nl.wikipedia.org/wiki/Internet" title="Internet" lang="nds-nl" hreflang="nds-nl">Nedersaksisch</a></li>
+                       <li class="interwiki-ne"><a href="//ne.wikipedia.org/wiki/%E0%A4%87%E0%A4%A3%E0%A5%8D%E0%A4%9F%E0%A4%B0%E0%A4%A8%E0%A5%87%E0%A4%9F" title="इण्टरनेट" lang="ne" hreflang="ne">नेपाली</a></li>
+                       <li class="interwiki-new"><a href="//new.wikipedia.org/wiki/%E0%A4%87%E0%A4%A8%E0%A5%8D%E0%A4%9F%E0%A4%B0%E0%A4%A8%E0%A5%87%E0%A4%9F" title="इन्टरनेट" lang="new" hreflang="new">नेपाल भाषा</a></li>
+                       <li class="interwiki-ja"><a href="//ja.wikipedia.org/wiki/%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%8D%E3%83%83%E3%83%88" title="インターネット" lang="ja" hreflang="ja">日本語</a></li>
+                       <li class="interwiki-ce"><a href="//ce.wikipedia.org/wiki/H%CC%97ottinama%C5%9Fa" title="H̗ottinamaşa" lang="ce" hreflang="ce">Нохчийн</a></li>
+                       <li class="interwiki-no"><a href="//no.wikipedia.org/wiki/Internett" title="Internett" lang="no" hreflang="no">‪Norsk (bokmål)‬</a></li>
+                       <li class="interwiki-nn"><a href="//nn.wikipedia.org/wiki/Internett" title="Internett" lang="nn" hreflang="nn">‪Norsk (nynorsk)‬</a></li>
+                       <li class="interwiki-nrm"><a href="//nrm.wikipedia.org/wiki/Enternette" title="Enternette" lang="nrm" hreflang="nrm">Nouormand</a></li>
+                       <li class="interwiki-oc"><a href="//oc.wikipedia.org/wiki/Internet" title="Internet" lang="oc" hreflang="oc">Occitan</a></li>
+                       <li class="interwiki-mhr"><a href="//mhr.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="mhr" hreflang="mhr">Олык Марий</a></li>
+                       <li class="interwiki-or"><a href="//or.wikipedia.org/wiki/%E0%AC%87%E0%AC%A3%E0%AD%8D%E0%AC%9F%E0%AC%B0%E0%AC%A8%E0%AD%87%E0%AC%9F" title="ଇଣ୍ଟରନେଟ" lang="or" hreflang="or">ଓଡ଼ିଆ</a></li>
+                       <li class="interwiki-uz"><a href="//uz.wikipedia.org/wiki/Internet" title="Internet" lang="uz" hreflang="uz">Oʻzbek</a></li>
+                       <li class="interwiki-pag"><a href="//pag.wikipedia.org/wiki/Internet" title="Internet" lang="pag" hreflang="pag">Pangasinan</a></li>
+                       <li class="interwiki-pnb"><a href="//pnb.wikipedia.org/wiki/%D8%A7%D9%86%D9%B9%D8%B1%D9%86%DB%8C%D9%B9" title="انٹرنیٹ" lang="pnb" hreflang="pnb">پنجابی</a></li>
+                       <li class="interwiki-pap"><a href="//pap.wikipedia.org/wiki/Internet" title="Internet" lang="pap" hreflang="pap">Papiamentu</a></li>
+                       <li class="interwiki-ps"><a href="//ps.wikipedia.org/wiki/%D8%A7%D9%86%D9%BC%D8%B1%D9%86%D9%BC" title="انټرنټ" lang="ps" hreflang="ps">پښتو</a></li>
+                       <li class="interwiki-km"><a href="//km.wikipedia.org/wiki/%E1%9E%A2%E1%9F%8A%E1%9E%B8%E1%9E%93%E1%9E%92%E1%9E%BA%E1%9E%8E%E1%9F%81%E1%9E%8F" title="អ៊ីនធឺណេត" lang="km" hreflang="km">ភាសាខ្មែរ</a></li>
+                       <li class="interwiki-tpi"><a href="//tpi.wikipedia.org/wiki/Intanet" title="Intanet" lang="tpi" hreflang="tpi">Tok Pisin</a></li>
+                       <li class="interwiki-nds"><a href="//nds.wikipedia.org/wiki/Internet" title="Internet" lang="nds" hreflang="nds">Plattdüütsch</a></li>
+                       <li class="interwiki-pl"><a href="//pl.wikipedia.org/wiki/Internet" title="Internet" lang="pl" hreflang="pl">Polski</a></li>
+                       <li class="interwiki-pt"><a href="//pt.wikipedia.org/wiki/Internet" title="Internet" lang="pt" hreflang="pt">Português</a></li>
+                       <li class="interwiki-kaa"><a href="//kaa.wikipedia.org/wiki/%C4%B0nternet" title="İnternet" lang="kaa" hreflang="kaa">Qaraqalpaqsha</a></li>
+                       <li class="interwiki-ksh"><a href="//ksh.wikipedia.org/wiki/Engorn%C3%A4t" title="Engornät" lang="ksh" hreflang="ksh">Ripoarisch</a></li>
+                       <li class="interwiki-ro"><a href="//ro.wikipedia.org/wiki/Internet" title="Internet" lang="ro" hreflang="ro">Română</a></li>
+                       <li class="interwiki-rm"><a href="//rm.wikipedia.org/wiki/Internet" title="Internet" lang="rm" hreflang="rm">Rumantsch</a></li>
+                       <li class="interwiki-qu"><a href="//qu.wikipedia.org/wiki/Internet" title="Internet" lang="qu" hreflang="qu">Runa Simi</a></li>
+                       <li class="interwiki-rue"><a href="//rue.wikipedia.org/wiki/%D0%86%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Інтернет" lang="rue" hreflang="rue">Русиньскый</a></li>
+                       <li class="interwiki-ru"><a href="//ru.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="ru" hreflang="ru">Русский</a></li>
+                       <li class="interwiki-sah"><a href="//sah.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D1%8D%D1%80%D0%B8%D0%BD%D0%B8%D1%8D%D1%82" title="Интэриниэт" lang="sah" hreflang="sah">Саха тыла</a></li>
+                       <li class="interwiki-sa"><a href="//sa.wikipedia.org/wiki/%E0%A4%85%E0%A4%A8%E0%A5%8D%E0%A4%A4%E0%A4%B0%E0%A4%9C%E0%A4%BE%E0%A4%B2%E0%A4%AE%E0%A5%8D" title="अन्तरजालम्" lang="sa" hreflang="sa">संस्कृतम्</a></li>
+                       <li class="interwiki-sg"><a href="//sg.wikipedia.org/wiki/Gb%C3%A2ndasango" title="Gbândasango" lang="sg" hreflang="sg">Sängö</a></li>
+                       <li class="interwiki-stq"><a href="//stq.wikipedia.org/wiki/Internet" title="Internet" lang="stq" hreflang="stq">Seeltersk</a></li>
+                       <li class="interwiki-sq"><a href="//sq.wikipedia.org/wiki/Interneti" title="Interneti" lang="sq" hreflang="sq">Shqip</a></li>
+                       <li class="interwiki-scn"><a href="//scn.wikipedia.org/wiki/Internet" title="Internet" lang="scn" hreflang="scn">Sicilianu</a></li>
+                       <li class="interwiki-si"><a href="//si.wikipedia.org/wiki/%E0%B6%85%E0%B6%B1%E0%B7%8A%E0%B6%AD%E0%B6%BB%E0%B7%8A%E0%B6%A2%E0%B7%8F%E0%B6%BD%E0%B6%BA" title="අන්තර්ජාලය" lang="si" hreflang="si">සිංහල</a></li>
+                       <li class="interwiki-simple"><a href="//simple.wikipedia.org/wiki/Internet" title="Internet" lang="simple" hreflang="simple">Simple English</a></li>
+                       <li class="interwiki-sk"><a href="//sk.wikipedia.org/wiki/Internet" title="Internet" lang="sk" hreflang="sk">Slovenčina</a></li>
+                       <li class="interwiki-sl"><a href="//sl.wikipedia.org/wiki/Internet" title="Internet" lang="sl" hreflang="sl">Slovenščina</a></li>
+                       <li class="interwiki-cu"><a href="//cu.wikipedia.org/wiki/%D0%9C%D1%94%D0%B6%D0%B4%D0%BE%D1%83%D1%81%D1%A3%D1%82%D0%B8%D1%A5" title="Мєждоусѣтиѥ" lang="cu" hreflang="cu">Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ</a></li>
+                       <li class="interwiki-szl"><a href="//szl.wikipedia.org/wiki/Internec" title="Internec" lang="szl" hreflang="szl">Ślůnski</a></li>
+                       <li class="interwiki-so"><a href="//so.wikipedia.org/wiki/Internet" title="Internet" lang="so" hreflang="so">Soomaaliga</a></li>
+                       <li class="interwiki-ckb"><a href="//ckb.wikipedia.org/wiki/%D8%A6%DB%8C%D9%86%D8%AA%DB%95%D8%B1%D9%86%DB%8E%D8%AA" title="ئینتەرنێت" lang="ckb" hreflang="ckb">کوردی</a></li>
+                       <li class="interwiki-sr"><a href="//sr.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="sr" hreflang="sr">Српски / Srpski</a></li>
+                       <li class="interwiki-sh"><a href="//sh.wikipedia.org/wiki/Internet" title="Internet" lang="sh" hreflang="sh">Srpskohrvatski / Српскохрватски</a></li>
+                       <li class="interwiki-su"><a href="//su.wikipedia.org/wiki/Intern%C3%A9t" title="Internét" lang="su" hreflang="su">Basa Sunda</a></li>
+                       <li class="interwiki-fi"><a href="//fi.wikipedia.org/wiki/Internet" title="Internet" lang="fi" hreflang="fi">Suomi</a></li>
+                       <li class="interwiki-sv"><a href="//sv.wikipedia.org/wiki/Internet" title="Internet" lang="sv" hreflang="sv">Svenska</a></li>
+                       <li class="interwiki-tl"><a href="//tl.wikipedia.org/wiki/Internet" title="Internet" lang="tl" hreflang="tl">Tagalog</a></li>
+                       <li class="interwiki-ta"><a href="//ta.wikipedia.org/wiki/%E0%AE%87%E0%AE%A3%E0%AF%88%E0%AE%AF%E0%AE%AE%E0%AF%8D" title="இணையம்" lang="ta" hreflang="ta">தமிழ்</a></li>
+                       <li class="interwiki-kab"><a href="//kab.wikipedia.org/wiki/Internet" title="Internet" lang="kab" hreflang="kab">Taqbaylit</a></li>
+                       <li class="interwiki-tt"><a href="//tt.wikipedia.org/wiki/P%C3%A4r%C3%A4wez" title="Päräwez" lang="tt" hreflang="tt">Татарча/Tatarça</a></li>
+                       <li class="interwiki-te"><a href="//te.wikipedia.org/wiki/%E0%B0%87%E0%B0%82%E0%B0%9F%E0%B0%B0%E0%B1%8D%E0%B0%A8%E0%B1%86%E0%B0%9F%E0%B1%8D" title="ఇంటర్నెట్" lang="te" hreflang="te">తెలుగు</a></li>
+                       <li class="interwiki-th"><a href="//th.wikipedia.org/wiki/%E0%B8%AD%E0%B8%B4%E0%B8%99%E0%B9%80%E0%B8%97%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B9%80%E0%B8%99%E0%B9%87%E0%B8%95" title="อินเทอร์เน็ต" lang="th" hreflang="th">ไทย</a></li>
+                       <li class="interwiki-tg"><a href="//tg.wikipedia.org/wiki/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Интернет" lang="tg" hreflang="tg">Тоҷикӣ</a></li>
+                       <li class="interwiki-tr"><a href="//tr.wikipedia.org/wiki/%C4%B0nternet" title="İnternet" lang="tr" hreflang="tr">Türkçe</a></li>
+                       <li class="interwiki-uk"><a href="//uk.wikipedia.org/wiki/%D0%86%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82" title="Інтернет" lang="uk" hreflang="uk">Українська</a></li>
+                       <li class="interwiki-ur"><a href="//ur.wikipedia.org/wiki/%D8%AC%D8%A7%D9%84%D8%A8%DB%8C%D9%86" title="جالبین" lang="ur" hreflang="ur">اردو</a></li>
+                       <li class="interwiki-ug"><a href="//ug.wikipedia.org/wiki/%D8%AE%DB%95%D9%84%D9%82%D8%A7%D8%B1%D8%A7%D9%84%D9%89%D9%82_%D8%AA%D9%88%D8%B1" title="خەلقارالىق تور" lang="ug" hreflang="ug">ئۇيغۇرچە / Uyghurche</a></li>
+                       <li class="interwiki-vec"><a href="//vec.wikipedia.org/wiki/Internet" title="Internet" lang="vec" hreflang="vec">Vèneto</a></li>
+                       <li class="interwiki-vi"><a href="//vi.wikipedia.org/wiki/Internet" title="Internet" lang="vi" hreflang="vi">Tiếng Việt</a></li>
+                       <li class="interwiki-vo"><a href="//vo.wikipedia.org/wiki/V%C3%BCresod" title="Vüresod" lang="vo" hreflang="vo">Volapük</a></li>
+                       <li class="interwiki-fiu-vro"><a href="//fiu-vro.wikipedia.org/wiki/Internet" title="Internet" lang="fiu-vro" hreflang="fiu-vro">Võro</a></li>
+                       <li class="interwiki-wa"><a href="//wa.wikipedia.org/wiki/Etrernete" title="Etrernete" lang="wa" hreflang="wa">Walon</a></li>
+                       <li class="interwiki-vls"><a href="//vls.wikipedia.org/wiki/Internet" title="Internet" lang="vls" hreflang="vls">West-Vlams</a></li>
+                       <li class="interwiki-war"><a href="//war.wikipedia.org/wiki/Internet" title="Internet" lang="war" hreflang="war">Winaray</a></li>
+                       <li class="interwiki-wo"><a href="//wo.wikipedia.org/wiki/Internet" title="Internet" lang="wo" hreflang="wo">Wolof</a></li>
+                       <li class="interwiki-yi"><a href="//yi.wikipedia.org/wiki/%D7%90%D7%99%D7%A0%D7%98%D7%A2%D7%A8%D7%A0%D7%A2%D7%A5" title="אינטערנעץ" lang="yi" hreflang="yi">ייִדיש</a></li>
+                       <li class="interwiki-yo"><a href="//yo.wikipedia.org/wiki/Internet" title="Internet" lang="yo" hreflang="yo">Yorùbá</a></li>
+                       <li class="interwiki-zh-yue"><a href="//zh-yue.wikipedia.org/wiki/%E4%BA%92%E8%81%AF%E7%B6%B2" title="互聯網" lang="zh-yue" hreflang="zh-yue">粵語</a></li>
+                       <li class="interwiki-diq"><a href="//diq.wikipedia.org/wiki/%C4%B0nternet" title="İnternet" lang="diq" hreflang="diq">Zazaki</a></li>
+                       <li class="interwiki-bat-smg"><a href="//bat-smg.wikipedia.org/wiki/Internets" title="Internets" lang="bat-smg" hreflang="bat-smg">Žemaitėška</a></li>
+                       <li class="interwiki-zh"><a href="//zh.wikipedia.org/wiki/%E4%BA%92%E8%81%94%E7%BD%91" title="互联网" lang="zh" hreflang="zh">中文</a></li>
+               </ul>
+       </div>
+</div>
+
+<!-- /LANGUAGES -->
+                       </div>
+               <!-- /panel -->
+               <!-- footer -->
+               <div id="footer">
+                                                       <ul id="footer-info">
+                                                                                       <li id="footer-info-lastmod"> This page was last modified on 6 June 2012 at 16:40.<br /></li>
+                                                                                       <li id="footer-info-copyright">Text is available under the <a rel="license" href="//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons Attribution-ShareAlike License</a><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/" style="display:none;"></a>;
+additional terms may apply.
+See <a href="//wikimediafoundation.org/wiki/Terms_of_use">Terms of use</a> for details.<br/>
+Wikipedia&reg; is a registered trademark of the <a href="//www.wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.<br /></li><li class="noprint"><a class='internal' href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact us</a></li>
+                                                                       </ul>
+                                                       <ul id="footer-places">
+                                                                                       <li id="footer-places-privacy"><a href="//wikimediafoundation.org/wiki/Privacy_policy" title="wikimedia:Privacy policy">Privacy policy</a></li>
+                                                                                       <li id="footer-places-about"><a href="/wiki/Wikipedia:About" title="Wikipedia:About">About Wikipedia</a></li>
+                                                                                       <li id="footer-places-disclaimer"><a href="/wiki/Wikipedia:General_disclaimer" title="Wikipedia:General disclaimer">Disclaimers</a></li>
+                                                                                       <li id="footer-places-mobileview"><a href="http://en.m.wikipedia.org/w/index.php?title=Internet&amp;mobileaction=toggle_view_mobile" class="noprint">Mobile view</a></li>
+                                                                       </ul>
+                                                                               <ul id="footer-icons" class="noprint">
+                                       <li id="footer-copyrightico">
+                                               <a href="//wikimediafoundation.org/"><img src="//bits.wikimedia.org/images/wikimedia-button.png" width="88" height="31" alt="Wikimedia Foundation"/></a>
+                                       </li>
+                                       <li id="footer-poweredbyico">
+                                               <a href="//www.mediawiki.org/"><img src="//bits.wikimedia.org/static-1.20wmf4/skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" width="88" height="31" /></a>
+                                       </li>
+                               </ul>
+                                               <div style="clear:both"></div>
+               </div>
+               <!-- /footer -->
+               <script type="text/javascript">if(window.mw){
+mw.loader.state({"site":"loading","user":"ready","user.groups":"ready"});
+}</script>
+<script src="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=skins.vector&amp;only=scripts&amp;skin=vector&amp;*" type="text/javascript"></script>
+<script type="text/javascript">if(window.mw){
+mw.loader.load(["mediawiki.user","mediawiki.page.ready","mediawiki.legacy.mwsuggest","ext.gadget.teahouse","ext.vector.collapsibleNav","ext.vector.collapsibleTabs","ext.vector.editWarning","ext.vector.simpleSearch","ext.UserBuckets","ext.articleFeedback.startup","ext.markAsHelpful"], null, true);
+}</script>
+<script src="/w/index.php?title=Special:BannerController&amp;cache=/cn.js&amp;303-4" type="text/javascript"></script>
+<script src="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=site&amp;only=scripts&amp;skin=vector&amp;*" type="text/javascript"></script>
+<script src="//geoiplookup.wikimedia.org/" type="text/javascript"></script><!-- Served by mw21 in 0.185 secs. -->
+       </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_js_geolocation.html b/tizen_src/ewk/unittest/resources/common/sample_js_geolocation.html
new file mode 100755 (executable)
index 0000000..62ff62f
--- /dev/null
@@ -0,0 +1,46 @@
+<html>
+<head>
+<title>EWK Geolocation NORESULT</title>
+</head>
+<body onload="testGeolocation()">
+
+<h1>EWK Geolocation Sample</h1>
+<p>Website created to ewk_geolocation_permission_request_suspend method test purpose</p>
+
+<script type="text/javascript">
+// Geolocation successCallback
+function successCallback(position) {
+    document.title = "EWK Geolocation SUCCESS";
+}
+
+// Geolocation errorCallback
+function errorCallback(error) {
+    switch (error.code) {
+        case error.PERMISSION_DENIED:
+        document.title = "EWK Geolocation PERMISSION_DENIED";
+        break;
+    case error.POSITION_UNAVAILABLE:
+        document.title = "EWK Geolocation POSITION_UNAVAILABLE";
+        break;
+    case error.TIMEOUT:
+        document.title = "EWK Geolocation TIMEOUT";
+        break;
+    default:
+        document.title = "EWK Geolocation UNKNOWN_ERROR";
+        break;
+    }
+}
+
+// Get current geolocation position
+function testGeolocation()
+{
+    if (navigator.geolocation) {
+        navigator.geolocation.getCurrentPosition(successCallback, errorCallback);
+    } else {
+        document.title = "EWK Geolocation UNRESOLVED";
+    }
+}
+</script>
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_notification_1.html b/tizen_src/ewk/unittest/resources/common/sample_notification_1.html
new file mode 100755 (executable)
index 0000000..8ed3ed4
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+<head>
+<title>EWK Notifications</title>
+</head>
+<body onload="testNotifications()">
+
+<h1>Sample Page</h1>
+
+<p id="notificationTest">This is a sample page to test EWK Notification APIs.</p>
+
+<script type="text/javascript">
+       
+function testNotifications()
+{
+    if (window.webkitNotifications.checkPermission() == 0)
+    {
+        var icon  = 'logo.png';
+        var title = 'Notification Title';
+        var body   = 'Notification body content';
+
+        var notification_test = window.webkitNotifications.createNotification(icon, title, body);
+        notification_test.show();
+    }
+    else
+    {
+        window.webkitNotifications.requestPermission(testNotifications);
+    }
+}
+
+</script>
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_notification_2.html b/tizen_src/ewk/unittest/resources/common/sample_notification_2.html
new file mode 100755 (executable)
index 0000000..01a4598
--- /dev/null
@@ -0,0 +1,68 @@
+<html>
+<head>
+<title>EWK Notifications</title>
+</head>
+<body onload="testNoti()">
+
+<h1>Sample Page</h1>
+
+<p id="notificationTest">This is a sample page to test EWK Notification APIs.</p>
+
+<script type="text/javascript">
+       
+function testNotifications()
+{
+    if (window.webkitNotifications.checkPermission() == 0)
+    {
+        var icon  = 'logo.png';
+        var title = 'Notification Title';
+        var body   = 'Notification body content';
+
+        var notification_test = window.webkitNotifications.createNotification(icon, title, body);
+        notification_test.show();
+    }
+    else
+    {
+        window.webkitNotifications.requestPermission(testNotifications);
+    }
+}
+
+function sleep()
+{
+    var startTime = new Date().getTime();
+    while(new Date().getTime() < startTime + 5000)
+    {
+    
+    }
+
+}
+
+function testNotifications1()
+{
+    if (window.webkitNotifications.checkPermission() == 0)
+    {
+        var icon  = 'logo.png1';
+        var title = 'Notification Title1';
+        var body   = 'Notification body content1';
+
+        var notification_test = window.webkitNotifications.createNotification(icon, title, body);
+        notification_test.show();
+    }
+    else
+    {
+        window.webkitNotifications.requestPermission(testNotifications);
+    }
+}
+
+function testNoti()
+{
+   testNotifications();
+   sleep();
+   testNotifications1();
+    
+}
+
+</script>
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/common/sample_notification_3.html b/tizen_src/ewk/unittest/resources/common/sample_notification_3.html
new file mode 100644 (file)
index 0000000..b444fab
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+ <head>
+  <script>
+    function noti() {
+      window.webkitNotifications.requestPermission();
+      console.log("Notifications are supported!1");
+    }
+  </script>
+ </head>
+<body>
+  <input type="button" value="Open Window" onclick="noti()">
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context/WebDB2.html b/tizen_src/ewk/unittest/resources/ewk_context/WebDB2.html
new file mode 100644 (file)
index 0000000..09fa373
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html>
+<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
+<title>Web Database Test Page</title>
+<body>
+<h1>Web Database Test Page</h1>
+
+<div id="result"></div>
+
+<script type="text/javascript">
+    var db = window.openDatabase('cities111', '1.0', 'city stats', 1024);
+    window.onload = function () {
+        if (!window.openDatabase) {
+            document.getElementById("result").innerHTML = "Can't open database.";
+            return;
+        }
+        db.transaction(function (tx) {
+            tx.executeSql('create table if not exists cities (' + 'id integer primary key,' + 'name text,' + 'population integer' + ')', [], null, 
+                function (tx, err) {
+                    document.getElementById("result").innerHTML = "Error: " + err.message;
+                }
+            );
+        });
+    };
+</script>
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context/google-cert.pem b/tizen_src/ewk/unittest/resources/ewk_context/google-cert.pem
new file mode 100644 (file)
index 0000000..d93de9d
--- /dev/null
@@ -0,0 +1,81 @@
+-----BEGIN CERTIFICATE-----
+MIIGYjCCBUqgAwIBAgIIa5t/4YuSFtgwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
+BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
+cm5ldCBBdXRob3JpdHkgRzIwHhcNMTMwODI5MTIyMzMwWhcNMTQwODI5MTIyMzMw
+WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
+TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEVMBMGA1UEAwwMKi5n
+b29nbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUXoR2RQ2UqS9NF1X
+WKgtidVmVu9nPwlve1yusYNeCEXbCTGmvhRlrwlE0yLAMeZTsYC5uv0kKTU7luYl
+sNmPsaOCA/owggP2MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjCCAsMG
+A1UdEQSCArowggK2ggwqLmdvb2dsZS5jb22CDSouYW5kcm9pZC5jb22CFiouYXBw
+ZW5naW5lLmdvb2dsZS5jb22CEiouY2xvdWQuZ29vZ2xlLmNvbYIWKi5nb29nbGUt
+YW5hbHl0aWNzLmNvbYILKi5nb29nbGUuY2GCCyouZ29vZ2xlLmNsgg4qLmdvb2ds
+ZS5jby5pboIOKi5nb29nbGUuY28uanCCDiouZ29vZ2xlLmNvLnVrgg8qLmdvb2ds
+ZS5jb20uYXKCDyouZ29vZ2xlLmNvbS5hdYIPKi5nb29nbGUuY29tLmJygg8qLmdv
+b2dsZS5jb20uY2+CDyouZ29vZ2xlLmNvbS5teIIPKi5nb29nbGUuY29tLnRygg8q
+Lmdvb2dsZS5jb20udm6CCyouZ29vZ2xlLmRlggsqLmdvb2dsZS5lc4ILKi5nb29n
+bGUuZnKCCyouZ29vZ2xlLmh1ggsqLmdvb2dsZS5pdIILKi5nb29nbGUubmyCCyou
+Z29vZ2xlLnBsggsqLmdvb2dsZS5wdIIPKi5nb29nbGVhcGlzLmNughQqLmdvb2ds
+ZWNvbW1lcmNlLmNvbYINKi5nc3RhdGljLmNvbYIMKi51cmNoaW4uY29tghAqLnVy
+bC5nb29nbGUuY29tghYqLnlvdXR1YmUtbm9jb29raWUuY29tgg0qLnlvdXR1YmUu
+Y29tghYqLnlvdXR1YmVlZHVjYXRpb24uY29tggsqLnl0aW1nLmNvbYILYW5kcm9p
+ZC5jb22CBGcuY2+CBmdvby5nbIIUZ29vZ2xlLWFuYWx5dGljcy5jb22CCmdvb2ds
+ZS5jb22CEmdvb2dsZWNvbW1lcmNlLmNvbYIKdXJjaGluLmNvbYIIeW91dHUuYmWC
+C3lvdXR1YmUuY29tghR5b3V0dWJlZWR1Y2F0aW9uLmNvbTALBgNVHQ8EBAMCB4Aw
+aAYIKwYBBQUHAQEEXDBaMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2dsZS5j
+b20vR0lBRzIuY3J0MCsGCCsGAQUFBzABhh9odHRwOi8vY2xpZW50czEuZ29vZ2xl
+LmNvbS9vY3NwMB0GA1UdDgQWBBRzfSLtIdz9ULvX7yZ9bv49Ima3WzAMBgNVHRMB
+Af8EAjAAMB8GA1UdIwQYMBaAFErdBhYbvPZotXb1gba7Yhq6WoEvMBcGA1UdIAQQ
+MA4wDAYKKwYBBAHWeQIFATAwBgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vcGtpLmdv
+b2dsZS5jb20vR0lBRzIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQBegaIO7KSCCoV5
+5Acy+DHSZhXmPotTee2JdIYS0le8tyZMMI/+3no/OhDRRsBDwlSab8tCfm6hhH9z
+cC3IRLHZMZD6NWR+49gxZMYdqVqIDnm1ThAWxMb7fCeiLMzvhPcrNPNyvEC3Dl6U
+aOVaqKvp742+mTPVvs7WvYuqFCustD0zNVoce0pSvbei+SusNdDIntZ8iNIx5hro
+N5KzUK715/2fk4YfkyyuDsamOH+3RhFf6KyKlPCDiF/36/cmZYyf06fJuV553bgc
+ZvcEwytyNFodoCE/ewYqHzEGQBwsbeR01+O+44dh4clrpcTkWWcZaeTWOQNsnORn
+DgMxDFqj
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
+MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
+YWwgQ0EwHhcNMTMwNDA1MTUxNTU1WhcNMTUwNDA0MTUxNTU1WjBJMQswCQYDVQQG
+EwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzElMCMGA1UEAxMcR29vZ2xlIEludGVy
+bmV0IEF1dGhvcml0eSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AJwqBHdc2FCROgajguDYUEi8iT/xGXAaiEZ+4I/F8YnOIe5a/mENtzJEiaB0C1NP
+VaTOgmKV7utZX8bhBYASxF6UP7xbSDj0U/ck5vuR6RXEz/RTDfRK/J9U3n2+oGtv
+h8DQUB8oMANA2ghzUWx//zo8pzcGjr1LEQTrfSTe5vn8MXH7lNVg8y5Kr0LSy+rE
+ahqyzFPdFUuLH8gZYR/Nnag+YyuENWllhMgZxUYi+FOVvuOAShDGKuy6lyARxzmZ
+EASg8GF6lSWMTlJ14rbtCMoU/M4iarNOz0YDl5cDfsCx3nuvRTPPuj5xt970JSXC
+DTWJnZ37DhF5iR43xa+OcmkCAwEAAaOB+zCB+DAfBgNVHSMEGDAWgBTAephojYn7
+qwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUSt0GFhu89mi1dvWBtrtiGrpagS8wEgYD
+VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwOgYDVR0fBDMwMTAvoC2g
+K4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20vY3Jscy9ndGdsb2JhbC5jcmwwPQYI
+KwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwOi8vZ3RnbG9iYWwtb2NzcC5n
+ZW90cnVzdC5jb20wFwYDVR0gBBAwDjAMBgorBgEEAdZ5AgUBMA0GCSqGSIb3DQEB
+BQUAA4IBAQA21waAESetKhSbOHezI6B1WLuxfoNCunLaHtiONgaX4PCVOzf9G0JY
+/iLIa704XtE7JW4S615ndkZAkNoUyHgN7ZVm2o6Gb4ChulYylYbc3GrKBIxbf/a/
+zG+FA1jDaFETzf3I93k9mTXwVqO94FntT0QJo544evZG0R0SnU++0ED8Vf4GXjza
+HFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto
+WHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6
+yuGnBXj8ytqU0CwIPX4WecigUCAkVDNx
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
+MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
+YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
+R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
+9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
+fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
+iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
+1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
+MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
+ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
+uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
+Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
+tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
+PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
+hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
+5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
+-----END CERTIFICATE-----
diff --git a/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.c b/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.c
new file mode 100755 (executable)
index 0000000..7bc5e8c
--- /dev/null
@@ -0,0 +1,40 @@
+#include <WebKit2/WKBundle.h>
+#include <WebKit2/WKBundleInitialize.h>
+#include <WebKit2/WKBundlePage.h>
+#include <WebKit2/WKURLRequest.h>
+
+static WKBundleRef globalBundle;
+
+static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef page, WKBundleFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, WKURLResponseRef redirectResponse, const void *clientInfo)
+{
+}
+
+static void didCreatePage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo)
+{
+    WKBundlePageResourceLoadClient resourceLoadClient;
+    memset(&resourceLoadClient, 0, sizeof(resourceLoadClient));
+    resourceLoadClient.version = kWKBundlePageResourceLoadClientCurrentVersion;
+    //resourceLoadClient.willSendRequestForFrame = willSendRequestForFrame;
+
+    WKBundlePageSetResourceLoadClient(page, &resourceLoadClient);
+}
+
+static void didRecieveMessage(WKBundleRef bundle, WKStringRef name, WKTypeRef messageBody, const void* clientInfo)
+{
+    WKBundlePostSynchronousMessage(bundle, name, messageBody, 0);
+}
+
+void WKBundleInitialize(WKBundleRef bundle, WKTypeRef initializationUserData)
+{
+    globalBundle = bundle;
+
+    WKBundleClient client = {
+        kWKBundleClientCurrentVersion,
+        0,
+        didCreatePage,
+        0, /* willDestroyPage */
+        0, /* didInitializePageGroup */
+        didRecieveMessage,
+    };
+    WKBundleSetClient(bundle, &client);
+}
diff --git a/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.so b/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.so
new file mode 100755 (executable)
index 0000000..9306bf4
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_context/injected_bundle/bundle_sample.so differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_icon_database/favicon2.html b/tizen_src/ewk/unittest/resources/ewk_context_icon_database/favicon2.html
new file mode 100644 (file)
index 0000000..368bf01
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+<head>
+  <link rel="shortcut icon" type="image/bmp" href="tizen-icon.bmp" />
+</head>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_icon_database/tizen-icon.bmp b/tizen_src/ewk/unittest/resources/ewk_context_icon_database/tizen-icon.bmp
new file mode 100644 (file)
index 0000000..b4e0a75
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_context_icon_database/tizen-icon.bmp differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_local_file_system/sample_context_local_file_system_read.html b/tizen_src/ewk/unittest/resources/ewk_context_local_file_system/sample_context_local_file_system_read.html
new file mode 100644 (file)
index 0000000..4880ead
--- /dev/null
@@ -0,0 +1,34 @@
+<html>
+  <head>
+    <title>Sample for ewk_context_local_file_system_* apis</title>
+  </head>
+  <script>
+      window.requestFileSystem  = window.requestFileSystem || window.webkitRequestFileSystem;
+
+      function errorHandler(e) {
+          document.title = "file_not_found";
+      }
+
+      function onFsInit(fs) {
+          fs.root.getFile('./local_file_system_sample.txt', {create: false}, function(fileEntry) {
+              fileEntry.file(function(file) {
+                  var reader = new FileReader();
+
+                  reader.onloadend = function(e) {
+                      document.title = this.result;
+                  };
+
+                  reader.readAsText(file);
+              }, errorHandler);
+
+          }, errorHandler);
+      }
+
+      function f(){
+          window.requestFileSystem(TEMPORARY, 1024*1024, onFsInit, errorHandler);
+      }
+  </script>
+  <body onload="f();">
+    <h2>Sample for ewk_context_local_file_system_* apis</h2>
+  </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_local_file_system/sample_context_local_file_system_write.html b/tizen_src/ewk/unittest/resources/ewk_context_local_file_system/sample_context_local_file_system_write.html
new file mode 100644 (file)
index 0000000..9d89206
--- /dev/null
@@ -0,0 +1,45 @@
+<html>
+<head>
+  <title>Sample for ewk_context_local_file_system_* apis</title>
+</head>
+<script>
+  window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
+
+  var fs = null;
+
+  function errorHandler(e) {
+    console.log('[JS]: ' + e.name + " : " + e.message);
+    document.title = 'FAILURE';
+  }
+
+  function createFile(fs) {
+    console.log('createFile()');
+    fs.root.getFile('testFile.txt', {create: true, exclusive: false}, function(fileEntry) {
+      fileEntry.createWriter(function(fileWriter) {
+
+        fileWriter.onwriteend = function(e) {
+          console.log('Write completed.');
+          document.title = 'SUCCESS';
+        };
+
+        fileWriter.onerror = function(e) {
+          console.log('Write failed: ' + e.toString());
+          document.title = 'FAILURE';
+        };
+
+        var blob = new Blob(['EFL is great!'], { type: 'text/plain' });
+        fileWriter.write(blob);
+      }, errorHandler);
+
+    }, errorHandler);
+  }
+
+  function initFS() {
+    console.log('initFS()');
+    window.requestFileSystem(window.TEMPORARY, 1024*1024, createFile, errorHandler);
+  }
+</script>
+<body onload="initFS();">
+  <h2>Sample for ewk_context_local_file_system_* apis</h2>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_menu/index.html b/tizen_src/ewk/unittest/resources/ewk_context_menu/index.html
new file mode 100644 (file)
index 0000000..6b5810f
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Context Menu Page</title>
+<body>
+<h1>Context Menu Page</h1>
+  <a href="http://www.webkit.org" id="foo" >
+    <img src="webkit.png" width="200" height="200" alt="Context Menu Image Link Item" border=2/>
+  </a>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_menu/index_1.html b/tizen_src/ewk/unittest/resources/ewk_context_menu/index_1.html
new file mode 100644 (file)
index 0000000..1d9c5c3
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Context Menu Page</title>
+<body>
+<h1>Context Menu Page</h1>
+  <a href="webkit.png" id="foo" >
+    <img src="webkit.png" width="200" height="200" alt="Context Menu Image Link Item" border=2/>
+  </a>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_menu/webkit.png b/tizen_src/ewk/unittest/resources/ewk_context_menu/webkit.png
new file mode 100755 (executable)
index 0000000..ac36b6f
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_context_menu/webkit.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_vibration/vibration.html b/tizen_src/ewk/unittest/resources/ewk_context_vibration/vibration.html
new file mode 100644 (file)
index 0000000..8c2d891
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+  <head>
+  </head>
+  <body>
+    <script>
+        navigator.vibrate(1000);
+        window.setTimeout(function(){navigator.vibrate(500)},100);
+        window.setTimeout(function(){document.title="FINISH"},500);
+    </script>
+  </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_web_indexed_database/CreateDB.html b/tizen_src/ewk/unittest/resources/ewk_context_web_indexed_database/CreateDB.html
new file mode 100644 (file)
index 0000000..404237b
--- /dev/null
@@ -0,0 +1,24 @@
+<html>
+  <head>
+    <title>Indexed Database Create</title>
+    <script type="text/javascript">
+    function setTitle(title) {
+      document.title = title;
+    }
+
+    function open() {
+      var request = indexedDB.open('test_db', 1);
+      request.onsuccess = function(e) {
+        setTitle('success');
+      };
+      request.onerror = function() {
+        setTitle('error');
+      };
+    };
+    open();
+    </script>
+  </head>
+  <body>
+    Creation of indexed database
+  </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_web_indexed_database/DBExists.html b/tizen_src/ewk/unittest/resources/ewk_context_web_indexed_database/DBExists.html
new file mode 100644 (file)
index 0000000..1c0f3be
--- /dev/null
@@ -0,0 +1,21 @@
+<html>
+  <head>
+    <script type="text/javascript">
+    function setTitle(title) {
+      document.title = title;
+    }
+
+    var request = indexedDB.open('test_db', 1);
+    request.onupgradeneeded = function (e){
+      e.target.transaction.abort();
+      setTitle('error');
+    }
+    request.onsuccess = function(e) {
+      setTitle('success');
+    };
+    </script>
+  </head>
+  <body>
+    Creation of indexed database
+  </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_web_storage/webStorageGet.html b/tizen_src/ewk/unittest/resources/ewk_context_web_storage/webStorageGet.html
new file mode 100755 (executable)
index 0000000..53d2692
--- /dev/null
@@ -0,0 +1,18 @@
+<html>
+<head>
+<script>
+function titleChanged() {
+  // Retrieve item "StorageTest" value and set document title
+  if (localStorage.getItem("StorageTest") == null) {
+        document.title = "EMPTY";
+  } else {
+        document.title=localStorage.getItem("StorageTest");
+  }
+}
+</script>
+</head>
+<body onload="titleChanged();">
+
+</body>
+</html>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_web_storage/webStorageSet.html b/tizen_src/ewk/unittest/resources/ewk_context_web_storage/webStorageSet.html
new file mode 100755 (executable)
index 0000000..685824e
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+<head>
+<script>
+function changeTitle() {
+  // Set item "StorageTest" 
+  localStorage.setItem("StorageTest", "STORAGE_TEST_VALUE");
+
+  // Change document title
+  document.title="Title changed";
+}
+</script>
+</head>
+
+<body onload="changeTitle();">
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_context_web_storage/web_storage_create_simple.html b/tizen_src/ewk/unittest/resources/ewk_context_web_storage/web_storage_create_simple.html
new file mode 100644 (file)
index 0000000..b504519
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<div id="result"></div>
+
+<script>
+  // Check browser support
+  if (typeof(Storage) != "undefined")
+  {
+    // Store
+    localStorage.setItem("test-value", "Smith");
+  }
+  else
+  {
+    document.getElementById("result").innerHTML="Sorry, your browser does not support Web Storage...";
+  }
+
+</script>
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_custom_handlers/registerContentHandler.html b/tizen_src/ewk/unittest/resources/ewk_custom_handlers/registerContentHandler.html
new file mode 100755 (executable)
index 0000000..bae0f8f
--- /dev/null
@@ -0,0 +1,53 @@
+<html>
+<body>
+<p>This test makes sure that navigator.registerContentHandler throws the proper exceptions and has no-op default implementation.</p>
+<pre id="console"></pre>
+<script>
+       function debug(str) {
+           var c = document.getElementById('console');
+           c.appendChild(document.createTextNode(str + '\n'));
+       };
+
+       // Test availability of the registerContentHandler API
+       if(window.navigator.registerContentHandler) {
+           debug('Pass: window.navigator.registerContentHandler is defined.')
+       } else {
+           debug('Fail: window.navigator.registerContentHandler is not defined.')
+       };
+
+       // Test that the API regects secured protocols.
+       var invalid_protocols = ['text/html', 'text/css', 'application/x-javascript'];
+       invalid_protocols.forEach(function(protocol) {
+           try {
+        window.navigator.registerContentHandler(protocol, "invalid protocol %s", "title");
+               debug('Fail: Invalid protocol "' + protocol + '" allowed.');
+           } catch(e) {
+               if('SECURITY_ERR' == e.name) {
+                   debug('Pass: Invalid protocol "' + protocol + '" threw SECURITY_ERR exception.');
+               }
+           };
+       });
+
+       // Test that the API correctly parses the url for '%s'
+       var invalid_urls = ["", "%S"]
+       invalid_urls.forEach(function(url) {
+           try {
+               window.navigator.registerContentHandler('myprotocol', url, 'title');
+               debug('Fail: Invalid url "' + url + '" allowed.');
+           } catch(e) {
+               if('SYNTAX_ERR' == e.name) {
+                   debug('Pass: Invalid url "' + url + '" threw SYNTAX_ERR exception.');
+               }
+           };
+       });
+
+       // Test that the API has default no-op implementation.
+       try {
+           window.navigator.registerContentHandler('myprotocol', "%s", "title");
+           debug('Pass: Valid call succeeded.');
+       } catch(e) {
+           debug('Fail: Valid call did not succeed.');
+       };
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_form_data/index.html b/tizen_src/ewk/unittest/resources/ewk_form_data/index.html
new file mode 100755 (executable)
index 0000000..9ae458b
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Form Submit Test Page</title>
+<body onload ="myfunc()">
+<h1>Form Submit Test Page</h1>
+<form name="input" action="http://www.webkit.org" method="get" id="foo">
+Username: <input type="text" name="user" />
+<input type="submit" value="Submit" />
+</form>
+<script type="text/javascript">
+function myfunc() {
+var frm=document.getElementById("foo");
+frm.submit();
+}
+</script>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_frame/iframetest.html b/tizen_src/ewk/unittest/resources/ewk_frame/iframetest.html
new file mode 100644 (file)
index 0000000..0b113af
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<title>Iframe test</title>
+<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
+</head>
+<body>
+<h1>Iframe test</h1>
+<iframe src="iframetest2.html"></iframe>
+</body></html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_frame/iframetest2.html b/tizen_src/ewk/unittest/resources/ewk_frame/iframetest2.html
new file mode 100644 (file)
index 0000000..e21cf81
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=GB2312">
+<title>iframe test</title>
+</head>
+<body>
+<h1>Test page in iframe</h1>
+</body></html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_history/page1.html b/tizen_src/ewk/unittest/resources/ewk_history/page1.html
new file mode 100644 (file)
index 0000000..dad049d
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+<head>
+  <title>Page1</title>
+</head>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_history/page2.html b/tizen_src/ewk/unittest/resources/ewk_history/page2.html
new file mode 100644 (file)
index 0000000..32a3f0e
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+<head>
+  <title>Page2</title>
+</head>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_history/page3.html b/tizen_src/ewk/unittest/resources/ewk_history/page3.html
new file mode 100644 (file)
index 0000000..eefeb03
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+<head>
+  <title>Page3</title>
+</head>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_hit_test/index.html b/tizen_src/ewk/unittest/resources/ewk_hit_test/index.html
new file mode 100755 (executable)
index 0000000..244c35b
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Hit Test Page</title>
+<body>
+<h1>Hit Test Page</h1>
+<a href="http://www.webkit.org" id="foo" >
+   <img src="webkit.png" width="200" height="200" alt="image hit test" border=2/>
+</a>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_hit_test/index_img.html b/tizen_src/ewk/unittest/resources/ewk_hit_test/index_img.html
new file mode 100755 (executable)
index 0000000..43fa281
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Hit Test Page</title>
+<body>
+<h1>Hit Test Page</h1>
+<img src="webkit.png" width="200" height="200" alt="image hit test" id="foo" onload="loadUrl()" />
+
+<script type="text/javascript">
+   function loadUrl() {
+      this.document.location.href= "http://www.webkit.org";
+   }
+</script>
+
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_hit_test/webkit.png b/tizen_src/ewk/unittest/resources/ewk_hit_test/webkit.png
new file mode 100755 (executable)
index 0000000..ac36b6f
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_hit_test/webkit.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_policy_decision/iframe.html b/tizen_src/ewk/unittest/resources/ewk_policy_decision/iframe.html
new file mode 100644 (file)
index 0000000..21c936a
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<title>Iframe test</title>
+<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
+</head>
+<body>
+<h1>Iframe test</h1>
+<iframe src="http://www.google.pl"></iframe>
+</body></html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_policy_decision/mainframe_newwindow.html b/tizen_src/ewk/unittest/resources/ewk_policy_decision/mainframe_newwindow.html
new file mode 100644 (file)
index 0000000..176ccf4
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html><head>
+<title>Iframe test</title>
+<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
+</head>
+<body onload="window.open('http://www.google.com');">
+<h1>Main Frame New Window Policy Decision</h1>
+<iframe src="subframe_newwindow.html"></iframe>
+</body></html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_policy_decision/subframe_newwindow.html b/tizen_src/ewk/unittest/resources/ewk_policy_decision/subframe_newwindow.html
new file mode 100644 (file)
index 0000000..35952ad
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html><head>
+<title>Iframe test</title>
+<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
+</head>
+<body onload="window.open('http://www.google.com');">
+<h1>Sub Frame New Window Policy Decision</h1>
+</body></html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_user_media_permission/index.html b/tizen_src/ewk/unittest/resources/ewk_user_media_permission/index.html
new file mode 100644 (file)
index 0000000..e4c4f56
--- /dev/null
@@ -0,0 +1,62 @@
+<article>
+<style scoped>
+       video { -webkit-transform: scaleX(1); }
+       p { text-align: center; }
+</style>
+<h1>Webkit WebRTC Video Element Demo</h1>
+<section id="splash">
+       <p id="errorMessage">Loading...</p>
+</section>
+<section id="app" hidden>
+       <p><video id="monitor" autoplay></video> <canvas id="photo"></canvas></p>
+       <p><input value="say cheese!" type=button value="&#x1F4F7;" onclick="snapshot()">
+</section>
+
+<script>
+
+if (navigator.webkitGetUserMedia) {
+
+       var video = document.getElementById('monitor');
+       var canvas = document.getElementById('photo');
+
+       navigator.webkitGetUserMedia({audio:true, video:true}, gotStream, noStream);
+
+       function gotStream(stream) {
+
+               video.src = webkitURL.createObjectURL(stream);
+        video.muted = true;
+               video.onerror = function () {
+                       stream.stop();
+                       streamError();
+               };
+               document.getElementById('splash').hidden = true;
+               document.getElementById('app').hidden = false;
+       }
+
+       function noStream() {
+               document.getElementById('errorMessage').textContent = 'No camera available.';
+       }
+
+       function streamError() {
+               document.getElementById('errorMessage').textContent = 'Camera error.';
+       }
+
+       function snapshot() {
+               canvas.width = video.videoWidth;
+               canvas.height = video.videoHeight;
+               canvas.getContext('2d').drawImage(video, 0, 0);
+       }
+
+} else {
+       document.getElementById('errorMessage').textContent = 'No native camera support available.';
+}
+</script>
+
+<br><br>
+<p>
+<i>Note: Requires dev channel or canary channel Google Chrome at the moment.<br>You must also launch said Chromes with the <b>--enable-media-stream</b> flag.<br>On a mac, open a terminal and do this to launch Chrome Canary:</i><br>
+<br>
+<b>open -a Google\ Chrome\ Canary --args --enable-media-stream</b>
+
+</article>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/alert_test.html b/tizen_src/ewk/unittest/resources/ewk_view/alert_test.html
new file mode 100755 (executable)
index 0000000..34bc00e
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>JavaScript Alert Test</title>
+        <script language="javascript">
+            alert("Alert Test")
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/canvas.html b/tizen_src/ewk/unittest/resources/ewk_view/canvas.html
new file mode 100644 (file)
index 0000000..439f72b
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+    <head><title>Canvas</title></head>
+    <body onload="document.getElementById('c').getContext('2d').drawImage(document.getElementById('i'),0,0)">
+    <canvas id="c" /><hr />
+    <img id="i" src="icon.png" />
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/confirm_test.html b/tizen_src/ewk/unittest/resources/ewk_view/confirm_test.html
new file mode 100755 (executable)
index 0000000..22cc8f3
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+    <head>
+    <title>JavaScrip Confirm Test</title>
+    <script language="javascript">
+        var outdata = confirm("Press a button!")
+        if (outdata == true) {
+            document.write("You pressed OK!");
+            document.title = "You pressed OK!";
+        } else {
+            document.write("You pressed Cancel!");
+            document.title = "You pressed Cancel!";
+        }
+    </script>
+    </head>
+    <body>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/console_debug.html b/tizen_src/ewk/unittest/resources/ewk_view/console_debug.html
new file mode 100755 (executable)
index 0000000..06e5f89
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>Console Message Test</title>
+        <script language="javascript">
+            console.debug("Debug Message")
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/console_error.html b/tizen_src/ewk/unittest/resources/ewk_view/console_error.html
new file mode 100755 (executable)
index 0000000..9750aef
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>Console Message Test</title>
+        <script language="javascript">
+            console.error("Error Message")
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/console_info.html b/tizen_src/ewk/unittest/resources/ewk_view/console_info.html
new file mode 100755 (executable)
index 0000000..37bc6cb
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>Console Message Test</title>
+        <script language="javascript">
+            console.info('info');
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/console_log.html b/tizen_src/ewk/unittest/resources/ewk_view/console_log.html
new file mode 100755 (executable)
index 0000000..f60e62a
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>Console Message Test</title>
+        <script language="javascript">
+            console.log("Log Message")
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/console_warn.html b/tizen_src/ewk/unittest/resources/ewk_view/console_warn.html
new file mode 100755 (executable)
index 0000000..4a4ef64
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>Console Message Test</title>
+        <script language="javascript">
+            console.warn("Warning Message")
+        </script>
+    </head>
+    <body>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/edge_test_bottom.html b/tizen_src/ewk/unittest/resources/ewk_view/edge_test_bottom.html
new file mode 100644 (file)
index 0000000..1359470
--- /dev/null
@@ -0,0 +1,31 @@
+<html>
+<head>
+<title>Test file</title>
+</head>
+<body onload="setTimeout('window.scrollTo(0,document.body.scrollHeight);',500);">
+<div id="bodyDiv" style="solid black;background-color:lightblue;"></div>
+<h1>Sample HTML</h1>
+<p>This is sample html page to be used for testing Edge and Scroll Notifications.</p>
+<span style="white-space:nowrap;">
+SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL
+</span>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<div id="middle">Middle</div>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+Bottom
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/edge_test_left.html b/tizen_src/ewk/unittest/resources/ewk_view/edge_test_left.html
new file mode 100644 (file)
index 0000000..6ae0804
--- /dev/null
@@ -0,0 +1,39 @@
+<!--
+This test file is common file and can be used for testing EWK Edge and Scroll notifications
+-->
+<head>
+<title>Test file</title>
+<script type="text/javascript">
+function pageScroll2() {
+window.scrollBy(-10,0);
+setTimeout('pageScroll2()',500);
+}
+</script>
+</head>
+<body onload="window.scrollBy(30,0); pageScroll2();">
+<div id="bodyDiv" style="solid black;background-color:lightblue;"></div>
+<h1>Sample HTML</h1>
+<p>This is sample html page to be used for testing Edge and Scroll Notifications.</p>
+<span style="white-space:nowrap;">
+SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL
+</span>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<div id="middle">Middle</div>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+Bottom
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/edge_test_right.html b/tizen_src/ewk/unittest/resources/ewk_view/edge_test_right.html
new file mode 100644 (file)
index 0000000..215a5e2
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+This test file is common file and can be used for testing EWK Edge and Scroll notifications
+-->
+<html>
+<head>
+<title>Test file</title>
+</head>
+<body onload="setTimeout('window.scrollTo(document.body.scrollWidth,0);',500);">
+<div id="bodyDiv" style="solid black;background-color:lightblue;"></div>
+<h1>Sample HTML</h1>
+<p>This is sample html page to be used for testing Edge and Scroll Notifications.</p>
+<span style="white-space:nowrap;">
+SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL
+</span>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<div id="middle">Middle</div>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+Bottom
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/edge_test_top.html b/tizen_src/ewk/unittest/resources/ewk_view/edge_test_top.html
new file mode 100644 (file)
index 0000000..1d67a62
--- /dev/null
@@ -0,0 +1,39 @@
+<!--
+This test file is common file and can be used for testing EWK Edge and Scroll notifications
+-->
+<head>
+<title>Test file</title>
+<script type="text/javascript">
+function pageScroll2() {
+window.scrollBy(0,-10);
+setTimeout('pageScroll2()',500);
+}
+</script>
+</head>
+<body onload="window.scrollBy(0,30); pageScroll2();">
+<div id="bodyDiv" style="solid black;background-color:lightblue;"></div>
+<h1>Sample HTML</h1>
+<p>This is sample html page to be used for testing Edge and Scroll Notifications.</p>
+<span style="white-space:nowrap;">
+SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL
+</span>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<div id="middle">Middle</div>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+Bottom
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/exceeded_database_quota_test.html b/tizen_src/ewk/unittest/resources/ewk_view/exceeded_database_quota_test.html
new file mode 100644 (file)
index 0000000..b495a37
--- /dev/null
@@ -0,0 +1,19 @@
+<html>
+  <head>
+    <script>
+      function createDb() {
+          var time = (new Date()).getTime();
+          db = openDatabase('test_db' + time, '1.0', 'test database', 6 * 1024 * 1024);
+          if (db) {
+              document.title = 'Test';
+          }
+          db.transaction(function(tx) {
+              tx.executeSql('CREATE TABLE tbl(id INTEGER)');
+              tx.executeSql('INSERT INTO tbl(id) VALUES(1)');
+          });
+      }
+    </script>
+  </head>
+  <body onload="createDb()">
+  </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/exceeded_local_file_system_quota.html b/tizen_src/ewk/unittest/resources/ewk_view/exceeded_local_file_system_quota.html
new file mode 100644 (file)
index 0000000..cb6baed
--- /dev/null
@@ -0,0 +1,43 @@
+<html>
+  <head>
+  <script>
+    window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
+    var stringTable = "c";
+    var limit = 1024 * 1024 * 32
+    while(stringTable.length < limit)
+        stringTable = stringTable.concat(stringTable)
+
+    function perform(iteration) {
+        document.title = "";
+        function errorHandler(e) {
+            document.title = "FAIL";
+        }
+
+        function onFsInit(fs) {
+            function onFileWriter(fileWriter) {
+                fileWriter.onwrite = function(e) {
+                    document.title = "OK";
+                    perform(++iteration)
+                }
+
+                fileWriter.onerror = errorHandler
+
+                var blobObject = new Blob([stringTable], {type : 'text/plain'});
+
+                fileWriter.write(blobObject);
+            }
+
+            fs.root.getFile('local_file_system_sample' + iteration + '.txt', {create: true}, function(fileEntry) {
+                fileEntry.createWriter(onFileWriter, errorHandler)
+            }, errorHandler);
+        }
+
+        window.requestFileSystem(window.PERSISTENT, 10, onFsInit, errorHandler)
+    }
+  </script>
+  </head>
+  <body onload="perform(0)">
+    <h2>Sample for ewk_view_exceeded_local_file_system_quota* apis</h2>
+  </body>
+</html>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/fullscreen.html b/tizen_src/ewk/unittest/resources/ewk_view/fullscreen.html
new file mode 100644 (file)
index 0000000..e865895
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+    <head>
+        <title>FullScreen</title>
+    </head>
+    <body>
+    <video controls id="video">
+      <source src="http://www.youtube.com/watch?v=2SKx3sh4RzA"></source>
+    </video>    </body>
+    <script>
+    console.debug("Normal->maximize");
+    var elem = document.getElementById("video");
+    if (elem.requestFullscreen) {
+      elem.requestFullscreen();
+    }
+    console.debug("normal->Maximize");
+    </script>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/icon.png b/tizen_src/ewk/unittest/resources/ewk_view/icon.png
new file mode 100755 (executable)
index 0000000..ac36b6f
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_view/icon.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/index_big_red_square.html b/tizen_src/ewk/unittest/resources/ewk_view/index_big_red_square.html
new file mode 100755 (executable)
index 0000000..273023e
--- /dev/null
@@ -0,0 +1,203 @@
+<table bgcolor=red>
+<tr><td width=9999>
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+</td></tr></table>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/open_panel_test.html b/tizen_src/ewk/unittest/resources/ewk_view/open_panel_test.html
new file mode 100755 (executable)
index 0000000..ed55d82
--- /dev/null
@@ -0,0 +1,24 @@
+<html>
+    <head>
+        <script language="javascript">
+        function perform() {
+            var file_chooser = document.getElementById("file_chooser");
+            file_chooser.click();
+        }
+        </script>
+        <style>
+        #clickable_area {
+            position: absolute;
+            top: 0px;
+            left: 0px;
+            width: 1000px;
+            height: 1000px;
+            background: #F00;
+        };
+        </style>
+    </head>
+    <body>
+        <input id="file_chooser" type="file"/>
+        <div id="clickable_area" onclick="perform()" />
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/orientation_test.html b/tizen_src/ewk/unittest/resources/ewk_view/orientation_test.html
new file mode 100755 (executable)
index 0000000..f609318
--- /dev/null
@@ -0,0 +1,19 @@
+<html>
+    <head>
+        <title>Orientation Test</title>
+        <script type="text/javascript">
+            function onLoad() { 
+              window.addEventListener("orientationchange", updateOrientation);
+            } 
+
+            function updateOrientation()
+            {
+              console.log(window.orientation);
+              alert(window.orientation);
+            }
+        </script>
+    </head>
+    <body onload="onLoad();">
+    <h1>Orientation Test Page</h1>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/orientation_test1.html b/tizen_src/ewk/unittest/resources/ewk_view/orientation_test1.html
new file mode 100755 (executable)
index 0000000..28fda0e
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+    <head>
+        <title>Orientation Test</title>
+        <script type="text/javascript">
+            window.onload=orientationchange;
+            function orientationchange()
+            {
+               alert("-90");
+            }
+        </script>
+    </head>
+    <body>
+    <h1>Orientation Test Page</h1>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/orientation_test2.html b/tizen_src/ewk/unittest/resources/ewk_view/orientation_test2.html
new file mode 100755 (executable)
index 0000000..940c8ea
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+    <head>
+        <title>Orientation Test</title>
+        <script type="text/javascript">
+            window.onload=orientationchange;
+            function orientationchange()
+            {
+               alert("0");
+            }
+        </script>
+    </head>
+    <body>
+    <h1>Orientation Test Page</h1>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/orientation_test3.html b/tizen_src/ewk/unittest/resources/ewk_view/orientation_test3.html
new file mode 100755 (executable)
index 0000000..28cd702
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+    <head>
+        <title>Orientation Test</title>
+        <script type="text/javascript">
+            window.onload=orientationchange;
+            function orientationchange()
+            {
+               alert("180");
+            }
+        </script>
+    </head>
+    <body>
+    <h1>Orientation Test Page</h1>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/page_save_test.html b/tizen_src/ewk/unittest/resources/ewk_view/page_save_test.html
new file mode 100644 (file)
index 0000000..073493c
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+    <head>
+        <title>
+            Test-page
+        </title>
+        <script>
+            function formSubmit()
+            {
+                document.getElementById("frm1").submit();
+            }
+        </script>
+    </head>
+    <body>
+        <form id="frm1">
+First Name : 
+<input type="text" id="fNameID" name ="fName" ></input>
+<br>
+Last Name : 
+<input type="text" name = "lName"></input>
+<br>
+Age : 
+<input type="number" name="age"></input>
+<br>
+Email Id :
+<input type="email" name="emailId"></input>
+<br>
+WebSite :
+<input type="url" name="website"></input>
+<br>
+<input type="submit" onclick = "formSubmit()"/>
+</form>
+</body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/prompt_test.html b/tizen_src/ewk/unittest/resources/ewk_view/prompt_test.html
new file mode 100755 (executable)
index 0000000..490349e
--- /dev/null
@@ -0,0 +1,12 @@
+<html>
+    <head>
+    <title>JavaScrip Prompt Test</title>
+    <script language="javascript">
+        var outdata = prompt("How old are you?", "input")
+         if (outdata >= 20) document.write("Adult")
+         else document.write("not Adult")
+    </script>
+    </head>
+    <body>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/quota_ask.html b/tizen_src/ewk/unittest/resources/ewk_view/quota_ask.html
new file mode 100644 (file)
index 0000000..7c84f39
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<title>No reply yet</title>
+</head>
+<body>
+<script>
+
+function successCB(amount)
+{
+  console.debug("success");
+  document.title = "" + amount
+}
+
+function errorCB(e)
+{
+  console.debug("error");
+  document.title = "" + e
+}
+navigator.webkitPersistentStorage.requestQuota(10000, successCB, errorCB);
+
+</script>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/redirect.html b/tizen_src/ewk/unittest/resources/ewk_view/redirect.html
new file mode 100644 (file)
index 0000000..d987129
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+    <head>
+        <title>Redirect</title>
+        <meta http-equiv="refresh" content="1;url=../common/sample.html">
+    </head>
+    <body>
+        Redirecting to ../common/sample.html
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/sample_content_security_policy.html b/tizen_src/ewk/unittest/resources/ewk_view/sample_content_security_policy.html
new file mode 100644 (file)
index 0000000..fdbcb8e
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+    <head>
+        <meta http-equiv="pragma" content="no-cache">
+        <title>PASS</title>
+    </head>
+    <script type="text/javascript">
+        function tryExec(){
+            document.title = "FAIL";
+        }
+    </script>
+    <body onload="tryExec();">
+        <h1>Content Security Policy test</h1>
+        <p>Title text content should be set to 'PASS' if csp works.</p>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/scroll_test_right_left.html b/tizen_src/ewk/unittest/resources/ewk_view/scroll_test_right_left.html
new file mode 100644 (file)
index 0000000..0a4cc41
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+This test file is common file and can be used for testing EWK Edge and Scroll notifications
+-->
+<head>
+<title>Test file</title>
+<script>
+var i = 0;
+function pageScroll1() {
+i++;
+window.scrollBy(50,0);
+if (i==3)
+pageScroll2();
+else
+setTimeout('pageScroll1()',500);
+}
+function pageScroll2() {
+window.scrollBy(-50,0);
+setTimeout('pageScroll2()',500);
+}
+</script>
+</head>
+<body onload="pageScroll1();">
+<div id="bodyDiv" style="solid black;background-color:lightblue;"></div>
+<h1>Sample HTML</h1>
+<p>This is sample html page to be used for testing Edge and Scroll Notifications.</p>
+<span style="white-space:nowrap;">
+SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL
+</span>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<div id="middle">Middle</div>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+Bottom
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/scroll_test_up_down.html b/tizen_src/ewk/unittest/resources/ewk_view/scroll_test_up_down.html
new file mode 100644 (file)
index 0000000..bee22bd
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+This test file is common file and can be used for testing EWK Edge and Scroll notifications
+-->
+<head>
+<title>Test file</title>
+<script>
+var i = 0;
+function pageScroll1() {
+i++;
+window.scrollBy(0,50);
+if (i==3)
+pageScroll2();
+else
+setTimeout('pageScroll1()',500);
+}
+function pageScroll2() {
+window.scrollBy(0,-50);
+setTimeout('pageScroll2()',500);
+}
+</script>
+</head>
+<body onload="pageScroll1();">
+<div id="bodyDiv" style="solid black;background-color:lightblue;"></div>
+<h1>Sample HTML</h1>
+<p>This is sample html page to be used for testing Edge and Scroll Notifications.</p>
+<span style="white-space:nowrap;">
+SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLLSCROLL SCROLL SCROLL SCROLL SCROLL
+</span>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<div id="middle">Middle</div>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+Bottom
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/text_selection_get.html b/tizen_src/ewk/unittest/resources/ewk_view/text_selection_get.html
new file mode 100644 (file)
index 0000000..ebd8b4e
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+  <head>
+    <script>
+    window.onload = function(){
+    var text_area = document.getElementById('txtarea');
+    text_area.focus();
+    text_area.select();}
+    </script>
+  </head>
+  <body>
+    <textarea id='txtarea'>select text</textarea>
+  </body>
+</html>;
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/undo_redo.html b/tizen_src/ewk/unittest/resources/ewk_view/undo_redo.html
new file mode 100644 (file)
index 0000000..41e5f56
--- /dev/null
@@ -0,0 +1,4 @@
+<html><head><title>Undo Redo</title></head>
+<body onload="document.getElementById('e').focus()";>
+<form><input id="e" value="0" /></form>
+</body></html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/web_app_icon_url_get_test.html b/tizen_src/ewk/unittest/resources/ewk_view/web_app_icon_url_get_test.html
new file mode 100755 (executable)
index 0000000..86bbf7b
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>ewk_view_web_application_icon_url_get API Test</title>
+<body>
+<link rel="apple-touch-icon" href="/icon.png"/>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/ewk_view/webkit.edj b/tizen_src/ewk/unittest/resources/ewk_view/webkit.edj
new file mode 100755 (executable)
index 0000000..490328f
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_view/webkit.edj differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon.png b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon.png
new file mode 100644 (file)
index 0000000..a04f81e
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon1.png b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon1.png
new file mode 100644 (file)
index 0000000..a04f81e
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon1.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon2.png b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon2.png
new file mode 100644 (file)
index 0000000..a04f81e
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon2.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon3.png b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon3.png
new file mode 100644 (file)
index 0000000..a04f81e
Binary files /dev/null and b/tizen_src/ewk/unittest/resources/ewk_view_web_application/tizen-icon3.png differ
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get.html b/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get.html
new file mode 100644 (file)
index 0000000..9b0fcf4
--- /dev/null
@@ -0,0 +1,8 @@
+<html>
+<head>
+  <link rel="apple-touch-icon" type="image/png" href="tizen-icon.png" />
+</head>
+<body>
+</body>
+</html>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_icon.html b/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_icon.html
new file mode 100644 (file)
index 0000000..bff08ae
--- /dev/null
@@ -0,0 +1,8 @@
+<html>
+<head>
+  <link rel="icon" type="image/png" href="tizen-icon.png" />
+</head>
+<body>
+</body>
+</html>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_icon_apple.html b/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_icon_apple.html
new file mode 100644 (file)
index 0000000..0e998ab
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+  <link rel="icon" type="image/png" href="bad-icon.png" />
+  <link rel="apple-touch-icon" type="image/png" href="tizen-icon.png" />
+</head>
+<body>
+</body>
+</html>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_precomposed.html b/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_url_get_precomposed.html
new file mode 100644 (file)
index 0000000..e4f5533
--- /dev/null
@@ -0,0 +1,8 @@
+<html>
+<head>
+  <link rel="apple-touch-icon-precomposed" type="image/png" href="tizen-icon.png" />
+</head>
+<body>
+</body>
+</html>
+
diff --git a/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_urls_get.html b/tizen_src/ewk/unittest/resources/ewk_view_web_application/web_app_urls_get.html
new file mode 100644 (file)
index 0000000..903c204
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+  <link rel="apple-touch-icon" type="image/png" sizes="64x64" href="tizen-icon1.png" />
+  <link rel="apple-touch-icon-precomposed" type="image/png" sizes="128x128" href="tizen-icon2.png" />
+  <link rel="icon" type="image/png" sizes="144x144" href="tizen-icon3.png" />
+</head>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/protocol_handler/handler.html b/tizen_src/ewk/unittest/resources/protocol_handler/handler.html
new file mode 100644 (file)
index 0000000..7879e1c
--- /dev/null
@@ -0,0 +1,4 @@
+<html>
+<body>
+</body>
+</html>
diff --git a/tizen_src/ewk/unittest/resources/protocol_handler/is_protocol_handler_registered.html b/tizen_src/ewk/unittest/resources/protocol_handler/is_protocol_handler_registered.html
new file mode 100644 (file)
index 0000000..9e964b3
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<head>
+  <script>
+    window.onload = function() {
+      navigator.isProtocolHandlerRegistered("mailto",
+                                            "file:///opt/usr/resources/protocol_handler/handler.html?url=%s");
+    }
+  </script>
+</head>
+<body>
+</body>
diff --git a/tizen_src/ewk/unittest/resources/protocol_handler/register_protocol_handler.html b/tizen_src/ewk/unittest/resources/protocol_handler/register_protocol_handler.html
new file mode 100644 (file)
index 0000000..f6a9a0b
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+<head>
+  <script>
+    window.onload = function() {
+      navigator.registerProtocolHandler("mailto",
+                                        "file:///opt/usr/resources/protocol_handler/handler.html?url=%s",
+                                        "EFL-Mail");
+    }
+  </script>
+</head>
+<body>
+register protocol handler
+</body>
diff --git a/tizen_src/ewk/unittest/resources/protocol_handler/unregister_protocol_handler.html b/tizen_src/ewk/unittest/resources/protocol_handler/unregister_protocol_handler.html
new file mode 100644 (file)
index 0000000..fc87511
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<head>
+  <script>
+    window.onload = function() {
+      navigator.unregisterProtocolHandler("mailto",
+                                          "file:///opt/usr/resources/protocol_handler/handler.html?url=%s");
+    }
+  </script>
+</head>
+<body>
+</body>
diff --git a/tizen_src/ewk/unittest/resources/selection/sample_1.html b/tizen_src/ewk/unittest/resources/selection/sample_1.html
new file mode 100644 (file)
index 0000000..f56042c
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+   <head>
+   </head>
+    <body  onload='txtarea.focus(); txtarea.select()'>
+        <textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:#00ff00;
+        font-size:20px;color:#ff0000'>select text</textarea>
+    </body>
+</html>
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/resources/selection/sample_2.html b/tizen_src/ewk/unittest/resources/selection/sample_2.html
new file mode 100644 (file)
index 0000000..316d43e
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+    <body>
+     <p>This is sample selection text</p>
+    </body>
+</html>
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_local_file_system_origins_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_local_file_system_origins_get_func.cpp
new file mode 100644 (file)
index 0000000..3cbe372
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_FILE "/common/sample.html"
+
+typedef void (*File_System_Callback)();
+
+static File_System_Callback finishedCallback;
+
+extern struct Ewk_Test_View test_view;
+static Eina_Bool hasOrigin;
+
+class utc_blink_ewk_context_local_file_system_origins_get : public ::testing::Test {
+  protected:
+    utc_blink_ewk_context_local_file_system_origins_get() {
+      finishedCallback = 0;
+    }
+
+    virtual ~utc_blink_ewk_context_local_file_system_origins_get() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+      evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    }
+
+    virtual void TearDown() {
+      evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+      utc_blink_ewk_test_end();
+    }
+
+    static void load_finished(void* data, Evas_Object* webview, void* event_info)
+    {
+      finishedCallback();
+    }
+
+    static void getOriginsCallback(Eina_List* origins, void* user_data)
+    {
+      if (origins) {
+       if (eina_list_count(origins))
+        hasOrigin = EINA_TRUE;
+        ewk_context_origins_free(origins);
+      }
+
+      ewk_context_local_file_system_all_delete(ewk_view_context_get(test_view.webview));
+      utc_blink_main_loop_quit();
+    }
+
+    static void loadURL(const char* url)
+    {
+      char* full_path = generate_full_resource_path(url);
+      if (!full_path)
+        utc_fail();
+
+      Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+
+      if (!result)
+        utc_fail();
+    }
+
+    static void deleteFileSystemsFinished()
+    {
+      ewk_context_local_file_system_origins_get(ewk_view_context_get(test_view.webview), getOriginsCallback, NULL);
+    }
+
+    static void deleteFileSystems(File_System_Callback finished)
+    {
+      //need to delete all file systems first
+      Eina_Bool result = ewk_context_local_file_system_all_delete(ewk_view_context_get(test_view.webview));
+      if (!result)
+        utc_fail();
+      else {
+        finishedCallback = finished;
+        loadURL(SAMPLE_FILE);
+      }
+    }
+
+    static void addFileSystemsFinished()
+    {
+      if (!ewk_context_local_file_system_origins_get(ewk_view_context_get(test_view.webview), getOriginsCallback, NULL)) {
+       utc_blink_main_loop_quit();
+      }
+    }
+
+    static void addFileSystems(File_System_Callback finished)
+    {
+      finishedCallback = finished;
+      ewk_view_url_set(test_view.webview, "http://www.html5rocks.com/en/tutorials/file/filesystem/");
+      //Internet access to the above website is required for creating a local file system, since blink engine does not allow
+      // creation of a new local file system from a locally stored HTML file
+      //Reference : http://updates.html5rocks.com/2011/08/Debugging-the-Filesystem-API
+    }
+ };
+
+/**
+* @brief Tests if there is possibility to get local file system origins
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_origins_get, POS_TEST)
+{
+  addFileSystems(addFileSystemsFinished);
+  utc_blink_main_loop_begin();
+  utc_check_eq(hasOrigin , EINA_TRUE);
+}
+
+/**
+* @brief Tests if local file system origins are not returned when there is no local file system
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_origins_get, NEG_TEST1)
+{
+  deleteFileSystems(deleteFileSystemsFinished);
+  utc_blink_main_loop_begin();
+  hasOrigin = EINA_FALSE;
+  utc_check_ne(hasOrigin , EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_origins_get, NEG_TEST2)
+{
+  utc_check_eq(ewk_context_local_file_system_origins_get(0, getOriginsCallback, 0), EINA_FALSE);
+}
+
+/**
+* @brief Tests if returns false which callback was null.
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_origins_get, NEG_TEST3)
+{
+  utc_check_eq(ewk_context_local_file_system_origins_get(ewk_view_context_get(test_view.webview), 0, 0), EINA_FALSE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_menu_item_enabled_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_menu_item_enabled_get_func.cpp
new file mode 100755 (executable)
index 0000000..4fcb757
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_context_menu.h"
+
+static Eina_Bool enabled = EINA_FALSE;
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_menu_item_enabled_get : public ::testing::Test {
+protected:
+  utc_blink_ewk_context_menu_item_enabled_get() {
+  }
+
+  virtual ~utc_blink_ewk_context_menu_item_enabled_get() {
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    Ewk_Context_Menu* contextmenu = (Ewk_Context_Menu*)event_info;
+    Ewk_Context_Menu_Item* item = ewk_context_menu_nth_item_get(contextmenu, 0);
+    enabled = ewk_context_menu_item_enabled_get(item);
+
+    utc_blink_main_loop_quit();
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_context_menu_test_init();
+    evas_object_smart_callback_add(test_view.webview, "contextmenu,customize", contextmenu_customize_callback, 0);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "contextmenu,customize", contextmenu_customize_callback);
+    utc_blink_ewk_context_menu_test_end();
+  }
+};
+
+/**
+ * @brief Tests whether the getting enabled from context menu item is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_enabled_get, POS_TEST)
+{
+  if (!is_failed)
+    utc_blink_main_loop_begin();
+
+  if (is_failed)
+    utc_fail();
+
+  utc_check_eq(enabled, EINA_TRUE);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_enabled_get, NEG_TEST)
+{
+  utc_check_eq(ewk_context_menu_item_enabled_get(NULL), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_menu_item_type_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_menu_item_type_get_func.cpp
new file mode 100755 (executable)
index 0000000..b74bfb4
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk_context_menu.h"
+
+static Ewk_Context_Menu_Item_Type type = EWK_CONTEXT_MENU_ITEM_TYPE_SEPARATOR;
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_menu_item_type_get : public ::testing::Test {
+ protected:
+  utc_blink_ewk_context_menu_item_type_get() {
+  }
+
+  virtual ~utc_blink_ewk_context_menu_item_type_get() {
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    Ewk_Context_Menu* contextmenu = (Ewk_Context_Menu*)event_info;
+    Ewk_Context_Menu_Item* item = ewk_context_menu_nth_item_get(contextmenu, 0);
+    type = ewk_context_menu_item_type_get(item);
+
+    utc_blink_main_loop_quit();
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_context_menu_test_init();
+    evas_object_smart_callback_add(test_view.webview, "contextmenu,customize", contextmenu_customize_callback, 0);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "contextmenu,customize", contextmenu_customize_callback);
+    utc_blink_ewk_context_menu_test_end();
+  }
+};
+
+/**
+ * @brief Tests whether the getting type from context menu item is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_type_get, POS_TEST)
+{
+  if (!is_failed)
+    utc_blink_main_loop_begin();
+
+  if (is_failed)
+    utc_fail();
+
+  utc_check_eq(type, EWK_CONTEXT_MENU_ITEM_TYPE_ACTION);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_type_get, NEG_TEST)
+{
+  utc_check_eq(ewk_context_menu_item_type_get(NULL), EWK_CONTEXT_MENU_ITEM_TYPE_ACTION);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_proxy_uri_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_proxy_uri_get_func.cpp
new file mode 100755 (executable)
index 0000000..7b6a0dc
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_context_proxy_uri_get
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+#define URL "http://proxy.tc.url"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_proxy_uri_get : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_context_proxy_uri_get()
+  {
+  }
+
+  ~utc_blink_ewk_context_proxy_uri_get()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive TC for ewk_context_proxy_uri_get()
+ */
+TEST_F(utc_blink_ewk_context_proxy_uri_get, POS_TEST)
+{
+  /* TODO: this code should use ewk_context_proxy_uri_get and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  Ewk_Context* defaultContext = ewk_context_default_get();
+  if (!defaultContext)
+    utc_fail();
+  ewk_context_proxy_uri_set(defaultContext, URL);
+  utc_check_str_eq(ewk_context_proxy_uri_get(defaultContext), URL);
+}
+
+/**
+ * @brief Negative TC for ewk_context_proxy_uri_get()
+ */
+TEST_F(utc_blink_ewk_context_proxy_uri_get, NEG_TEST)
+{
+  /* TODO: this code should use ewk_context_proxy_uri_get and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  Ewk_Context* defaultContext = ewk_context_default_get();
+  if (!defaultContext)
+    utc_fail();
+  ewk_context_proxy_uri_set(defaultContext, URL);
+  if (ewk_context_proxy_uri_get(0))
+    utc_fail();
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_web_storage_delete_all_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_context_web_storage_delete_all_func.cpp
new file mode 100644 (file)
index 0000000..2314561
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_context_web_storage_delete_all : public ::testing::Test {
+  protected:
+    utc_blink_ewk_context_web_storage_delete_all() {
+    }
+
+    virtual ~utc_blink_ewk_context_web_storage_delete_all() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+    }
+
+    virtual void TearDown() {
+      utc_blink_ewk_test_end();
+    }
+  };
+
+/**
+* @brief Tests if can delete all web storages
+*/
+TEST_F(utc_blink_ewk_context_web_storage_delete_all, POS_TEST)
+{
+  Ewk_Context* context = ewk_view_context_get(test_view.webview);
+  if (!ewk_context_web_storage_delete_all(context))
+   utc_fail();
+
+  utc_pass();
+}
+
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_web_storage_delete_all, NEG_TEST)
+{
+  utc_check_eq(ewk_context_web_storage_delete_all(0), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp
new file mode 100755 (executable)
index 0000000..f1ffdd9
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_cookie_manager_async_accept_policy_get : public utc_blink_ewk_base
+{
+protected:
+
+  static void cookies_policy_get_cb(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info)
+  {
+    utc_blink_ewk_cookie_manager_async_accept_policy_get *owner = static_cast<utc_blink_ewk_cookie_manager_async_accept_policy_get*>(event_info);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Checking whether cookies's policy is returned to EWK_COOKIE_ACCEPT_POLICY_NEVER.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_async_accept_policy_get, POS_TEST)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ewk_cookie_manager_async_accept_policy_get(cookieManager, cookies_policy_get_cb, this);
+
+  // Wait until callback finished.
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart(10.0);
+
+  utc_check_eq(main_result, utc_blink_ewk_base::Success);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_async_accept_policy_get, NEG_TEST)
+{
+  ewk_cookie_manager_async_accept_policy_get(NULL, cookies_policy_get_cb, this);
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart(5.0);
+
+  utc_check_ne(main_result, utc_blink_ewk_base::Success);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get_func.cpp
new file mode 100755 (executable)
index 0000000..1a6ea15
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_cookie_manager_async_hostnames_with_cookies_get
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 2
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get()
+  {
+  }
+
+  ~utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get()
+  {
+  }
+
+  static void getHostnamesWithCookiesCallback(Eina_List* hostnames, Ewk_Error* error, void* event_info)
+  {
+    if(error)
+        utc_fail();
+
+    Eina_List** ret = (Eina_List**)event_info;
+    Eina_List* l;
+    void* data;
+    EINA_LIST_FOREACH(hostnames, l, data)
+        *ret = eina_list_append(*ret, eina_stringshare_ref((char*)data));
+    ecore_main_loop_quit();
+  }
+
+  static Eina_List* getHostnamesWithCookies(Ewk_Cookie_Manager* manager)
+  {
+    Eina_List* ret = 0;
+    ewk_cookie_manager_async_hostnames_with_cookies_get(manager, getHostnamesWithCookiesCallback, &ret);
+    ecore_main_loop_begin();
+    return ret;
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_async_hostnames_with_cookies_get()
+ */
+TEST_F(utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get, POS_TEST)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+
+  if (!cookieManager)
+    utc_fail();
+
+  ewk_view_url_set(test_view.webview, "http://www.google.com");
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  ewk_view_url_set(test_view.webview, "http://m.naver.com");
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  Eina_List* cookieNameList = getHostnamesWithCookies(cookieManager);
+  if (eina_list_count(cookieNameList))
+    utc_pass();
+}
+
+/**
+ * @brief Negative test case of ewk_cookie_manager_async_hostnames_with_cookies_get()
+ */
+TEST_F(utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get, NEG_TEST1)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+
+  if (!cookieManager)
+    utc_fail();
+
+  Eina_List* ret = 0;
+  ewk_cookie_manager_async_hostnames_with_cookies_get(cookieManager, NULL, &ret);
+
+  utc_pass();
+}
+
+/**
+ * @brief Negative test case of ewk_cookie_manager_async_hostnames_with_cookies_get()
+ */
+TEST_F(utc_blink_ewk_cookie_manager_async_hostnames_with_cookies_get, NEG_TEST2)
+{
+  Eina_List* ret = 0;
+  ewk_cookie_manager_async_hostnames_with_cookies_get(NULL, getHostnamesWithCookiesCallback, &ret);
+
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_hostname_cookies_clear_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_hostname_cookies_clear_func.cpp
new file mode 100755 (executable)
index 0000000..971ecf9
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_cookie_manager_hostname_cookies_clear
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 0
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_cookie_manager_hostname_cookies_clear : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_cookie_manager_hostname_cookies_clear()
+  {
+  }
+
+  ~utc_blink_ewk_cookie_manager_hostname_cookies_clear()
+  {
+  }
+
+  static void getHostnamesWithCookiesCallback(Eina_List* hostnames, Ewk_Error* error, void* event_info)
+  {
+    if (error)
+        utc_fail();
+
+    Eina_List** ret = (Eina_List**)event_info;
+    Eina_List* l;
+    void* data;
+    EINA_LIST_FOREACH(hostnames, l, data)
+        *ret = eina_list_append(*ret, eina_stringshare_ref((char*)data));
+    ecore_main_loop_quit();
+  }
+
+  static Eina_List* getHostnamesWithCookies(Ewk_Cookie_Manager* manager)
+  {
+    Eina_List* ret = 0;
+    ewk_cookie_manager_async_hostnames_with_cookies_get(manager, getHostnamesWithCookiesCallback, &ret);
+    ecore_main_loop_begin();
+    return ret;
+  }
+
+  static void freeHostNames(Eina_List* hostnames)
+  {
+    void* data;
+    EINA_LIST_FREE(hostnames, data)
+        eina_stringshare_del((char*)data);
+  }
+
+  static int countHostnamesWithCookies(Ewk_Cookie_Manager* manager)
+  {
+    Eina_List* hostnames = getHostnamesWithCookies(manager);
+    int count = eina_list_count(hostnames);
+    freeHostNames(hostnames);
+    return count;
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_hostname_cookies_clear()
+ */
+TEST_F(utc_blink_ewk_cookie_manager_hostname_cookies_clear, POS_TEST)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+
+  ewk_view_url_set(test_view.webview, "http://www.google.com");
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  ewk_view_url_set(test_view.webview, "http://www.yahoo.com");
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  int cookieCount = countHostnamesWithCookies(cookieManager);
+
+  ewk_cookie_manager_hostname_cookies_clear(cookieManager, "http://www.yahoo.com");
+
+  // Clear all cookies
+  ewk_cookie_manager_cookies_clear(cookieManager);
+  utc_check_eq(countHostnamesWithCookies(cookieManager), 0);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_persistent_storage_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_cookie_manager_persistent_storage_set_func.cpp
new file mode 100755 (executable)
index 0000000..a0140b8
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_cookie_manager_persistent_storage_set
+#define POSITIVE_TEST_FUN_NUM 2
+#define NEGATIVE_TEST_FUN_NUM 5
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_cookie_manager_persistent_storage_set : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_cookie_manager_persistent_storage_set()
+  {
+  }
+
+  ~utc_blink_ewk_cookie_manager_persistent_storage_set()
+  {
+  }
+
+  static void getAcceptPolicyCallback(Ewk_Cookie_Accept_Policy policy, Ewk_Error* error, void* event_info)
+  {
+    if (error)
+        utc_fail();
+    Ewk_Cookie_Accept_Policy* ret = (Ewk_Cookie_Accept_Policy*)event_info;
+    *ret = policy;
+    ecore_main_loop_quit();
+  }
+
+  static Ewk_Cookie_Accept_Policy getAcceptPolicy(Ewk_Cookie_Manager* manager)
+  {
+    Ewk_Cookie_Accept_Policy policy = EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
+    ewk_cookie_manager_async_accept_policy_get(manager, getAcceptPolicyCallback, &policy);
+    ecore_main_loop_begin();
+    return policy;
+  }
+
+  static void getHostnamesWithCookiesCallback(Eina_List* hostnames, Ewk_Error* error, void* event_info)
+  {
+    if(error)
+        utc_fail();
+
+    Eina_List** ret = (Eina_List**)event_info;
+    Eina_List* l;
+    void* data;
+    EINA_LIST_FOREACH(hostnames, l, data)
+        *ret = eina_list_append(*ret, eina_stringshare_ref((char*)data));
+    ecore_main_loop_quit();
+  }
+
+  static Eina_List* getHostnamesWithCookies(Ewk_Cookie_Manager* manager)
+  {
+    Eina_List* ret = 0;
+    ewk_cookie_manager_async_hostnames_with_cookies_get(manager, getHostnamesWithCookiesCallback, &ret);
+    ecore_main_loop_begin();
+    return ret;
+  }
+
+  static void freeHostNames(Eina_List* hostnames)
+  {
+    void* data;
+    EINA_LIST_FREE(hostnames, data)
+        eina_stringshare_del((char*)data);
+  }
+
+  static int countHostnamesWithCookies(Ewk_Cookie_Manager* manager)
+  {
+    Eina_List* hostnames = getHostnamesWithCookies(manager);
+    int count = eina_list_count(hostnames);
+    freeHostNames(hostnames);
+    return count;
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_hostname_cookies_clear()
+ */
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, POS_TEST1)
+{
+  // Generate unique names for cookie storages.
+  char textStorage[] = "/tmp/";
+  if (mktemp(textStorage) == EINA_FALSE)
+    utc_fail();
+
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+  // Text storage using a new file.
+  ewk_cookie_manager_persistent_storage_set(cookieManager, textStorage, EWK_COOKIE_PERSISTENT_STORAGE_TEXT);
+
+  ewk_view_url_set(test_view.webview, "http://m.naver.com");
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  fprintf(stderr, "[ewk_cookie_manager_persistent_storage_set with TEXT]=%d\n",
+                  countHostnamesWithCookies(cookieManager));
+
+  // Final clean up.
+  unlink(textStorage);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, POS_TEST2)
+{
+  // Generate unique names for cookie storages.
+  char textStorage[] = "/tmp/";
+  if (mktemp(textStorage) == EINA_FALSE)
+    utc_fail();
+
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+  // Text storage using a new file.
+  ewk_cookie_manager_persistent_storage_set(cookieManager, textStorage, EWK_COOKIE_PERSISTENT_STORAGE_SQLITE);
+
+  ewk_view_url_set(test_view.webview, "http://m.naver.com");
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  fprintf(stderr, "[ewk_cookie_manager_persistent_storage_set with SQLITE]=%d\n",
+                  countHostnamesWithCookies(cookieManager));
+
+  // Final clean up.
+  unlink(textStorage);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, NEG_TEST1)
+{
+  char textStorage[] = "/tmp/";
+  ewk_cookie_manager_persistent_storage_set(NULL, textStorage, EWK_COOKIE_PERSISTENT_STORAGE_SQLITE);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, NEG_TEST2)
+{
+  char textStorage[] = "/tmp/";
+  ewk_cookie_manager_persistent_storage_set(NULL, textStorage, EWK_COOKIE_PERSISTENT_STORAGE_TEXT);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, NEG_TEST3)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+  // Text storage using a new file.
+  ewk_cookie_manager_persistent_storage_set(cookieManager, NULL, EWK_COOKIE_PERSISTENT_STORAGE_SQLITE);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, NEG_TEST4)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+  // Text storage using a new file.
+  ewk_cookie_manager_persistent_storage_set(cookieManager, NULL, EWK_COOKIE_PERSISTENT_STORAGE_TEXT);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_persistent_storage_set, NEG_TEST5)
+{
+  char textStorage[] = "/tmp/";
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+  // Text storage using a new file.
+  ewk_cookie_manager_persistent_storage_set(cookieManager, textStorage, static_cast<Ewk_Cookie_Persistent_Storage>(4));
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_edge_notifications.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_edge_notifications.cpp
new file mode 100644 (file)
index 0000000..a662dce
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE_EDGE_BOTTOM       ("/ewk_view/edge_test_bottom.html")
+#define SAMPLE_HTML_FILE_EDGE_TOP          ("/ewk_view/edge_test_top.html")
+#define SAMPLE_HTML_FILE_EDGE_LEFT         ("/ewk_view/edge_test_left.html")
+#define SAMPLE_HTML_FILE_EDGE_RIGHT        ("/ewk_view/edge_test_right.html")
+
+static Eina_Bool did_edge_bottom;
+static Eina_Bool did_edge_right;
+static Eina_Bool did_edge_left;
+static Eina_Bool did_edge_top;
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_edge_notifications : public ::testing::Test {
+  protected:
+    utc_blink_ewk_edge_notifications() {
+      did_edge_bottom = EINA_FALSE;
+      did_edge_top = EINA_FALSE;
+      did_edge_left = EINA_FALSE;
+      did_edge_right = EINA_FALSE;
+    }
+
+    virtual ~utc_blink_ewk_edge_notifications() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+      evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+      evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+      evas_object_smart_callback_add(test_view.webview, "edge,bottom", edge_bottom, NULL);
+      evas_object_smart_callback_add(test_view.webview, "edge,top", edge_top, NULL);
+      evas_object_smart_callback_add(test_view.webview, "edge,right", edge_right, NULL);
+      evas_object_smart_callback_add(test_view.webview, "edge,left", edge_left, NULL);
+    }
+
+    virtual void TearDown() {
+      evas_object_smart_callback_del(test_view.webview, "edge,bottom", edge_bottom);
+      evas_object_smart_callback_del(test_view.webview, "edge,top", edge_top);
+      evas_object_smart_callback_del(test_view.webview, "edge,right", edge_right);
+      evas_object_smart_callback_del(test_view.webview, "edge,left", edge_left);
+      evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+      evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+      utc_blink_ewk_test_end();
+    }
+
+    static void load_finished(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_message("[load_finished] :: \n");
+    }
+
+    static void load_error(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_message("[load_error] :: \n");
+      utc_blink_main_loop_quit();
+    }
+
+    static void edge_bottom(void* data, Evas_Object* webview, void* event_info)
+    {
+      if(!did_edge_bottom) {
+       did_edge_bottom = EINA_TRUE;
+       utc_blink_main_loop_quit();
+      }
+    }
+
+    static void edge_top(void* data, Evas_Object* webview, void* event_info)
+    {
+      did_edge_top = EINA_TRUE;
+       utc_blink_main_loop_quit();
+    }
+
+    static void edge_left(void* data, Evas_Object* webview, void* event_info)
+    {
+      did_edge_left = EINA_TRUE;
+      utc_blink_main_loop_quit();
+    }
+
+    static void edge_right(void* data, Evas_Object* webview, void* event_info)
+    {
+      did_edge_right = EINA_TRUE;
+      utc_blink_main_loop_quit();
+    }
+
+    static void loadURL(const char* url)
+    {
+      char* full_path = generate_full_resource_path(url);
+      if (!full_path)
+        utc_fail();
+
+      Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+
+      if (!result)
+        utc_fail();
+    }
+};
+
+/**
+* @brief Tests if edge bottom notification was invoked
+*/
+TEST_F(utc_blink_ewk_edge_notifications, POS_TEST1)
+{
+  loadURL(SAMPLE_HTML_FILE_EDGE_BOTTOM);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_edge_bottom, EINA_TRUE);
+}
+
+/**
+* @brief Tests if edge top notification was invoked
+*/
+TEST_F(utc_blink_ewk_edge_notifications, POS_TEST2)
+{
+  loadURL(SAMPLE_HTML_FILE_EDGE_TOP);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_edge_top, EINA_TRUE);
+}
+
+/**
+* @brief Tests if edge left notification was invoked
+*/
+TEST_F(utc_blink_ewk_edge_notifications, POS_TEST3)
+{
+  loadURL(SAMPLE_HTML_FILE_EDGE_LEFT);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_edge_left, EINA_TRUE);
+}
+
+/**
+* @brief Tests if edge right notification was invoked
+*/
+TEST_F(utc_blink_ewk_edge_notifications, POS_TEST4)
+{
+  loadURL(SAMPLE_HTML_FILE_EDGE_RIGHT);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_edge_right, EINA_TRUE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_cached_permissions_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_cached_permissions_set_func.cpp
new file mode 100755 (executable)
index 0000000..a54523a
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE                ("/common/sample_notification_2.html")
+
+static Eina_Bool isFailed = EINA_FALSE;
+static Eina_Bool notificationPermissionFirsttime  = EINA_FALSE;
+static Eina_Bool notificationPermissionSecondtime = EINA_FALSE;
+
+extern struct Ewk_Test_View test_view;
+class utc_blink_ewk_notification_cached_permissions_set : public ::testing::Test {
+protected:
+  utc_blink_ewk_notification_cached_permissions_set() {
+  }
+
+  virtual ~utc_blink_ewk_notification_cached_permissions_set() {
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    printf(full_path);
+
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for "load,finished" */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    isFailed = EINA_TRUE;
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    Ewk_Context *context = ewk_view_context_get(webview);
+    if (!event_info || !context) {
+      isFailed = EINA_TRUE;
+      utc_blink_main_loop_quit();
+      return;
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+
+    if (!notificationPermissionFirsttime) {
+      notificationPermissionFirsttime = EINA_TRUE;
+    }
+    else {
+      notificationPermissionSecondtime = EINA_TRUE;
+      return;
+    }
+
+    Eina_List *notification_list = NULL;
+    Ewk_Notification_Permission* ewk_notification_p = (Ewk_Notification_Permission*) malloc(sizeof(Ewk_Notification_Permission));
+
+    ewk_notification_p->origin  =  generate_full_resource_path(SAMPLE_HTML_FILE);
+    ewk_notification_p->allowed = TRUE;
+
+    notification_list = eina_list_append(notification_list, ewk_notification_p);
+    ewk_notification_cached_permissions_set(context,notification_list);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    if (!event_info)
+    {
+      isFailed = EINA_TRUE;
+      utc_blink_main_loop_quit();
+      return;
+    }
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "notification,permission,request", notificationPermissionRequest, NULL);
+    evas_object_smart_callback_add(test_view.webview, "notification,show", notificationShow, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(test_view.webview, "notification,show", notificationShow);
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case for ewk_notification_cached_permissions_set()
+ */
+TEST_F(utc_blink_ewk_notification_cached_permissions_set, POS_TEST)
+{
+  /* TODO: this code should use ewk_notification_cached_permissions_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  isFailed = EINA_FALSE;
+
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  if (isFailed)
+    utc_fail();
+
+  // wait a moment
+  sleep(6);
+
+  utc_check_eq(notificationPermissionSecondtime, EINA_FALSE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL value pass.
+ */
+TEST_F(utc_blink_ewk_notification_cached_permissions_set, NEG_TEST)
+{
+  /* TODO: this code should use ewk_notification_cached_permissions_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  ewk_notification_cached_permissions_set(NULL,NULL);
+  // If  NULL argument passing wont give segmentation fault negative test case will pass
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_clicked_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_clicked_func.cpp
new file mode 100755 (executable)
index 0000000..886c44b
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE                ("/common/sample_notification_1.html")
+static Eina_Bool result = EINA_FALSE;
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_notification_clicked : public ::testing::Test {
+ protected:
+  utc_blink_ewk_notification_clicked() {
+  }
+
+  virtual ~utc_blink_ewk_notification_clicked() {
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    utc_message("[loadURL] :: \n");
+
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+
+    if (!event_info)
+      utc_fail();
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: \n");
+
+    Ewk_Context *context = ewk_view_context_get(webview);
+    if (!event_info || !context)
+      utc_fail();
+
+    //call ewk_notification API
+    uint64_t notificationID = ewk_notification_id_get((Ewk_Notification*)event_info);
+    ewk_notification_clicked(context, notificationID);
+    result = EINA_TRUE;
+    utc_blink_main_loop_quit();
+  }
+
+  /* Startup function */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "notification,permission,request", notificationPermissionRequest, NULL);
+    evas_object_smart_callback_add(test_view.webview, "notification,show", notificationShow, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  /* Cleanup function */
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(test_view.webview, "notification,show", notificationShow);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+* @brief Positive test case for ewk_notification_clicked()
+*/
+TEST_F(utc_blink_ewk_notification_clicked, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL.
+*/
+TEST_F(utc_blink_ewk_notification_clicked, NEG_TEST)
+{
+  ewk_notification_clicked(NULL, 1234);
+  /* If NULL argument passing won't give segmentation fault negative test case will pass */
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_policies_removed_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_notification_policies_removed_func.cpp
new file mode 100755 (executable)
index 0000000..2a97cd8
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_policies_removed : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_notification_policies_removed()
+    : utc_blink_ewk_base()
+    , notificationsShowed(0)
+    , notificationPermissionRequestCalled(0)
+  {
+  }
+
+  static void scriptExecuted(Evas_Object* o, const char* result, void* data)
+  {
+    utc_message("[script_executed] :: \n");
+  }
+
+  static Eina_Bool scriptExecuteWrapper(void* data)
+  {
+    if (data) {
+      const char* const getPermissionRequestScript =
+      "window.webkitNotifications.requestPermission(function(){"
+      "window.webkitNotifications.createNotification(\"icon\", \"title\", \"body\").show();"
+      "})";
+      utc_message("[script_execute_wrapper] :: \n");
+      utc_blink_ewk_notification_policies_removed *ut = static_cast<utc_blink_ewk_notification_policies_removed*>(data);
+      Eina_Bool result = ewk_view_script_execute(ut->GetEwkWebView(), getPermissionRequestScript, scriptExecuted, 0);
+      if (result == EINA_FALSE) {
+        ut->EventLoopStop(utc_blink_ewk_base::Failure);
+      }
+    }
+    return ECORE_CALLBACK_DONE;
+  }
+
+  static void executeScript(void* data)
+  {
+    ecore_timer_add(3, scriptExecuteWrapper, data);
+  }
+
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+    ASSERT_TRUE(data);
+
+    Ewk_Context* context = ewk_view_context_get(webview);
+    utc_blink_ewk_notification_policies_removed *ut = static_cast<utc_blink_ewk_notification_policies_removed*>(data);
+
+    if (!event_info || !context) {
+      ut->EventLoopStop(utc_blink_ewk_base::Failure);
+      return;
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_set(static_cast<Ewk_Notification_Permission_Request*>(event_info), EINA_TRUE);
+
+    ut->notificationPermissionRequestCalled++;
+    if (ut->notificationPermissionRequestCalled >= 2)
+      ut->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] \n");
+    ASSERT_TRUE(data);
+
+    Ewk_Context* context = ewk_view_context_get(webview);
+    utc_blink_ewk_notification_policies_removed *ut = static_cast<utc_blink_ewk_notification_policies_removed*>(data);
+
+    if (!event_info || !context) {
+      ut->EventLoopStop(utc_blink_ewk_base::Failure);
+      return;
+    }
+
+    ut->notificationsShowed++;
+    if (ut->notificationsShowed >= 2) {
+      ut->EventLoopStop(utc_blink_ewk_base::Success);
+      return;
+    }
+
+    Eina_List* origins_list = NULL;
+    const Ewk_Security_Origin* origin = ewk_notification_security_origin_get((Ewk_Notification*)event_info);
+    origins_list = eina_list_append(origins_list, origin);
+
+    ewk_notification_policies_removed(context, origins_list);
+
+    executeScript(ut);
+
+    eina_list_free(origins_list);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    executeScript(this);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  static const char* const url;
+  int notificationsShowed;
+  int notificationPermissionRequestCalled;
+
+};
+
+const char* const utc_blink_ewk_notification_policies_removed::url = "http://www.example.com/";
+
+/**
+* @brief Positive test case for ewk_notification_policies_removed()
+*/
+TEST_F(utc_blink_ewk_notification_policies_removed, POS_TEST)
+{
+  utc_message("[loadURL] :: \n");
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), url));
+
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(notificationPermissionRequestCalled, 2);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL value pass
+*/
+TEST_F(utc_blink_ewk_notification_policies_removed, NEG_TEST)
+{
+  ewk_notification_policies_removed(NULL, NULL);
+  /* If NULL argument passing won't give segmentation fault negative test case will pass */
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_scroll_notifications.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_scroll_notifications.cpp
new file mode 100644 (file)
index 0000000..f3c3f51
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE_UP_DOWN        ("/ewk_view/scroll_test_up_down.html")
+#define SAMPLE_HTML_FILE_LEFT_RIGHT        ("/ewk_view/scroll_test_right_left.html")
+
+static Eina_Bool is_failed;
+static Eina_Bool is_Authenticated;
+static Eina_Bool did_scroll_down;
+static Eina_Bool did_scroll_right;
+static Eina_Bool did_scroll_left;
+static Eina_Bool did_scroll_up;
+
+static const char* scrollDownScript = "window.scrollBy(0,50);";
+// "var i=30; next(); function next(){ while(i){window.scrollTo(0,bodyDiv.scrollHeight); i-=10; setTimeout(next, 1000);} }";
+static const char* scrollUpScript = "window.scrollBy(0,150); setTimeout('next()',1000); function next(){ window.scrollBy(0,-50); setTimeout('next()',1000);}";
+static const char* scrollRightScript = "window.scrollTo(50,0);";
+static const char* scrollLeftScript = "window.scrollTo(50,0); setTimeout(next, 500); function next(){ window.scrollTo(0,0); }";
+
+typedef void (*Scroll_Callback)();
+static Scroll_Callback finishedCallback;
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_scroll_notifications : public ::testing::Test {
+  protected:
+    utc_blink_ewk_scroll_notifications() {
+    }
+
+    virtual ~utc_blink_ewk_scroll_notifications() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+      evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+      evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+      evas_object_smart_callback_add(test_view.webview, "scroll,down", scroll_down, NULL);
+      evas_object_smart_callback_add(test_view.webview, "scroll,up", scroll_up, NULL);
+      evas_object_smart_callback_add(test_view.webview, "scroll,right", scroll_right, NULL);
+      evas_object_smart_callback_add(test_view.webview, "scroll,left", scroll_left, NULL);
+    }
+
+    virtual void TearDown() {
+      evas_object_smart_callback_del(test_view.webview, "scroll,down", scroll_down);
+      evas_object_smart_callback_del(test_view.webview, "scroll,up", scroll_up);
+      evas_object_smart_callback_del(test_view.webview, "scroll,right", scroll_right);
+      evas_object_smart_callback_del(test_view.webview, "scroll,left", scroll_left);
+      evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+      evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+      utc_blink_ewk_test_end();
+    }
+
+    static void load_finished(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_message("[load_finished] :: \n");
+    }
+
+    static void load_error(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_message("[load_error] :: \n");
+      utc_blink_main_loop_quit();
+    }
+
+    static void scroll_down(void* data, Evas_Object* webview, void* event_info)
+    {
+      if (!did_scroll_down) {
+        utc_message("Reached scrolldown\n");
+        did_scroll_down = EINA_TRUE;
+        utc_blink_main_loop_quit();
+      }
+    }
+
+    static void scroll_up(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_message("Reached scrollup\n");
+      did_scroll_up = EINA_TRUE;
+      utc_blink_main_loop_quit();
+    }
+
+    static void scroll_left(void* data, Evas_Object* webview, void* event_info)
+    {
+      did_scroll_left = EINA_TRUE;
+      utc_blink_main_loop_quit();
+    }
+
+    static void scroll_right(void* data, Evas_Object* webview, void* event_info)
+    {
+      if (!did_scroll_right) {
+       did_scroll_right = EINA_TRUE;
+       utc_blink_main_loop_quit();
+      }
+    }
+
+    static void loadURL(const char* url)
+    {
+      char* full_path = generate_full_resource_path(url);
+      if (!full_path)
+        utc_fail();
+
+      Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+
+      if (!result)
+        utc_fail();
+    }
+};
+
+/**
+* @brief Tests if scroll down notification was invoked
+*/
+TEST_F(utc_blink_ewk_scroll_notifications, POS_TEST1)
+{
+  loadURL(SAMPLE_HTML_FILE_UP_DOWN);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_scroll_down, EINA_TRUE);
+}
+
+/**
+* @brief Tests if scroll up notification was invoked
+*/
+TEST_F(utc_blink_ewk_scroll_notifications, POS_TEST2)
+{
+  did_scroll_down = EINA_TRUE;
+  loadURL(SAMPLE_HTML_FILE_UP_DOWN);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_scroll_up, EINA_TRUE);
+}
+
+/**
+* @brief Tests if scroll right notification was invoked
+*/
+TEST_F(utc_blink_ewk_scroll_notifications, POS_TEST3)
+{
+  loadURL(SAMPLE_HTML_FILE_LEFT_RIGHT);
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_scroll_right, EINA_TRUE);
+}
+
+/**
+* @brief Tests if scroll left notification was invoked
+*/
+TEST_F(utc_blink_ewk_scroll_notifications, POS_TEST4)
+{
+  did_scroll_right = EINA_TRUE;
+  loadURL(SAMPLE_HTML_FILE_LEFT_RIGHT);
+  did_scroll_right = EINA_TRUE;
+  utc_blink_main_loop_begin();
+  utc_check_eq(did_scroll_left, EINA_TRUE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_auto_fitting_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_auto_fitting_get_func.cpp
new file mode 100755 (executable)
index 0000000..04dbebc
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_auto_fitting_get : public ::testing::Test {
+ protected:
+  utc_blink_ewk_settings_auto_fitting_get() {
+  }
+
+  virtual ~utc_blink_ewk_settings_auto_fitting_get() {
+  }
+
+  virtual void SetUp()
+  {
+   utc_blink_ewk_test_init();
+  }
+
+  virtual void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_settings_auto_fitting_get()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  ewk_settings_auto_fitting_set(settings,EINA_TRUE);
+  int result = ewk_settings_auto_fitting_get(settings);
+  utc_check_eq(result, 1);
+}
+
+/**
+ * @brief Positive test case of ewk_settings_auto_fitting_get()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  ewk_settings_auto_fitting_set(settings,EINA_FALSE);
+  int result = ewk_settings_auto_fitting_get(settings);
+  utc_check_eq(result, 0);
+}
+
+
+/**
+ * @brief Negative test case of ewk_settings_auto_fitting_get()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_get, NEG_TEST)
+{
+  int result = ewk_settings_auto_fitting_get(NULL);
+  utc_check_eq(result, 0);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_current_legacy_font_size_mode_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_current_legacy_font_size_mode_get_func.cpp
new file mode 100644 (file)
index 0000000..2dff13d
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+typedef enum _Ewk_Legacy_Font_Size_Mode Ewk_Legacy_Font_Size_Mode;
+
+class utc_blink_ewk_settings_current_legacy_font_size_mode_get : public ::testing::Test {
+  protected:
+    utc_blink_ewk_settings_current_legacy_font_size_mode_get() {
+    }
+
+    virtual ~utc_blink_ewk_settings_current_legacy_font_size_mode_get() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+    }
+
+    virtual void TearDown() {
+      utc_blink_ewk_test_end();
+    }
+};
+
+/**
+* @brief Tests if returns EWK_LEGACY_FONT_SIZE_MODE_ALWAYS when initiated with a correct webview and
+* "Legacy Font Size Mode" is set to EWK_LEGACY_FONT_SIZE_MODE_ALWAYS.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result1 =
+      ewk_settings_current_legacy_font_size_mode_set(settings, EWK_LEGACY_FONT_SIZE_MODE_ALWAYS);
+  if (!result1)
+   utc_fail();
+  Ewk_Legacy_Font_Size_Mode result2 = ewk_settings_current_legacy_font_size_mode_get(settings);
+
+  utc_check_eq(result2, EWK_LEGACY_FONT_SIZE_MODE_ALWAYS);
+}
+
+/**
+* @brief Tests if returns EWK_LEGACY_FONT_SIZE_MODE_NEVER when initiated with a correct webview and
+* "Legacy Font Size Mode" is set to EWK_LEGACY_FONT_SIZE_MODE_NEVER.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result =
+      ewk_settings_current_legacy_font_size_mode_set(settings, EWK_LEGACY_FONT_SIZE_MODE_NEVER);
+  if (!result)
+   utc_fail();
+  Ewk_Legacy_Font_Size_Mode result2 = ewk_settings_current_legacy_font_size_mode_get(settings);
+
+  utc_check_eq(result2, EWK_LEGACY_FONT_SIZE_MODE_NEVER);
+}
+
+/**
+* @brief Tests if returns EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH when initiated with a correct webview and
+* "Legacy Font Size Mode" is set to EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_get, POS_TEST3)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result =
+      ewk_settings_current_legacy_font_size_mode_set(settings, EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH);
+  if (!result)
+   utc_fail();
+  Ewk_Legacy_Font_Size_Mode result2 = ewk_settings_current_legacy_font_size_mode_get(settings);
+
+  utc_check_eq(result2, EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH);
+}
+
+/**
+* @brief Tests if returns EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_get, NEG_TEST)
+{
+  Ewk_Legacy_Font_Size_Mode result =
+      ewk_settings_current_legacy_font_size_mode_get(NULL);
+  utc_check_eq(result, EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_font_default_size_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_font_default_size_get_func.cpp
new file mode 100755 (executable)
index 0000000..5e3cc86
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_font_default_size_get : public ::testing::Test {
+ protected:
+  utc_blink_ewk_settings_font_default_size_get() {
+  }
+
+  virtual ~utc_blink_ewk_settings_font_default_size_get() {
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  virtual void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case for ewk_settings_font_default_size_get(). Get the default font size.
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  int defaultSize = 0;
+  defaultSize = ewk_settings_font_default_size_get(settings);
+
+  utc_check_ne(defaultSize, 0);
+}
+
+/**
+ * @brief Positive test case for ewk_settings_font_default_size_get(). Set the default font size and then compare the value.
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+
+  int defaultSize = 0;
+  defaultSize = ewk_settings_font_default_size_get(settings);
+  if (defaultSize == 0)
+    utc_fail();
+
+  int size = defaultSize + 1;
+  Eina_Bool result = ewk_settings_font_default_size_set(settings, size);
+  if(!result)
+    utc_fail();
+
+  defaultSize = ewk_settings_font_default_size_get(settings);
+  utc_check_eq(defaultSize, size);
+}
+
+/**
+ * @brief Negative test case for ewk_settings_font_default_size_get(). Check if API works fine with NULL as settings.
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_get, NEG_TEST)
+{
+  int defaultSize = ewk_settings_font_default_size_get(NULL);
+  utc_check_eq(defaultSize, 0);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_load_remote_images_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_load_remote_images_get_func.cpp
new file mode 100644 (file)
index 0000000..6d7c987
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_load_remote_images_get : public ::testing::Test {
+  protected:
+    utc_blink_ewk_settings_load_remote_images_get() {
+    }
+
+    virtual ~utc_blink_ewk_settings_load_remote_images_get() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+    }
+
+    virtual void TearDown() {
+      utc_blink_ewk_test_end();
+    }
+};
+
+/**
+* @brief Tests if returns EINA_TRUE when initiated with a correct webview and
+* "Load Remote Images" is set to EINA_TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_load_remote_images_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_load_remote_images_set(settings, EINA_TRUE);
+  if (!result)
+   utc_fail();
+  result = ewk_settings_load_remote_images_get(settings);
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns EINA_FALSE when initiated with a correct webview and
+* "Load Remote Images" is set to EINA_FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_load_remote_images_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_load_remote_images_set(settings, EINA_FALSE);
+  if (!result)
+   utc_fail();
+  result = ewk_settings_load_remote_images_get(settings);
+
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+* @brief Tests if returns EINA_FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_load_remote_images_get, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_load_remote_images_get(NULL);
+  if (result)
+   utc_fail();
+  utc_check_ne(result, EINA_TRUE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_paste_image_uri_mode_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_paste_image_uri_mode_get_func.cpp
new file mode 100644 (file)
index 0000000..5d452df
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_paste_image_uri_mode_get : public ::testing::Test {
+  protected:
+    utc_blink_ewk_settings_paste_image_uri_mode_get() {
+    }
+
+    virtual ~utc_blink_ewk_settings_paste_image_uri_mode_get() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+    }
+
+    virtual void TearDown() {
+      utc_blink_ewk_test_end();
+    }
+};
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* "paste image as URI" is set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_paste_image_uri_mode_get, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_paste_image_uri_mode_set(settings, EINA_TRUE);
+  if (!result)
+   utc_fail();
+  result = ewk_settings_paste_image_uri_mode_get(settings);
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with a correct webview and
+* "paste image as URI" is set to FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_paste_image_uri_mode_get, NEG_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_paste_image_uri_mode_set(settings, EINA_FALSE);
+  if (!result)
+   utc_fail();
+  result = ewk_settings_paste_image_uri_mode_get(settings);
+
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_paste_image_uri_mode_get, NEG_TEST2)
+{
+  Eina_Bool result = ewk_settings_paste_image_uri_mode_get(NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_select_word_automatically_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_select_word_automatically_get_func.cpp
new file mode 100755 (executable)
index 0000000..4592177
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_select_word_automatically_get : public ::testing::Test {
+ protected:
+  utc_blink_ewk_settings_select_word_automatically_get() {
+  }
+
+  virtual ~utc_blink_ewk_settings_select_word_automatically_get() {
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  virtual void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled select word automatically set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_select_word_automatically_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_select_word_automatically_set(settings, EINA_TRUE);
+  if (!result)
+    utc_fail();
+
+  result = ewk_settings_select_word_automatically_get(settings);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with a correct webview and
+ * enabled select word automatically set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_select_word_automatically_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_select_word_automatically_set(settings, EINA_FALSE);
+  if (!result)
+    utc_fail();
+
+  result = ewk_settings_select_word_automatically_get(settings);
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_select_word_automatically_get, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_select_word_automatically_get(NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_text_selection_enabled_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_text_selection_enabled_get_func.cpp
new file mode 100755 (executable)
index 0000000..a12830c
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+ extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_text_selection_enabled_get : public ::testing::Test {
+ protected:
+  utc_blink_ewk_settings_text_selection_enabled_get() {
+  }
+
+  virtual ~utc_blink_ewk_settings_text_selection_enabled_get() {
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  virtual void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled text selection set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_text_selection_enabled_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_text_selection_enabled_set(settings, EINA_TRUE);
+  if (!result)
+    utc_fail();
+
+  result = ewk_settings_text_selection_enabled_get(settings);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with a correct webview and
+ * enabled text selection set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_text_selection_enabled_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_text_selection_enabled_set(settings, EINA_FALSE);
+  if (!result)
+    utc_fail();
+
+  result = ewk_settings_text_selection_enabled_get(settings);
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_text_selection_enabled_get, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_text_selection_enabled_get(NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_text_zoom_enabled_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_settings_text_zoom_enabled_get_func.cpp
new file mode 100644 (file)
index 0000000..51b3047
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_settings_text_zoom_enabled_get : public ::testing::Test {
+  protected:
+    utc_blink_ewk_settings_text_zoom_enabled_get() {
+    }
+
+    virtual ~utc_blink_ewk_settings_text_zoom_enabled_get() {
+    }
+
+    virtual void SetUp() {
+      utc_blink_ewk_test_init();
+    }
+
+    virtual void TearDown() {
+      utc_blink_ewk_test_end();
+    }
+};
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* enabled text zoom set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_text_zoom_enabled_get, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_text_zoom_enabled_set(settings, EINA_TRUE);
+  if (!result)
+   utc_fail();
+
+  result = ewk_settings_text_zoom_enabled_get(settings);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+
+/**
+* @brief Tests if returns FALSE when initiated with a correct webview and
+* enabled text zoom set to FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_text_zoom_enabled_get, NEG_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+  Eina_Bool result = ewk_settings_text_zoom_enabled_set(settings, EINA_FALSE);
+  if (!result)
+   utc_fail();
+
+  result = ewk_settings_text_zoom_enabled_get(settings);
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_text_zoom_enabled_get, NEG_TEST2)
+{
+  Eina_Bool result = ewk_settings_text_zoom_enabled_get(NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_back_forward_list_clear_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_back_forward_list_clear_func.cpp
new file mode 100644 (file)
index 0000000..47ea9d8
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE1                ("/common/sample.html")
+#define SAMPLE_HTML_FILE2                ("/common/sample_1.html")
+#define SAMPLE_HTML_FILE3                ("/common/sample_2.html")
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_back_forward_list_clear : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_back_forward_list_clear() {
+  }
+
+  virtual ~utc_blink_ewk_view_back_forward_list_clear() {
+  }
+
+  virtual void SetUp() {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  virtual void TearDown() {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[load_error] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+};
+
+/**
+ * @brief checking if function works properly when no page is loaded and passing correct webview.
+ */
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, POS_TEST1)
+{
+  ewk_view_back_forward_list_clear(test_view.webview);
+  utc_pass();
+}
+
+/**
+ * @brief checking if when two pages are loaded and function is called, then ewk_view_back_possible
+ * should return EINA_FALSE
+ */
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, POS_TEST2)
+{
+  loadURL(SAMPLE_HTML_FILE1);
+  utc_blink_main_loop_begin();
+
+  loadURL(SAMPLE_HTML_FILE2);
+  utc_blink_main_loop_begin();
+
+  ewk_view_back_forward_list_clear(test_view.webview);
+  Eina_Bool result = ewk_view_back_possible(test_view.webview);
+
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+ * @brief checking if when two pages are loaded, ewk_view_back is called and then ewk_view_back_forward_list_clear
+ * is called, then ewk_view_forward_possible should return EINA_FALSE
+ */
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, POS_TEST3)
+{
+  loadURL(SAMPLE_HTML_FILE1);
+  utc_blink_main_loop_begin();
+
+  loadURL(SAMPLE_HTML_FILE2);
+  utc_blink_main_loop_begin();
+
+  ewk_view_back(test_view.webview);
+  utc_blink_main_loop_begin();
+
+  ewk_view_back_forward_list_clear(test_view.webview);
+  Eina_Bool result = ewk_view_forward_possible(test_view.webview);
+
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+ * @brief checking if when three pages are loaded, ewk_view_back is called and then ewk_view_back_forward_list_clear
+ * is called, then ewk_view_forward_possible and ewk_view_back_possible both should return EINA_FALSE
+ */
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, POS_TEST4)
+{
+  loadURL(SAMPLE_HTML_FILE1);
+  utc_blink_main_loop_begin();
+
+  loadURL(SAMPLE_HTML_FILE2);
+  utc_blink_main_loop_begin();
+
+  loadURL(SAMPLE_HTML_FILE3);
+  utc_blink_main_loop_begin();
+
+  ewk_view_back(test_view.webview);
+  utc_blink_main_loop_begin();
+
+  ewk_view_back_forward_list_clear(test_view.webview);
+  Eina_Bool result = !ewk_view_forward_possible(test_view.webview) && !ewk_view_back_possible(test_view.webview);
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief checking if function works properly in case of NULL webview
+ */
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, NEG_TEST)
+{
+  ewk_view_back_forward_list_clear(NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_command_executeRedo_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_command_executeRedo_func.cpp
new file mode 100644 (file)
index 0000000..085fe92
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+#define SAMPLE_HTML_FILE                ("/selection/sample_1.html")
+
+static int undoSize = 0;
+static int redoSize = 0;
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_command_executeRedo : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_command_executeRedo() {
+  }
+
+  virtual ~utc_blink_ewk_view_command_executeRedo() {
+  }
+
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview,"undo,size", get_undo_size, 0);
+    evas_object_smart_callback_add(test_view.webview,"redo,size", get_redo_size, 0);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview,"redo,size", get_redo_size);
+    evas_object_smart_callback_del(test_view.webview,"undo,size", get_undo_size);
+    utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    utc_message("[loadURL] :: \n");
+
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  static void get_undo_size(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_undo_size callback] :: \n");
+    undoSize = *(int*)event_info;
+    utc_blink_main_loop_quit();
+  }
+
+  static void get_redo_size(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_redo_size callback] :: \n");
+    redoSize = *(int*)event_info;
+    utc_blink_main_loop_quit();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_command_executeRedo(),testing results to get redo stack size
+ */
+TEST_F(utc_blink_ewk_view_command_executeRedo, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_blink_main_loop_begin();
+
+  ewk_view_command_execute(test_view.webview, "Copy", NULL);
+  ewk_view_command_execute(test_view.webview, "Paste", NULL);
+  utc_blink_main_loop_begin();
+  ewk_view_command_execute(test_view.webview, "Paste", NULL);
+  utc_blink_main_loop_begin();
+  ewk_view_command_execute(test_view.webview, "Undo", NULL);
+  utc_blink_main_loop_begin();
+  ewk_view_command_execute(test_view.webview, "Redo", NULL);
+  utc_blink_main_loop_begin();
+
+  utc_check_eq(redoSize, 1);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_command_executeUndo_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_command_executeUndo_func.cpp
new file mode 100644 (file)
index 0000000..059853e
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+#define SAMPLE_HTML_FILE                ("/selection/sample_1.html")
+
+static int result = 0;
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_command_executeUndo : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_command_executeUndo() {
+  }
+
+  virtual ~utc_blink_ewk_view_command_executeUndo() {
+  }
+
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview,"undo,size", get_undo_size, 0);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview,"undo,size", get_undo_size);
+    utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    utc_message("[loadURL] :: \n");
+
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+    utc_fail();
+  }
+
+  static void get_undo_size(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_undo_size callback] :: \n");
+    result = *(int*)event_info;
+    utc_blink_main_loop_quit();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_command_executeUndo(),testing results to get undo stack size
+ */
+TEST_F(utc_blink_ewk_view_command_executeUndo, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_blink_main_loop_begin();
+
+  ewk_view_command_execute(test_view.webview, "Copy", NULL);
+  ewk_view_command_execute(test_view.webview, "Paste", NULL);
+  utc_blink_main_loop_begin();
+  ewk_view_command_execute(test_view.webview, "Undo", NULL);
+  utc_blink_main_loop_begin();
+
+  utc_check_eq(result, 1);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_didCommitLoadFrameCallback_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_didCommitLoadFrameCallback_func.cpp
new file mode 100755 (executable)
index 0000000..d93379d
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_webkit_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+#define SAMPLE_HTML_FILE        ("/common/sample.html")
+
+extern struct Ewk_Test_View test_view;
+static int result = 0;
+class utc_blink_ewk_view_didCommitLoadFrameCallback : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_didCommitLoadFrameCallback()
+  {
+  }
+
+  ~utc_blink_ewk_view_didCommitLoadFrameCallback()
+  {
+  }
+
+  /* Callback for quitting main loop */
+  static void commit_load(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[commit_load] :: \n");
+    result = 1;
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,committed", commit_load, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,committed", commit_load);
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    utc_blink_ewk_test_end();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /*Load specified URL */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_resume()
+ */
+TEST_F(utc_blink_ewk_view_didCommitLoadFrameCallback, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  if (result)
+    utc_pass();
+  else
+    utc_fail();
+}
+
+/**
+ * @brief Negative test case of ewk_view_resume()
+ */
+TEST_F(utc_blink_ewk_view_didCommitLoadFrameCallback, NEG_TEST)
+{
+  // No test case
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_didStartProvisionalLoadFrameCallback_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_didStartProvisionalLoadFrameCallback_func.cpp
new file mode 100755 (executable)
index 0000000..a2a368b
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_webkit_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+#define SAMPLE_HTML_FILE        ("/common/sample.html")
+
+extern struct Ewk_Test_View test_view;
+static int result = 0;
+class utc_blink_ewk_view_didStartProvisionalLoadFrameCallback : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_didStartProvisionalLoadFrameCallback()
+  {
+  }
+
+  ~utc_blink_ewk_view_didStartProvisionalLoadFrameCallback()
+  {
+  }
+
+  /* Callback for quitting main loop */
+  static void provisional_load(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[provisional_load] :: \n");
+    result = 1;
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,provisional,started", provisional_load, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,provisional,started", provisional_load);
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    utc_blink_ewk_test_end();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /*Load specified URL */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_resume()
+ */
+TEST_F(utc_blink_ewk_view_didStartProvisionalLoadFrameCallback, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  if (result)
+    utc_pass();
+  else
+    utc_fail();
+}
+
+/**
+ * @brief Negative test case of ewk_view_resume()
+ */
+TEST_F(utc_blink_ewk_view_didStartProvisionalLoadFrameCallback, NEG_TEST)
+{
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_feed_touch_event_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_feed_touch_event_func.cpp
new file mode 100755 (executable)
index 0000000..3c7d582
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_feed_touch_event
+#define POSITIVE_TEST_FUN_NUM 2
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+#include "ewk_touch.h"
+
+#ifndef NULL
+#define NULL 0x0
+#endif
+
+#define RESOURCE_PATH "/ewk_view/index_big_red_square.html"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_feed_touch_event : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_feed_touch_event()
+  {
+  }
+
+  ~utc_blink_ewk_view_feed_touch_event()
+  {
+  }
+
+  static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+  {
+    utc_message("[loadFinished] :: \n");
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[load_error] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  static void frameRendered(void* data, Evas_Object* eObject, void* dataFinished)
+  {
+    utc_message("[frameRendered] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+ /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview, "frame,rendered", frameRendered, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview, "frame,rendered", frameRendered);
+    utc_blink_ewk_test_end();
+  }
+
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+        utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+        utc_fail();
+  }
+};
+
+
+/**
+ * @brief Positive test case of ewk_view_feed_touch_event(), testing start of touch.
+ */
+
+TEST_F(utc_blink_ewk_view_feed_touch_event, POS_TEST1)
+{
+  loadURL(RESOURCE_PATH);
+  utc_blink_main_loop_begin();
+
+  Eina_List* points = 0;
+  unsigned i = 0;
+  for (i = 0; i < 2; ++i) {
+    Ewk_Touch_Point* point = (Ewk_Touch_Point*)calloc(sizeof(Ewk_Touch_Point), 1);
+    point->id = i;
+    point->x = 10;
+    point->y = 10;
+    point->state = EVAS_TOUCH_POINT_DOWN;
+    points = eina_list_append(points, point);
+  }
+
+  Eina_Bool result = ewk_view_feed_touch_event(test_view.webview, EWK_TOUCH_START, points, evas_key_modifier_get(evas_object_evas_get(test_view.webview)));
+
+  void* data;
+  EINA_LIST_FREE(points, data)
+  free((Ewk_Touch_Point*)data);
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Positive test case of ewk_view_feed_touch_event(), testing end of touch.
+ */
+
+TEST_F(utc_blink_ewk_view_feed_touch_event, POS_TEST2)
+{
+  Eina_List* points = 0;
+  unsigned i = 0;
+  for (i = 0; i < 2; ++i) {
+    Ewk_Touch_Point* point = (Ewk_Touch_Point*)calloc(sizeof(Ewk_Touch_Point), 1);
+    point->id = i;
+    point->x = 10;
+    point->y = 10;
+    point->state = EVAS_TOUCH_POINT_UP;
+    points = eina_list_append(points, point);
+  }
+
+  Eina_Bool result = ewk_view_feed_touch_event(test_view.webview, EWK_TOUCH_END, points, evas_key_modifier_get(evas_object_evas_get(test_view.webview)));
+
+  void* data;
+  EINA_LIST_FREE(points, data)
+    free((Ewk_Touch_Point*)data);
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Negative test case of ewk_view_feed_touch_event(), testing for null
+ */
+TEST_F(utc_blink_ewk_view_feed_touch_event, NEG_TEST)
+{
+  utc_check_eq(ewk_view_feed_touch_event(0, EWK_TOUCH_END, 0, 0), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_alert_callback_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_alert_callback_set_func.cpp
new file mode 100755 (executable)
index 0000000..73dd7a2
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+Eina_Bool g_result = EINA_FALSE;
+
+extern struct Ewk_Test_View test_view;
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/alert_test.html")
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_javascript_alert_callback_set : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_javascript_alert_callback_set()
+  {
+  }
+
+  ~utc_blink_ewk_view_javascript_alert_callback_set()
+  {
+  }
+
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    //utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for script alert */
+  static Eina_Bool alertCallback(Evas_Object* webview ,const char* message, void* user_data)
+  {
+    utc_message("[alertCallback] :: xc\n");
+    g_result = EINA_TRUE;
+    utc_blink_main_loop_quit();
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_javascript_alert_callback()
+ * ewk_view_javascript_alert_callback() should be set if the page content triggers a alert callback
+ */
+TEST_F(utc_blink_ewk_view_javascript_alert_callback_set, POS_TEST)
+{
+  ewk_view_javascript_alert_callback_set(test_view.webview, alertCallback, 0);
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(g_result, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_javascript_alert_callback_set, NEG_TEST1)
+{
+  ewk_view_javascript_alert_callback_set(NULL, alertCallback, 0);
+  utc_pass();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a callback for javascript alert.
+*/
+TEST_F(utc_blink_ewk_view_javascript_alert_callback_set, NEG_TEST2)
+{
+  ewk_view_javascript_alert_callback_set(test_view.webview, NULL, 0);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_alert_reply_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_alert_reply_func.cpp
new file mode 100755 (executable)
index 0000000..eb2422b
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+Eina_Bool alertResult = EINA_FALSE;
+
+extern struct Ewk_Test_View test_view;
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/alert_test.html")
+
+class utc_blink_ewk_view_javascript_alert_reply : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_javascript_alert_reply()
+  {
+  }
+
+  ~utc_blink_ewk_view_javascript_alert_reply()
+  {
+  }
+
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    ewk_view_javascript_alert_callback_set(test_view.webview, alertCallback, 0);
+  }
+
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    ewk_view_javascript_alert_callback_set(test_view.webview, NULL, 0);
+    //utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for script alert */
+  static Eina_Bool alertCallback(Evas_Object* webview ,const char* message ,void* user_data)
+  {
+    utc_message("[alertCallback] :: xc\n");
+    alertResult = EINA_TRUE;
+    utc_blink_main_loop_quit();
+    ewk_view_javascript_alert_reply(webview);
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_javascript_alert_reply()
+ * ewk_view_javascript_alert_reply() should be performed without any problem.
+ */
+TEST_F(utc_blink_ewk_view_javascript_alert_reply, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(alertResult, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_javascript_alert_reply, NEG_TEST)
+{
+  ewk_view_javascript_alert_reply(NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_confirm_callback_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_confirm_callback_set_func.cpp
new file mode 100755 (executable)
index 0000000..0f19209
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+Eina_Bool confirmResult = EINA_FALSE;
+
+extern struct Ewk_Test_View test_view;
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/confirm_test.html")
+
+class utc_blink_ewk_view_javascript_confirm_callback_set : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_javascript_confirm_callback_set()
+  {
+  }
+
+  ~utc_blink_ewk_view_javascript_confirm_callback_set()
+  {
+  }
+
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    //utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for script confirm */
+  static Eina_Bool confirmCallback(Evas_Object* webview ,const char* message ,void* user_data)
+  {
+    utc_message("[confirmCallback] :: xc\n");
+    confirmResult = EINA_TRUE;
+    utc_blink_main_loop_quit();
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_javascript_confirm_callback()
+ * ewk_view_javascript_confirm_callback() should be set if the page content triggers a confirm callback
+ */
+TEST_F(utc_blink_ewk_view_javascript_confirm_callback_set, POS_TEST)
+{
+  ewk_view_javascript_confirm_callback_set(test_view.webview, confirmCallback, 0);
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(confirmResult, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_javascript_confirm_callback_set, NEG_TEST1)
+{
+  ewk_view_javascript_confirm_callback_set(NULL, confirmCallback, 0);
+  utc_pass();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a callback for javascript confirm.
+*/
+TEST_F(utc_blink_ewk_view_javascript_confirm_callback_set, NEG_TEST2)
+{
+  ewk_view_javascript_confirm_callback_set(test_view.webview, NULL, 0);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_prompt_callback_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_prompt_callback_set_func.cpp
new file mode 100755 (executable)
index 0000000..e6b065e
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+extern struct Ewk_Test_View test_view;
+
+Eina_Bool promptResult = EINA_FALSE;
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/prompt_test.html")
+
+class utc_blink_ewk_view_javascript_prompt_callback_set : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_javascript_prompt_callback_set()
+  {
+  }
+
+  ~utc_blink_ewk_view_javascript_prompt_callback_set()
+  {
+  }
+
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    //utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for script prompt */
+  static Eina_Bool promptCallback(Evas_Object* webview ,const char* message,const char* default_value ,void* user_data)
+  {
+    utc_message("[promptCallback] :: xc\n");
+    promptResult = EINA_TRUE;
+    utc_blink_main_loop_quit();
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_javascript_prompt_callback()
+ * ewk_view_javascript_prompt_callback() should be set if the page content triggers a alert callback
+ */
+TEST_F(utc_blink_ewk_view_javascript_prompt_callback_set, POS_TEST)
+{
+  ewk_view_javascript_prompt_callback_set(test_view.webview, promptCallback, 0);
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(promptResult, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_javascript_prompt_callback_set, NEG_TEST1)
+{
+  ewk_view_javascript_prompt_callback_set(NULL, promptCallback, 0);
+  utc_pass();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a callback for javascript prompt.
+*/
+TEST_F(utc_blink_ewk_view_javascript_prompt_callback_set, NEG_TEST2)
+{
+  ewk_view_javascript_prompt_callback_set(test_view.webview, NULL, 0);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_prompt_reply_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_javascript_prompt_reply_func.cpp
new file mode 100755 (executable)
index 0000000..1166079
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+Eina_Bool promptReply = EINA_FALSE;
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/prompt_test.html")
+
+class utc_blink_ewk_view_javascript_prompt_reply : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_javascript_prompt_reply()
+  {
+  }
+
+  ~utc_blink_ewk_view_javascript_prompt_reply()
+  {
+  }
+
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    //utc_blink_ewk_test_end();
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+      free(full_path);
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for script prompt */
+  static Eina_Bool promptCallback(Evas_Object* webview ,const char* message,const char* default_value ,void* user_data)
+  {
+    utc_message("[promptCallback] :: xc\n");
+    const char* result = "prompt_reply";
+    ewk_view_javascript_prompt_reply(webview, result);
+    promptReply = EINA_TRUE;
+    utc_blink_main_loop_quit();
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_javascript_prompt_reply()
+ * ewk_view_javascript_prompt_reply() should be performed without any problem.
+ */
+TEST_F(utc_blink_ewk_view_javascript_prompt_reply, POS_TEST)
+{
+  ewk_view_javascript_prompt_callback_set(test_view.webview, promptCallback, 0);
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(promptReply, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_javascript_prompt_reply, NEG_TEST)
+{
+  ewk_view_javascript_prompt_reply(NULL, NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_load_callbacks_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_load_callbacks_func.cpp
new file mode 100755 (executable)
index 0000000..aecc9b1
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE                ("/common/sample.html")
+
+extern struct Ewk_Test_View test_view;
+
+int load_start_result = 0;
+int load_finished_result = 0;
+int load_progress_started = 0;
+int load_progress_finished = 0;
+int load_progress = 0;
+
+class utc_blink_ewk_view_load_callbacks : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_load_callbacks() {
+  }
+
+  virtual ~utc_blink_ewk_view_load_callbacks() {
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /* Callback for load finished */
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    load_finished_result = 1;
+    utc_blink_main_loop_quit();
+  }
+
+  static void loadStarted(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadStarted] :: \n");
+    load_start_result = 1;
+  }
+
+  static void loadProgress(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadProgress] :: \n");
+    load_progress = 1;
+  }
+  static void loadProgressStarted(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadProgressStarted] :: \n");
+    load_progress_started = 1;
+  }
+
+  static void loadProgressFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadProgressFinished] :: \n");
+    load_progress_finished = 1;
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[load_error] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  /* Startup function */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,started", loadStarted, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,progress", loadProgress, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,progress,started", loadProgressStarted, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,progress,finished", loadProgressFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  /* Cleanup function */
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,started", loadStarted);
+    evas_object_smart_callback_del(test_view.webview, "load,progress", loadProgress);
+    evas_object_smart_callback_del(test_view.webview, "load,progress,started", loadProgressStarted);
+    evas_object_smart_callback_del(test_view.webview, "load,progress,finished", loadProgressFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+* @brief Check whether load,finished is called
+*/
+TEST_F(utc_blink_ewk_view_load_callbacks, POS_TEST1)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(load_finished_result, 1);
+}
+
+/**
+* @brief Change whether load,started is called
+*/
+TEST_F(utc_blink_ewk_view_load_callbacks, POS_TEST2)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(load_start_result, 1);
+}
+
+/**
+* @brief Change whether load,progress is called
+*/
+TEST_F(utc_blink_ewk_view_load_callbacks, POS_TEST3)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(load_progress, 1);
+}
+
+/**
+* @brief Checking whether load,progress,started is called
+*/
+TEST_F(utc_blink_ewk_view_load_callbacks, POS_TEST4)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(load_progress_started, 1);
+}
+
+/**
+* @brief Checking whether load,progress,finished is called
+*/
+TEST_F(utc_blink_ewk_view_load_callbacks, POS_TEST5)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+  utc_check_eq(load_progress_finished, 1);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_mouse_events_enabled_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_mouse_events_enabled_get_func.cpp
new file mode 100755 (executable)
index 0000000..17384e0
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_mouse_events_enabled_get
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_mouse_events_enabled_get : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_mouse_events_enabled_get()
+  {
+  }
+
+  ~utc_blink_ewk_view_mouse_events_enabled_get()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+
+/**
+ * @brief Checking whether the state of mouse events behavior is returned properly.
+ */
+TEST_F(utc_blink_ewk_view_mouse_events_enabled_get, POS_TEST)
+{
+  Eina_Bool result = EINA_TRUE;
+  Eina_Bool enable_set;
+  Eina_Bool enable_get;
+
+  enable_set = EINA_TRUE;
+  ewk_view_mouse_events_enabled_set(test_view.webview, enable_set);
+  enable_get = ewk_view_mouse_events_enabled_get(test_view.webview);
+  if (enable_set != enable_get) {
+    result = EINA_FALSE;
+  }
+
+  enable_set = EINA_FALSE;
+  ewk_view_mouse_events_enabled_set(test_view.webview, enable_set);
+  enable_get = ewk_view_mouse_events_enabled_get(test_view.webview);
+  if (enable_set != enable_get) {
+    result = EINA_FALSE;
+  }
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief There is no negative case for ewk_view_mouse_events_enabled_get function.
+ */
+TEST_F(utc_blink_ewk_view_mouse_events_enabled_get, NEG_TEST)
+{
+  ewk_view_mouse_events_enabled_get(NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_mouse_events_enabled_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_mouse_events_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..42dfdc4
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_mouse_events_enabled_set
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_mouse_events_enabled_set : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_mouse_events_enabled_set()
+  {
+  }
+
+  ~utc_blink_ewk_view_mouse_events_enabled_set()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Checking whether the state of mouse events behavior is set properly.
+ */
+TEST_F(utc_blink_ewk_view_mouse_events_enabled_set, POS_TEST)
+{
+  Eina_Bool result = EINA_TRUE;
+  Eina_Bool enable_set;
+  Eina_Bool enable_get;
+
+  enable_set = EINA_TRUE;
+  ewk_view_mouse_events_enabled_set(test_view.webview, enable_set);
+  enable_get = ewk_view_mouse_events_enabled_get(test_view.webview);
+  if (enable_set != enable_get) {
+    result = EINA_FALSE;
+  }
+
+  enable_set = EINA_FALSE;
+  ewk_view_mouse_events_enabled_set(test_view.webview, enable_set);
+  enable_get = ewk_view_mouse_events_enabled_get(test_view.webview);
+  if (enable_set != enable_get) {
+    result = EINA_FALSE;
+  }
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief There is no negative case for ewk_view_mouse_events_enabled_set function.
+ */
+TEST_F(utc_blink_ewk_view_mouse_events_enabled_set, NEG_TEST)
+{
+  ewk_view_mouse_events_enabled_set(test_view.webview, EINA_FALSE);
+  ewk_view_mouse_events_enabled_set(test_view.webview, EINA_TRUE);
+
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_plain_text_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_plain_text_set_func.cpp
new file mode 100755 (executable)
index 0000000..666112a
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_plain_text_set : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_plain_text_set()
+  {
+  }
+
+  ~utc_blink_ewk_view_plain_text_set()
+  {
+  }
+
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+
+  /**
+  * @brief Positive test case of ewk_view_plain_text_set(), checking whether text is set properly.
+  */
+  static void plain_text_get_cb(Evas_Object* o, const char* plain_text, void* user_data)
+  {
+    utc_check_str_eq("This is Plain Text", plain_text);
+  }
+};
+
+/**
+* @brief Positive test case of ewk_view_plain_text_set().Checking whether function works properly
+*/
+TEST_F(utc_blink_ewk_view_plain_text_set, POS_TEST)
+{
+  utc_check_eq(ewk_view_plain_text_set(test_view.webview,"This is Plain Text"), EINA_TRUE);
+  ewk_view_plain_text_get(test_view.webview, plain_text_get_cb, NULL);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of command.
+*/
+TEST_F(utc_blink_ewk_view_plain_text_set, NEG_TEST)
+{
+  utc_check_eq(ewk_view_plain_text_set(NULL,"This is Negative Plain Text"), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_reload_bypass_cache_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_reload_bypass_cache_func.cpp
new file mode 100755 (executable)
index 0000000..8116198
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_reload_bypass_cache
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+#define SAMPLE_HTML_FILE        ("/common/sample.html")
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_reload_bypass_cache : public ::testing::Test {
+ protected:
+  utc_blink_ewk_view_reload_bypass_cache() {
+  }
+
+  virtual ~utc_blink_ewk_view_reload_bypass_cache() {
+  }
+
+  static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[load_error] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview.
+ */
+TEST_F(utc_blink_ewk_view_reload_bypass_cache, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  Eina_Bool result = ewk_view_reload_bypass_cache(test_view.webview);
+  utc_blink_main_loop_begin();
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when not initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_view_reload_bypass_cache, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_reload_bypass_cache(NULL);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_smart_class_set_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_smart_class_set_func.cpp
new file mode 100755 (executable)
index 0000000..5544ffd
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_smart_class_set
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_smart_class_set : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_smart_class_set()
+  {
+  }
+
+  ~utc_blink_ewk_view_smart_class_set()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Checking whether the smart class is initialized properly.
+ */
+TEST_F(utc_blink_ewk_view_smart_class_set, POS_TEST)
+{
+  static Ewk_View_Smart_Class ewk_smart_class = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("tcblink");
+  Eina_Bool result = ewk_view_smart_class_set(&ewk_smart_class);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a smart class object.
+ */
+TEST_F(utc_blink_ewk_view_smart_class_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_smart_class_set(NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_text_selection_range_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_text_selection_range_get_func.cpp
new file mode 100755 (executable)
index 0000000..834bdd3
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+#define SAMPLE_HTML_FILE                ("/selection/sample_1.html")
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_text_selection_range_get : public ::testing::Test {
+protected:
+  utc_blink_ewk_view_text_selection_range_get() {
+  }
+
+  virtual ~utc_blink_ewk_view_text_selection_range_get() {
+  }
+
+  /* Load specified url */
+  static void loadURL(const char* url)
+  {
+    utc_message("[loadURL] :: \n");
+
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+      utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+      utc_fail();
+  }
+
+  /*Callback for Load Error */
+  static void loadError(void *data, Evas_Object *webview, void *error)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /*Callback for Load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Startup and cleanup functions */
+  virtual void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError,NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished,NULL);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    utc_blink_ewk_test_end();
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_text_selection_range_get(),testing results to get selected Range.
+ */
+TEST_F(utc_blink_ewk_view_text_selection_range_get, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  const char textRangeHTML[] =
+     "<!DOCTYPE html>"
+      "<html><head>"
+      "<script>"
+      "window.onload = function(){"
+      "var text_area = document.getElementById('txtarea');"
+      "text_area.focus();"
+      "text_area.select();}"
+      "</script></head>"
+      "<body>"
+      "<textarea id='txtarea'>select text</textarea>"
+      "</body></html>";
+
+  ewk_view_html_string_load(test_view.webview, textRangeHTML, 0, 0);
+
+  // Wait until load finished.
+  utc_blink_main_loop_begin();
+
+  Eina_Rectangle leftrect, rightrect;
+  Eina_Bool result = ewk_view_text_selection_range_get(test_view.webview, &leftrect, &rightrect);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_view_text_selection_range_get, NEG_TEST)
+{
+  Eina_Rectangle leftrect, rightrect;
+  Eina_Bool result = ewk_view_text_selection_range_get(NULL, &leftrect, &rightrect);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_title_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_title_get_func.cpp
new file mode 100755 (executable)
index 0000000..98e474a
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_title_get
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+#define SAMPLE_HTML_FILE       ("/common/sample.html")
+#define TITLE0 "Test file"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_title_get : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_title_get()
+  {
+  }
+
+  ~utc_blink_ewk_view_title_get()
+  {
+  }
+
+  /*Callback for load finished */
+  static void loadFinished(void *data, Evas_Object *webview, void *arg)
+  {
+    utc_message("[loadFinished] :: \n");
+    utc_blink_main_loop_quit();
+  }
+
+  /* Callback for load error */
+  static void loadError(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[loadError] :: \n");
+    utc_blink_main_loop_quit();
+
+    utc_fail();
+  }
+
+  /* Startup and cleanup functions */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+  }
+
+  void TearDown()
+  {
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_blink_ewk_test_end();
+  }
+
+  /*Load Specified URL*/
+  static void loadURL(const char* url)
+  {
+    char* full_path = generate_full_resource_path(url);
+    if (!full_path)
+        utc_fail();
+
+    Eina_Bool result = ewk_view_url_set(test_view.webview, full_path);
+    free(full_path);
+
+    if (!result)
+        utc_fail();
+  }
+};
+/**
+ * @brief Checks title when page is loaded.
+ */
+TEST_F(utc_blink_ewk_view_title_get, POS_TEST)
+{
+  loadURL(SAMPLE_HTML_FILE);
+  utc_blink_main_loop_begin();
+
+  const char* title0 = ewk_view_title_get(test_view.webview);
+  utc_check_str_eq(title0, TITLE0);
+}
+
+/**
+ * @brief Checking title when ewk_view is NULL.
+ */
+TEST_F(utc_blink_ewk_view_title_get, NEG_TEST)
+{
+  const char* title = ewk_view_title_get(NULL);
+  if (title)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_touch_events_enabled_get_func.cpp b/tizen_src/ewk/unittest/unused/utc_blink_ewk_view_touch_events_enabled_get_func.cpp
new file mode 100755 (executable)
index 0000000..56ca64a
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#define TESTED_FUN_NAME ewk_view_touch_events_enabled_get
+#define POSITIVE_TEST_FUN_NUM 1
+#define NEGATIVE_TEST_FUN_NUM 1
+
+#include "utc_blink_ewk.h"
+
+extern struct Ewk_Test_View test_view;
+
+class utc_blink_ewk_view_touch_events_enabled_get : public ::testing::Test
+{
+ protected:
+  utc_blink_ewk_view_touch_events_enabled_get()
+  {
+  }
+
+  ~utc_blink_ewk_view_touch_events_enabled_get()
+  {
+  }
+
+  /* Startup function */
+  void SetUp()
+  {
+    utc_blink_ewk_test_init();
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    utc_blink_ewk_test_end();
+  }
+};
+
+
+/**
+ * @brief Checking whether the state of touch events behavior is returned properly.
+ */
+TEST_F(utc_blink_ewk_view_touch_events_enabled_get, POS_TEST)
+{
+  Eina_Bool result = EINA_TRUE;
+  Eina_Bool enable_set;
+  Eina_Bool enable_get;
+
+  enable_set = EINA_TRUE;
+  ewk_view_touch_events_enabled_set(test_view.webview, enable_set);
+  enable_get = ewk_view_touch_events_enabled_get(test_view.webview);
+  if (enable_set != enable_get) {
+    result = EINA_FALSE;
+  }
+
+  enable_set = EINA_FALSE;
+  ewk_view_touch_events_enabled_set(test_view.webview, enable_set);
+  enable_get = ewk_view_touch_events_enabled_get(test_view.webview);
+  if (enable_set != enable_get) {
+    result = EINA_FALSE;
+  }
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief There is no negative case for ewk_view_touch_events_enabled_get function.
+ */
+TEST_F(utc_blink_ewk_view_touch_events_enabled_get, NEG_TEST)
+{
+  ewk_view_touch_events_enabled_get(NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_contextmenu_allowed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_contextmenu_allowed.cpp
new file mode 100644 (file)
index 0000000..10d9b47
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_contextmenu_allowed: public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_contextmenu_allowed()
+    : allow(EINA_FALSE)
+  {
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,allowed", ToSmartCallback(contextmenu_allowed_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,allowed", ToSmartCallback(contextmenu_allowed_cb));
+  }
+
+  static void contextmenu_allowed_cb(utc_blink_cb_contextmenu_allowed* owner, Evas_Object* webview, Eina_Bool* allowed)
+  {
+    ASSERT_TRUE(owner);
+
+    if (allowed) {
+      owner->allow = *allowed;
+    }
+
+    // callback has come, so we stop with success
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Eina_Bool allow;
+};
+
+TEST_F(utc_blink_cb_contextmenu_allowed, callback)
+{
+  // selecting text inside text area should invoke context menu
+
+  const char htmlBuff[] = "<html>"
+                          "<body onload=\"document.getElementById('dd').select()\">"
+                          "<textarea id=\"dd\">Test fullscreen</textarea>"
+                          "</body>"
+                          "</html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuff, NULL, NULL));
+
+  // Wait for context menu callback
+  ASSERT_EQ(Success, EventLoopStart());
+  // It's hard to calculate position of context menu that will appear so we check only if value was modified
+  ASSERT_EQ(EINA_TRUE, allow);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_contextmenu_willshow.cpp b/tizen_src/ewk/unittest/utc_blink_cb_contextmenu_willshow.cpp
new file mode 100644 (file)
index 0000000..a4f9896
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_contextmenu_willshow: public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_contextmenu_willshow()
+  {
+    pos.x = -1;
+    pos.y = -1;
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,willshow", ToSmartCallback(contextmenu_willshow_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,willshow", ToSmartCallback(contextmenu_willshow_cb));
+  }
+
+  static void contextmenu_willshow_cb(utc_blink_cb_contextmenu_willshow* owner, Evas_Object* webview, Evas_Point* position)
+  {
+    ASSERT_TRUE(owner);
+
+    if (position) {
+      owner->pos.x = position->x;
+      owner->pos.y = position->y;
+    }
+
+    // callback has come, so we stop with success
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Evas_Point pos;
+};
+
+TEST_F(utc_blink_cb_contextmenu_willshow, callback)
+{
+  // selecting text inside text area should invoke context menu
+
+  const char htmlBuff[] = "<html>"
+                          "<body onload=\"document.getElementById('dd').select()\">"
+                          "<textarea id=\"dd\">Test fullscreen</textarea>"
+                          "</body>"
+                          "</html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuff, NULL, NULL));
+
+  // Wait for context menu callback
+  ASSERT_EQ(Success, EventLoopStart());
+  // It's hard to calculate position of context menu that will appear so we check only if value was modified
+  ASSERT_NE(-1, pos.x);
+  ASSERT_NE(-1, pos.y);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_closed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_closed.cpp
new file mode 100644 (file)
index 0000000..57ef6a4
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef OS_TIZEN
+#include <Ecore_X.h>
+// using scim to simulate keyboard typing
+#include <scim.h>
+#include <scim_event.h>
+#include <scim_attribute.h>
+#include <scim_lookup_table.h>
+#include <scim_socket.h>
+#include <scim_property.h>
+#include <scim_transaction.h>
+#include <scim_helper.h>
+#include <scim_helper_manager.h>
+#endif
+
+#include "utc_blink_ewk_base.h"
+
+#include <X11/Xlib.h>
+#undef Success // conflicts with utc_blink_ewk_base enum
+
+class utc_blink_cb_editorclient_candidate_closed : public utc_blink_ewk_base
+{
+protected:
+  void PreSetUp()
+  {
+    const char* default_context_id = ecore_imf_context_default_id_get();
+    ASSERT_TRUE(default_context_id) << "This TC can't be run without default imf context - it will fail anyway";
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void editorclient_candidate_cb(utc_blink_cb_editorclient_candidate_closed* owner, Evas_Object*, void*)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Tests "editorclient,candidate,closed" callback
+ *
+ * We use Tizen ISF API to open candidate window on current input method panel and after it was shown
+ * we close it.
+ */
+TEST_F(utc_blink_cb_editorclient_candidate_closed, callback)
+{
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body>"
+                          "<input id=\"e\" type=\"text\"><a id=\"b\" onclick=\"document.getElementById('e').focus();\">Button</a>"
+                        "</body>"
+                      "</html>";
+
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  // This TC will timeout on desktop as there is no input method context
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // We need to focus on window
+  elm_object_focus_set(GetEwkWebView(), EINA_TRUE);
+
+  // We scope this callback as it is only needed once
+  {
+    evas_object_smart_callback_auto ime(GetEwkWebView(), "editorclient,ime,opened", ToSmartCallback(editorclient_candidate_cb), this);
+    // This script execute should produce user gesture and should show software keyboard on mobile
+    ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('b').click();", NULL, NULL));
+    // Wait for keyboard
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,ime,opened smart callback timeout";
+  }
+
+#ifdef OS_TIZEN
+  scim::HelperAgent agent;
+
+  {
+    Display* display = static_cast<Display*>(ecore_x_display_get());
+    ASSERT_TRUE(display) << "No X11 display available!";
+
+    evas_object_smart_callback_auto candidate(GetEwkWebView(), "editorclient,candidate,opened", ToSmartCallback(editorclient_candidate_cb), this);
+
+    scim::HelperManager manager;
+
+    int count = manager.number_of_helpers();
+
+    scim::HelperInfo info;
+
+    for (int i = 0; i < count; ++i) {
+      if (manager.get_helper_info(i, info)) {
+        agent.open_connection(info, XDisplayString(display));
+      }
+    }
+
+    ASSERT_TRUE(agent.is_connected()) << "Could not connect to SCIM - can't send proper events to virtual keyboard";
+
+    scim::WideString content = scim::utf8_mbstowcs("a");
+    agent.commit_string(-1, scim::String(), content);
+    agent.show_candidate_string();
+
+    // wait for candidate to show
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,candidate,opened smart callback timeout";
+  }
+
+  {
+    evas_object_smart_callback_auto candidate(GetEwkWebView(), "editorclient,candidate,closed", ToSmartCallback(editorclient_candidate_cb), this);
+    agent.hide_candidate_string();
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,candidate,closed smart callback timeout";
+  }
+
+
+  agent.close_connection();
+#else // OS_TIZEN
+  ASSERT_TRUE(false) << "This TC won't work outside Tizen OS";
+#endif // OS_TIZEN
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_opened.cpp b/tizen_src/ewk/unittest/utc_blink_cb_editorclient_candidate_opened.cpp
new file mode 100644 (file)
index 0000000..66a42be
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef OS_TIZEN
+#include <Ecore_X.h>
+// using scim to simulate keyboard typing
+#include <scim.h>
+#include <scim_event.h>
+#include <scim_attribute.h>
+#include <scim_lookup_table.h>
+#include <scim_socket.h>
+#include <scim_property.h>
+#include <scim_transaction.h>
+#include <scim_helper.h>
+#include <scim_helper_manager.h>
+#endif
+
+#include "utc_blink_ewk_base.h"
+
+#include <X11/Xlib.h>
+#undef Success // conflicts with utc_blink_ewk_base enum
+
+class utc_blink_cb_editorclient_candidate_opened : public utc_blink_ewk_base
+{
+protected:
+  void PreSetUp()
+  {
+    const char* default_context_id = ecore_imf_context_default_id_get();
+    ASSERT_TRUE(default_context_id) << "This TC can't be run without default imf context - it will fail anyway";
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void editorclient_candidate_opened_cb(utc_blink_cb_editorclient_candidate_opened* owner, Evas_Object*, void*)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Tests "editorclient,candidate,opened" callback
+ *
+ * We use Tizen ISF API to open candidate window on current input method panel
+ */
+TEST_F(utc_blink_cb_editorclient_candidate_opened, callback)
+{
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body>"
+                          "<input id=\"e\" type=\"text\"><a id=\"b\" onclick=\"document.getElementById('e').focus();\">Button</a>"
+                        "</body>"
+                      "</html>";
+
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  // This TC will timeout on desktop as there is no input method context
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // We need to focus on window
+  elm_object_focus_set(GetEwkWebView(), EINA_TRUE);
+
+  // We scope this callback as it is only needed once
+  {
+    evas_object_smart_callback_auto ime(GetEwkWebView(), "editorclient,ime,opened", ToSmartCallback(editorclient_candidate_opened_cb), this);
+    // This script execute should produce user gesture and should show software keyboard on mobile
+    ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('b').click();", NULL, NULL));
+    // Wait for keyboard
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,ime,opened smart callback timeout";
+  }
+
+#ifdef OS_TIZEN
+  {
+    Display* display = static_cast<Display*>(ecore_x_display_get());
+    ASSERT_TRUE(display) << "No X11 display available!";
+
+    evas_object_smart_callback_auto candidate(GetEwkWebView(), "editorclient,candidate,opened", ToSmartCallback(editorclient_candidate_opened_cb), this);
+
+    scim::HelperAgent agent;
+    scim::HelperManager manager;
+
+    int count = manager.number_of_helpers();
+
+    scim::HelperInfo info;
+
+    for (int i = 0; i < count; ++i) {
+      if (manager.get_helper_info(i, info)) {
+        agent.open_connection(info, XDisplayString(display));
+      }
+    }
+
+    ASSERT_TRUE(agent.is_connected()) << "Could not connect to SCIM - can't send proper events to virtual keyboard";
+
+    scim::WideString content = scim::utf8_mbstowcs("a");
+    agent.commit_string(-1, scim::String(), content);
+    agent.show_candidate_string();
+
+    agent.close_connection();
+
+    // wait for candidate to show
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,candidate,opened smart callback timeout";
+  }
+#else // OS_TIZEN
+    ASSERT_TRUE(false) << "This TC won't work outside Tizen OS";
+#endif // OS_TIZEN
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_editorclient_ime_closed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_editorclient_ime_closed.cpp
new file mode 100644 (file)
index 0000000..20e344e
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_editorclient_ime_closed : public utc_blink_ewk_base
+{
+protected:
+  void PreSetUp()
+  {
+    const char* default_context_id = ecore_imf_context_default_id_get();
+    ASSERT_TRUE(default_context_id) << "This TC can't be run without default imf context - it will fail anyway";
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void editorclient_ime_closed_cb(utc_blink_cb_editorclient_ime_closed* owner, Evas_Object*, void*)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Test "editorclient,ime,closed" callback
+ */
+TEST_F(utc_blink_cb_editorclient_ime_closed, callback)
+{
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body>"
+                          "<input id=\"e\" type=\"text\"/><br/>"
+                          "<a id=\"focus\" onclick=\"document.getElementById('e').focus();\">Focus</a><br/>"
+                          "<a id=\"unfocus\" onclick=\"document.getElementById('e').blur();\">Unfocus</a><br/>"
+                        "</body>"
+                      "</html>";
+
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  // This TC will timeout on desktop as there is no input method context
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // We need to focus on window
+  elm_object_focus_set(GetEwkWebView(), EINA_TRUE);
+
+  {
+    evas_object_smart_callback_auto ime(GetEwkWebView(), "editorclient,ime,opened", ToSmartCallback(editorclient_ime_closed_cb), this);
+    // This script execute should produce user gesture and should show software keyboard on mobile
+    ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('focus').click();", NULL, NULL));
+    // Wait for keyboard
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,ime,opened smart callback timeout";
+  }
+
+  {
+    evas_object_smart_callback_auto ime(GetEwkWebView(), "editorclient,ime,closed", ToSmartCallback(editorclient_ime_closed_cb), this);
+    // This script execute should produce user gesture and should show software keyboard on mobile
+    ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('unfocus').click();", NULL, NULL));
+    // Wait for keyboard
+    ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,ime,opened smart callback timeout";
+  }
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_editorclient_ime_opened.cpp b/tizen_src/ewk/unittest/utc_blink_cb_editorclient_ime_opened.cpp
new file mode 100644 (file)
index 0000000..b9f74e6
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_editorclient_ime_opened : public utc_blink_ewk_base
+{
+protected:
+  void PreSetUp()
+  {
+    const char* default_context_id = ecore_imf_context_default_id_get();
+    ASSERT_TRUE(default_context_id) << "This TC can't be run without default imf context - it will fail anyway";
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "editorclient,ime,opened", ToSmartCallback(editorclient_ime_opened_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "editorclient,ime,opened", ToSmartCallback(editorclient_ime_opened_cb));
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void editorclient_ime_opened_cb(utc_blink_cb_editorclient_ime_opened* owner, Evas_Object*, void*)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Test "editorclient,ime,opened" callback
+ */
+TEST_F(utc_blink_cb_editorclient_ime_opened, callback)
+{
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body>"
+                          "<input id=\"e\" type=\"text\"><a id=\"b\" onclick=\"document.getElementById('e').focus(); console.log('asdf');\">Button</a>"
+                        "</body>"
+                      "</html>";
+
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  // This TC will timeout on desktop as there is no input method context
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // We need to focus on window
+  elm_object_focus_set(GetEwkWebView(), EINA_TRUE);
+
+  // This script execute should produce user gesture and should show software keyboard on mobile
+  ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('b').click();", NULL, NULL));
+  // Wait for keyboard
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "editorclient,ime,opened smart callback timeout";
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_form_submit.cpp b/tizen_src/ewk/unittest/utc_blink_cb_form_submit.cpp
new file mode 100644 (file)
index 0000000..2ae73d3
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_form_submit : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "form,submit", (void (*)(void*, Evas_Object*, void*)) form_submit, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "form,submit", (void (*)(void*, Evas_Object*, void*)) form_submit);
+  }
+
+  static void form_submit(utc_blink_cb_form_submit* owner, Evas_Object* webview, const char* arg)
+  {
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != arg);
+    utc_message("[form_submit]\t%s",arg);
+    EXPECT_STREQ(arg,"www.webkit.org/");
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Load page and submit form from javascript.
+ */
+TEST_F(utc_blink_cb_form_submit, AutoSubmit)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_form_data/index.html").c_str()));
+  EXPECT_EQ(Success, EventLoopStart()); // Wait for "form,submit"
+}
+
+/**
+ * @brief Load page and waiting for timeout (don't submit form).
+ */
+TEST_F(utc_blink_cb_form_submit, NonSubmit)
+{
+  ASSERT_TRUE(ewk_view_url_set( GetEwkWebView(), GetResourceUrl("common/sample_1.html").c_str()));
+  EXPECT_EQ(Failure, EventLoopStart(5)); // Wait for timeout
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_fullscreen_enterfullscreen.cpp b/tizen_src/ewk/unittest/utc_blink_cb_fullscreen_enterfullscreen.cpp
new file mode 100644 (file)
index 0000000..b76ebc9
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_fullscreen_enterfullscreen : public utc_blink_ewk_base
+{
+ protected:
+
+  void PostSetUp()
+  {
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(settings);
+    ewk_settings_fullscreen_enabled_set(settings, EINA_TRUE);
+    evas_object_smart_callback_add(GetEwkWebView(), "fullscreen,enterfullscreen",
+                                   ToSmartCallback(fullscreen_enterfullscreen),
+                                   this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "fullscreen,enterfullscreen",
+                                   ToSmartCallback(fullscreen_enterfullscreen));
+  }
+
+  void LoadFinished(Evas_Object* /*webview*/) {
+    EventLoopStop(Success);
+  }
+
+  static void fullscreen_enterfullscreen(utc_blink_cb_fullscreen_enterfullscreen* owner,
+                                        Evas_Object*, void*)
+  {
+    utc_message("\e[0;32m[ %s ]\e[0m", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+
+};
+
+TEST_F(utc_blink_cb_fullscreen_enterfullscreen, Canvas)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(),
+                               GetResourceUrl("ewk_view/canvas.html").c_str()));
+  // Wait for load finish
+  ASSERT_EQ(Success, EventLoopStart());
+  ewk_view_script_execute(GetEwkWebView(),
+                          "document.getElementById('c').webkitRequestFullscreen()", NULL, this);
+  // Wait for fullscreen_enterfullscreen
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_cb_fullscreen_enterfullscreen, Video)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(),
+                               GetResourceUrl("ewk_view/fullscreen.html").c_str()));
+  // Wait for load finish
+  ASSERT_EQ(Success, EventLoopStart());
+  ewk_view_script_execute(GetEwkWebView(),
+                          "document.getElementById('video').webkitRequestFullscreen()", NULL, this);
+  // Wait for fullscreen_enterfullscreen
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_fullscreen_exitfullscreen.cpp b/tizen_src/ewk/unittest/utc_blink_cb_fullscreen_exitfullscreen.cpp
new file mode 100644 (file)
index 0000000..31047d8
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_fullscreen_exitfullscreen : public utc_blink_ewk_base
+{
+ protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "fullscreen,exitfullscreen",
+                                   ToSmartCallback(fullscreen_exitfullscreen), this);
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(NULL != settings);
+    ewk_settings_fullscreen_enabled_set(settings,EINA_TRUE);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "fullscreen,exitfullscreen",
+                                   ToSmartCallback(fullscreen_exitfullscreen));
+  }
+
+  void LoadFinished(Evas_Object*/* webview*/) {
+    ewk_view_fullscreen_exit(GetEwkWebView());
+  }
+
+  static void fullscreen_exitfullscreen(utc_blink_cb_fullscreen_exitfullscreen* owner,
+                                        Evas_Object*, void*)
+  {
+    utc_message("[ %s ] ::", __FUNCTION__);
+    ASSERT_TRUE(NULL != owner);
+    owner->EventLoopStop(Success);
+  }
+};
+
+TEST_F(utc_blink_cb_fullscreen_exitfullscreen, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl("ewk_view/fullscreen.html").c_str()));
+  EXPECT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_geolocation_valid.cpp b/tizen_src/ewk/unittest/utc_blink_cb_geolocation_valid.cpp
new file mode 100755 (executable)
index 0000000..cc41ccf
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE                 ("/common/sample_js_geolocation.html")
+
+class utc_blink_cb_geolocation_valid : public utc_blink_ewk_base {
+
+protected:
+  static void geolocation_valid_allow_cb(utc_blink_cb_geolocation_valid* owner, Evas_Object* webview, Eina_Bool* allow)
+  {
+    ASSERT_TRUE(owner);
+    if (allow) {
+      *allow = EINA_TRUE;
+    } else {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+  static void geolocation_valid_deny_cb(utc_blink_cb_geolocation_valid* owner, Evas_Object* webview, Eina_Bool* allow)
+  {
+    ASSERT_TRUE(owner);
+    if (allow) {
+      *allow = EINA_FALSE;
+    } else {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+  static void geolocation_valid_cb(utc_blink_cb_geolocation_valid* owner, Evas_Object* webview, Eina_Bool* allow)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+
+  static void request_geolocation_permisson_success(utc_blink_cb_geolocation_valid* owner, Evas_Object* webview, void* event_info)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+
+  static void request_geolocation_permisson_fail(utc_blink_cb_geolocation_valid* owner, Evas_Object* webview, void* event_info)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Failure);
+  }
+
+  static void load_finished_fail_cb(utc_blink_cb_geolocation_valid* owner, Evas_Object*, void*)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Failure);
+  }
+
+  static void load_finished_success_cb(utc_blink_cb_geolocation_valid* owner, Evas_Object*, void*)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Test "geolocation,valid" callback
+ */
+TEST_F(utc_blink_cb_geolocation_valid, callback)
+{
+  // Simply check if callback is fired, if load,finished comes first then something went wrong
+  evas_object_smart_callback_auto gv(GetEwkWebView(), "geolocation,valid", ToSmartCallback(geolocation_valid_cb), this);
+  evas_object_smart_callback_auto lf(GetEwkWebView(), "load,finished", ToSmartCallback(load_finished_fail_cb), this);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief check if control param of "geolocation,valid" callback works as it suposed to.
+ *
+ * If we block geolocation module initialization in geolocation,valid callback then no geolocation,permission,request should be triggered.
+ */
+TEST_F(utc_blink_cb_geolocation_valid, callback_param_to_false)
+{
+  evas_object_smart_callback_auto gp(GetEwkWebView(), "geolocation,permission,request", ToSmartCallback(request_geolocation_permisson_fail), this);
+  evas_object_smart_callback_auto gv(GetEwkWebView(), "geolocation,valid", ToSmartCallback(geolocation_valid_deny_cb), this);
+  evas_object_smart_callback_auto lf(GetEwkWebView(), "load,finished", ToSmartCallback(load_finished_success_cb), this);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief check if control param of "geolocation,valid" callback works as it suposed to.
+ *
+ * If we allow geolocation module initialization in geolocation,valid callback then geolocation,permission,request should be triggered.
+ */
+TEST_F(utc_blink_cb_geolocation_valid, callback_param_to_true)
+{
+  evas_object_smart_callback_auto gp(GetEwkWebView(), "geolocation,permission,request", ToSmartCallback(request_geolocation_permisson_success), this);
+  evas_object_smart_callback_auto gv(GetEwkWebView(), "geolocation,valid", ToSmartCallback(geolocation_valid_allow_cb), this);
+  evas_object_smart_callback_auto lf(GetEwkWebView(), "load,finished", ToSmartCallback(load_finished_fail_cb), this);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_icon_received.cpp b/tizen_src/ewk/unittest/utc_blink_cb_icon_received.cpp
new file mode 100644 (file)
index 0000000..9762d83
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_icon_received : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "icon,received", cb_icon_received, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "icon,received", cb_icon_received);
+  }
+
+  static void cb_icon_received(void *data, Evas_Object *, void *)
+  {
+    ASSERT_TRUE(data != NULL);
+    utc_blink_cb_icon_received *owner = static_cast<utc_blink_cb_icon_received *>(data);
+    owner->EventLoopStop(Success);
+  }
+};
+
+TEST_F(utc_blink_cb_icon_received, PAGE_WITH_FAVICON)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/favicon.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_cb_icon_received, PAGE_WITHOUT_FAVICON)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str()));
+  ASSERT_EQ(Failure, EventLoopStart(5));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_inputmethod_changed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_inputmethod_changed.cpp
new file mode 100644 (file)
index 0000000..b8634cd
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_inputmethod_changed : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_inputmethod_changed()
+  {
+    memset(&panel_rect, 0, sizeof panel_rect);
+  }
+  void PreSetUp()
+  {
+    const char* default_context_id = ecore_imf_context_default_id_get();
+    ASSERT_TRUE(default_context_id) << "This TC can't be run without default imf context - it will fail anyway";
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "inputmethod,changed", ToSmartCallback(inputmethod_changed_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "inputmethod,changed", ToSmartCallback(inputmethod_changed_cb));
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void inputmethod_changed_cb(utc_blink_cb_inputmethod_changed* owner, Evas_Object*, Eina_Rectangle* rect)
+  {
+    utc_message("%p", rect);
+    ASSERT_TRUE(owner);
+    if  (rect) {
+      owner->panel_rect = *rect;
+    }
+
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  Eina_Rectangle panel_rect;
+};
+
+/**
+ * @brief Test "inputmethod,changed" callback
+ *
+ * The name of the callback may be misguiding - it doesn't mean that the way you input text has changed.
+ * It means that geometry of input panel has changed.
+ */
+TEST_F(utc_blink_cb_inputmethod_changed, callback)
+{
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body>"
+                          "<input id=\"e\" type=\"text\"/><br/>"
+                          "<a id=\"focus\" onclick=\"document.getElementById('e').focus();\">Focus</a><br/>"
+                          "<a id=\"unfocus\" onclick=\"document.getElementById('e').blur();\">Unfocus</a><br/>"
+                        "</body>"
+                      "</html>";
+
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  // This TC will timeout on desktop as there is no input method context
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // We need to focus on window
+  elm_object_focus_set(GetEwkWebView(), EINA_TRUE);
+
+  // This script execute should produce user gesture and should show software keyboard on mobile
+  ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('focus').click();", NULL, NULL));
+  // Wait for keyboard
+
+  // When opening ime geometry is sent two times (by efl). First rect will be empty, second not
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "inputmethod,changed smart callback timeout";
+  ASSERT_EQ(EINA_TRUE, eina_rectangle_is_empty(&panel_rect));
+
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "inputmethod,changed smart callback timeout";
+  ASSERT_EQ(EINA_FALSE, eina_rectangle_is_empty(&panel_rect));
+
+  // This script execute should produce user gesture and should show software keyboard on mobile
+  ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "document.getElementById('unfocus').click();", NULL, NULL));
+  // Wait for keyboard
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart()) << "inputmethod,changed smart callback timeout";
+  ASSERT_EQ(EINA_TRUE, eina_rectangle_is_empty(&panel_rect));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_load_finished.cpp b/tizen_src/ewk/unittest/utc_blink_cb_load_finished.cpp
new file mode 100644 (file)
index 0000000..ab81cae
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_load_finished : public utc_blink_ewk_base
+{
+public:
+    /* Callback for "load,finished" */
+    void LoadFinished(Evas_Object* webview)
+    {
+        EventLoopStop(utc_blink_ewk_base::Success);
+    }
+};
+
+/**
+ * @brief Tests "load,finished" callback with ewl_view_html_string_load
+ */
+TEST_F(utc_blink_cb_load_finished, html_string_load)
+{
+    char htmlBuffer[] = "<html>"
+                          "<head><title>TC ewk_view_html_load_string</title></head>"
+                          "<body><p>TC ewk_view_html_load_string</p></body>"
+                        "</html>";
+
+    Eina_Bool result = ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL);
+
+    if (!result)
+        utc_fail();
+
+    utc_check_eq(EventLoopStart(), utc_blink_ewk_base::Success);
+}
+
+/**
+ * @brief Tests "load,finished" callback with ewk_view_url_set http protocol
+ */
+TEST_F(utc_blink_cb_load_finished, url_set_http)
+{
+    utc_message("Loading url: %s", URL);
+    Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+    if (!result)
+        utc_fail();
+
+    utc_check_eq(EventLoopStart(), utc_blink_ewk_base::Success);
+}
+
+/**
+ * @brief Tests "load,finished" callback with ewk_view_urls_set local file
+ */
+TEST_F(utc_blink_cb_load_finished, url_set_file)
+{
+    std::string resource_url = GetResourceUrl("common/sample.html");
+    utc_message("Loading file: %s", resource_url.c_str());
+    Eina_Bool result = ewk_view_url_set(GetEwkWebView(), resource_url.c_str());
+
+    if (!result)
+        utc_fail();
+
+    utc_check_eq(EventLoopStart(), utc_blink_ewk_base::Success);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_load_progress.cpp b/tizen_src/ewk/unittest/utc_blink_cb_load_progress.cpp
new file mode 100644 (file)
index 0000000..32e27d6
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_load_progress : public utc_blink_ewk_base
+{
+  public:
+    utc_blink_cb_load_progress()
+    {
+    }
+
+    ~utc_blink_cb_load_progress()
+    {
+    }
+
+    /* Callback for "load,progress" */
+    void LoadProgress(Evas_Object* webview, double progress)
+    {
+      ewk_view_stop(GetEwkWebView());
+      EventLoopStop(utc_blink_ewk_base::Success);
+    }
+};
+
+/**
+ *  * @brief Tests "load,progress" callback
+ */
+TEST_F(utc_blink_cb_load_progress, callback)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+  if (!result)
+    utc_fail();
+
+  utc_check_eq(EventLoopStart(), utc_blink_ewk_base::Success);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_load_progress_finished.cpp b/tizen_src/ewk/unittest/utc_blink_cb_load_progress_finished.cpp
new file mode 100644 (file)
index 0000000..aa47a32
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_load_progress_finished : public utc_blink_ewk_base
+{
+  public:
+    void LoadProgressFinished(Evas_Object* webview)
+    {
+        EventLoopStop(utc_blink_ewk_base::Success);
+    }
+};
+
+/**
+ *  * @brief Tests "load,progress,finished" callback
+ */
+TEST_F(utc_blink_cb_load_progress_finished, callback)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+  if (!result)
+      utc_fail();
+
+  utc_check_eq(EventLoopStart(), utc_blink_ewk_base::Success);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_load_progress_started.cpp b/tizen_src/ewk/unittest/utc_blink_cb_load_progress_started.cpp
new file mode 100644 (file)
index 0000000..5eb21c2
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_load_progress_started : public utc_blink_ewk_base
+{
+  protected:
+
+  void LoadProgressStarted(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+};
+
+/**
+ * @brief Tests "load,progress,started" callback
+ */
+TEST_F(utc_blink_cb_load_progress_started, callback)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), URL));
+  EXPECT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_load_started.cpp b/tizen_src/ewk/unittest/utc_blink_cb_load_started.cpp
new file mode 100644 (file)
index 0000000..fab23ad
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_load_started : public utc_blink_ewk_base
+{
+protected:
+
+  void LoadStarted(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+};
+
+/**
+ * @brief Tests "load,started" callback
+ */
+TEST_F(utc_blink_cb_load_started, callback)
+{
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), URL));
+    EXPECT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_magnifier_hide.cpp b/tizen_src/ewk/unittest/utc_blink_cb_magnifier_hide.cpp
new file mode 100644 (file)
index 0000000..cba996b
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_magnifier_hide : public utc_blink_ewk_base
+{
+public:
+    /* Callback for "load,finished" */
+    void LoadFinished(Evas_Object* webview)
+    {
+        EventLoopStop(utc_blink_ewk_base::Success);
+    }
+
+    void PostSetUp()
+    {
+      evas_object_smart_callback_add(GetEwkWebView(), "magnifier,show", magnifier_show_cb, this);
+      evas_object_smart_callback_add(GetEwkWebView(), "magnifier,hide", magnifier_hide_cb, this);
+    }
+
+    void PreTearDown()
+    {
+      evas_object_smart_callback_del(GetEwkWebView(), "magnifier,show", magnifier_show_cb);
+      evas_object_smart_callback_del(GetEwkWebView(), "magnifier,hide", magnifier_hide_cb);
+    }
+
+    static void magnifier_show_cb(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_blink_cb_magnifier_hide *owner = NULL;
+      OwnerFromVoid(data, &owner);
+      Ewk_View_Smart_Data* ewk_smart_data = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(owner->GetEwkWebView()));
+      ewk_smart_data->api->text_selection_up(ewk_smart_data, 10, 10);
+    }
+
+    static void magnifier_hide_cb(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_blink_cb_magnifier_hide *owner = NULL;
+      OwnerFromVoid(data, &owner);
+      owner->EventLoopStop(Success);
+    }
+
+    static Eina_Bool do_text_selection_down(void* data)
+    {
+      utc_blink_cb_magnifier_hide *owner = NULL;
+      OwnerFromVoid(data, &owner);
+      Ewk_View_Smart_Data* ewk_smart_data = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(owner->GetEwkWebView()));
+      ewk_smart_data->api->text_selection_down(ewk_smart_data, 10, 10);
+      return ECORE_CALLBACK_CANCEL;
+    }
+};
+
+/**
+ * @brief Tests "magnifier,hide" callback
+ */
+TEST_F(utc_blink_cb_magnifier_hide, callback)
+{
+    utc_message("Loading url: %s", URL);
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), URL));
+    ASSERT_EQ(Success, EventLoopStart());
+
+    ecore_timer_add(1.0, do_text_selection_down, this);
+    ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_magnifier_show.cpp b/tizen_src/ewk/unittest/utc_blink_cb_magnifier_show.cpp
new file mode 100644 (file)
index 0000000..da6b6d4
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_magnifier_show : public utc_blink_ewk_base
+{
+public:
+    /* Callback for "load,finished" */
+    void LoadFinished(Evas_Object* webview)
+    {
+        EventLoopStop(utc_blink_ewk_base::Success);
+    }
+
+    void PostSetUp()
+    {
+      evas_object_smart_callback_add(GetEwkWebView(), "magnifier,show", magnifier_show_cb, this);
+    }
+
+    void PreTearDown()
+    {
+      evas_object_smart_callback_del(GetEwkWebView(), "magnifier,show", magnifier_show_cb);
+    }
+
+    static void magnifier_show_cb(void* data, Evas_Object* webview, void* event_info)
+    {
+      utc_blink_cb_magnifier_show *owner = NULL;
+      OwnerFromVoid(data, &owner);
+      owner->EventLoopStop(Success);
+    }
+
+    static Eina_Bool do_text_selection_down(void* data)
+    {
+      utc_blink_cb_magnifier_show *owner = NULL;
+      OwnerFromVoid(data, &owner);
+      Ewk_View_Smart_Data* ewk_smart_data = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(owner->GetEwkWebView()));
+      ewk_smart_data->api->text_selection_down(ewk_smart_data, 10, 10);
+      return ECORE_CALLBACK_CANCEL;
+    }
+};
+
+/**
+ * @brief Tests "magnifier,show" callback
+ */
+TEST_F(utc_blink_cb_magnifier_show, callback)
+{
+    utc_message("Loading url: %s", URL);
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), URL));
+
+    ASSERT_EQ(Success, EventLoopStart());
+
+    ecore_timer_add(1.0, do_text_selection_down, this);
+    ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_popup_blocked.cpp b/tizen_src/ewk/unittest/utc_blink_cb_popup_blocked.cpp
new file mode 100644 (file)
index 0000000..22fa22e
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_popup_blocked : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_popup_blocked()
+    : target_uri(NULL)
+  {
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "popup,blocked", ToSmartCallback(popup_blocked_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "popup,blocked", ToSmartCallback(popup_blocked_cb));
+  }
+
+  static void popup_blocked_cb(utc_blink_cb_popup_blocked* owner, Evas_Object*, Eina_Stringshare* uri)
+  {
+    ASSERT_TRUE(owner);
+    owner->target_uri = eina_stringshare_add(uri);
+    owner->EventLoopStop(Success);
+  }
+
+  static void window_open_script_executed(Evas_Object* o, const char* result_value, utc_blink_cb_popup_blocked* owner)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Failure);
+  }
+
+protected:
+  Eina_Stringshare* target_uri;
+};
+
+/**
+ * @brief Tests "popup,blocked" callback
+ *
+ * By default chromium-efl will block all window.open JS requests that were not produced by "user gesture"
+ */
+TEST_F(utc_blink_cb_popup_blocked, callback)
+{
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body onload=\"window.open('http://www.google.com/')\"></body>"
+                      "</html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ("http://www.google.com/", target_uri);
+
+  // ewk_view_script_execute works like "user gesture" so window.open should not be blocked
+  ASSERT_EQ(EINA_TRUE, ewk_view_script_execute(GetEwkWebView(), "window.open('http://www.google.com/');", reinterpret_cast<Ewk_View_Script_Execute_Cb>(window_open_script_executed), this));
+  ASSERT_EQ(Failure, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_isregistered.cpp b/tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_isregistered.cpp
new file mode 100644 (file)
index 0000000..86a407d
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_protocolhandler_isregistered : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_protocolhandler_isregistered()
+    : handler_target_(NULL)
+    , handler_base_url_(NULL)
+    , handler_url_(NULL)
+    , handler_title_(NULL)
+  {}
+
+  ~utc_blink_cb_protocolhandler_isregistered()
+  {
+    if (handler_target_) free(handler_target_);
+    if (handler_base_url_) free(handler_base_url_);
+    if (handler_url_) free(handler_url_);
+    if (handler_title_) free(handler_title_);
+  }
+
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Failure);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "protocolhandler,isregistered", cb_protocolhandler_isregistered, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "protocolhandler,isregistered", cb_protocolhandler_isregistered);
+  }
+
+  static void cb_protocolhandler_isregistered(void *data, Evas_Object *, void *info)
+  {
+    ASSERT_TRUE(data != NULL);
+    utc_message("is protocol handler registered");
+    utc_blink_cb_protocolhandler_isregistered *owner;
+    OwnerFromVoid(data, &owner);
+    EXPECT_TRUE(info);
+    Ewk_Custom_Handlers_Data *handler_data_ = static_cast<Ewk_Custom_Handlers_Data *>(info);
+    owner->handler_target_ = ewk_custom_handlers_data_target_get(handler_data_) ? strdup(ewk_custom_handlers_data_target_get(handler_data_)) : 0;
+    owner->handler_base_url_ = ewk_custom_handlers_data_base_url_get(handler_data_) ? strdup(ewk_custom_handlers_data_base_url_get(handler_data_)) : 0;
+    owner->handler_url_ = ewk_custom_handlers_data_url_get(handler_data_) ? strdup(ewk_custom_handlers_data_url_get(handler_data_)) : 0;
+    owner->handler_title_ = ewk_custom_handlers_data_title_get(handler_data_) ? strdup(ewk_custom_handlers_data_title_get(handler_data_)) : 0;
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  char *handler_target_;
+  char *handler_base_url_;
+  char *handler_url_;
+  char *handler_title_;
+
+  static const char * const TARGET;
+  static const char * const BASE_URL;
+  static const char * const URL;
+};
+
+const char * const utc_blink_cb_protocolhandler_isregistered::TARGET = "mailto";
+const char * const utc_blink_cb_protocolhandler_isregistered::BASE_URL = "file:///";
+const char * const utc_blink_cb_protocolhandler_isregistered::URL = "file:///opt/usr/resources/protocol_handler/handler.html?url=%s";
+
+TEST_F(utc_blink_cb_protocolhandler_isregistered, MAILTO_PROTOCOL_UNREGISTRATION)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("protocol_handler/is_protocol_handler_registered.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  utc_message("target:   %s", handler_target_);
+  utc_message("base url: %s", handler_base_url_);
+  utc_message("url:      %s", handler_url_);
+  utc_message("title:    %s", handler_title_);
+  ASSERT_STREQ(TARGET, handler_target_);
+  ASSERT_STREQ(BASE_URL, handler_base_url_);
+  ASSERT_STREQ(URL, handler_url_);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_registration_requested.cpp b/tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_registration_requested.cpp
new file mode 100644 (file)
index 0000000..dea8689
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_protocolhandler_registration_requested : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_protocolhandler_registration_requested()
+    : handler_target_(NULL)
+    , handler_base_url_(NULL)
+    , handler_url_(NULL)
+    , handler_title_(NULL)
+  {}
+
+  ~utc_blink_cb_protocolhandler_registration_requested()
+  {
+    if (handler_target_) free(handler_target_);
+    if (handler_base_url_) free(handler_base_url_);
+    if (handler_url_) free(handler_url_);
+    if (handler_title_) free(handler_title_);
+  }
+
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Failure);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "protocolhandler,registration,requested", cb_protocolhandler_registration_requested, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "protocolhandler,registration,requested", cb_protocolhandler_registration_requested);
+  }
+
+  static void cb_protocolhandler_registration_requested(void *data, Evas_Object *, void *info)
+  {
+    ASSERT_TRUE(data != NULL);
+    utc_message("protocol handler registered");
+    utc_blink_cb_protocolhandler_registration_requested *owner;
+    OwnerFromVoid(data, &owner);
+    EXPECT_TRUE(info);
+    Ewk_Custom_Handlers_Data *handler_data_ = static_cast<Ewk_Custom_Handlers_Data *>(info);
+    owner->handler_target_ = ewk_custom_handlers_data_target_get(handler_data_) ? strdup(ewk_custom_handlers_data_target_get(handler_data_)) : 0;
+    owner->handler_base_url_ = ewk_custom_handlers_data_base_url_get(handler_data_) ? strdup(ewk_custom_handlers_data_base_url_get(handler_data_)) : 0;
+    owner->handler_url_ = ewk_custom_handlers_data_url_get(handler_data_) ? strdup(ewk_custom_handlers_data_url_get(handler_data_)) : 0;
+    owner->handler_title_ = ewk_custom_handlers_data_title_get(handler_data_) ? strdup(ewk_custom_handlers_data_title_get(handler_data_)) : 0;
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  char *handler_target_;
+  char *handler_base_url_;
+  char *handler_url_;
+  char *handler_title_;
+
+  static const char * const TARGET;
+  static const char * const BASE_URL;
+  static const char * const URL;
+  static const char * const TITLE;
+};
+
+const char * const utc_blink_cb_protocolhandler_registration_requested::TARGET = "mailto";
+const char * const utc_blink_cb_protocolhandler_registration_requested::BASE_URL = "file:///";
+const char * const utc_blink_cb_protocolhandler_registration_requested::URL = "file:///opt/usr/resources/protocol_handler/handler.html?url=%s";
+const char * const utc_blink_cb_protocolhandler_registration_requested::TITLE = "EFL-Mail";
+
+TEST_F(utc_blink_cb_protocolhandler_registration_requested, MAILTO_PROTOCOL_REGISTRATION)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("protocol_handler/register_protocol_handler.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ(TARGET, handler_target_);
+  ASSERT_STREQ(BASE_URL, handler_base_url_);
+  ASSERT_STREQ(URL, handler_url_);
+  ASSERT_STREQ(TITLE, handler_title_);
+  utc_message("target:   %s", handler_target_);
+  utc_message("base url: %s", handler_base_url_);
+  utc_message("url:      %s", handler_url_);
+  utc_message("title:    %s", handler_title_);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_unregistration_requested.cpp b/tizen_src/ewk/unittest/utc_blink_cb_protocolhandler_unregistration_requested.cpp
new file mode 100644 (file)
index 0000000..3c94c9b
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_protocolhandler_unregistration_requested : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_protocolhandler_unregistration_requested()
+    : handler_target_(NULL)
+    , handler_base_url_(NULL)
+    , handler_url_(NULL)
+    , handler_title_(NULL)
+  {}
+
+  ~utc_blink_cb_protocolhandler_unregistration_requested()
+  {
+    if (handler_target_) free(handler_target_);
+    if (handler_base_url_) free(handler_base_url_);
+    if (handler_url_) free(handler_url_);
+    if (handler_title_) free(handler_title_);
+  }
+
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Failure);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "protocolhandler,unregistration,requested", cb_protocolhandler_unregistration_requested, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "protocolhandler,unregistration,requested", cb_protocolhandler_unregistration_requested);
+  }
+
+  static void cb_protocolhandler_unregistration_requested(void *data, Evas_Object *, void *info)
+  {
+    ASSERT_TRUE(data != NULL);
+    utc_message("protocol handler unregistered");
+    utc_blink_cb_protocolhandler_unregistration_requested *owner;
+    OwnerFromVoid(data, &owner);
+    EXPECT_TRUE(info);
+    Ewk_Custom_Handlers_Data *handler_data_ = static_cast<Ewk_Custom_Handlers_Data *>(info);
+    owner->handler_target_ = ewk_custom_handlers_data_target_get(handler_data_) ? strdup(ewk_custom_handlers_data_target_get(handler_data_)) : 0;
+    owner->handler_base_url_ = ewk_custom_handlers_data_base_url_get(handler_data_) ? strdup(ewk_custom_handlers_data_base_url_get(handler_data_)) : 0;
+    owner->handler_url_ = ewk_custom_handlers_data_url_get(handler_data_) ? strdup(ewk_custom_handlers_data_url_get(handler_data_)) : 0;
+    owner->handler_title_ = ewk_custom_handlers_data_title_get(handler_data_) ? strdup(ewk_custom_handlers_data_title_get(handler_data_)) : 0;
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  char *handler_target_;
+  char *handler_base_url_;
+  char *handler_url_;
+  char *handler_title_;
+
+  static const char * const TARGET;
+  static const char * const BASE_URL;
+  static const char * const URL;
+};
+
+const char * const utc_blink_cb_protocolhandler_unregistration_requested::TARGET = "mailto";
+const char * const utc_blink_cb_protocolhandler_unregistration_requested::BASE_URL = "file:///";
+const char * const utc_blink_cb_protocolhandler_unregistration_requested::URL = "file:///opt/usr/resources/protocol_handler/handler.html?url=%s";
+
+TEST_F(utc_blink_cb_protocolhandler_unregistration_requested, MAILTO_PROTOCOL_UNREGISTRATION)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("protocol_handler/unregister_protocol_handler.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ(TARGET, handler_target_);
+  ASSERT_STREQ(BASE_URL, handler_base_url_);
+  ASSERT_STREQ(URL, handler_url_);
+  utc_message("target:   %s", handler_target_);
+  utc_message("base url: %s", handler_base_url_);
+  utc_message("url:      %s", handler_url_);
+  utc_message("title:    %s", handler_title_);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_redo_size.cpp b/tizen_src/ewk/unittest/utc_blink_cb_redo_size.cpp
new file mode 100644 (file)
index 0000000..d0ac4f8
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_redo_size : public utc_blink_ewk_base
+{
+ protected:
+
+  utc_blink_cb_redo_size() : size(0)
+  {
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "redo,size", ToSmartCallback(redo_size), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "redo,size", ToSmartCallback(redo_size));
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void undo_size(utc_blink_cb_redo_size* owner, Evas_Object*, const unsigned long*)
+  {
+    ASSERT_TRUE(owner);
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    owner->EventLoopStop(Success);
+  }
+
+  static void redo_size(utc_blink_cb_redo_size* owner, Evas_Object*, const unsigned long* size)
+  {
+    ASSERT_TRUE(owner);
+    utc_message("\e[0;32m[ %s ]\e[0m", __PRETTY_FUNCTION__);
+    if (size) owner->size = *size;
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  unsigned long size;
+};
+
+TEST_F(utc_blink_cb_redo_size, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_view/undo_redo.html").c_str()));
+  // Wait for "redo,size" when initialization a view
+  ASSERT_EQ(Success, EventLoopStart());
+  // Wait for LoadFinished
+  ASSERT_EQ(Success, EventLoopStart());
+
+  {
+    evas_object_smart_callback_auto undo(GetEwkWebView(), "undo,size",
+                                         ToSmartCallback(undo_size), this);
+    for (int i = 3; i > 0; --i) {
+      utc_message("edit");
+      ewk_view_command_execute(GetEwkWebView(),"SelectAll", NULL);
+      ewk_view_command_execute(GetEwkWebView(),"InsertText", ".");
+      // Wait for undo_size callback
+      ASSERT_EQ(Success, EventLoopStart());
+    }
+  }
+  ASSERT_EQ(0, size);
+
+  for (int i = 2; i > 0; --i) {
+    utc_message("undo");
+    ewk_view_command_execute(GetEwkWebView(),"undo", NULL);
+    // Wait for redo_size callback
+    ASSERT_EQ(Success, EventLoopStart());
+  }
+
+  ASSERT_EQ(2, size);
+
+  for (int i = 2; i > 0; --i) {
+    utc_message("redo");
+    ewk_view_command_execute(GetEwkWebView(),"redo", NULL);
+    // Wait for redo_size callback
+    EXPECT_EQ(Success, EventLoopStart());
+  }
+
+  ASSERT_EQ(0, size);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_textselection_mode.cpp b/tizen_src/ewk/unittest/utc_blink_cb_textselection_mode.cpp
new file mode 100644 (file)
index 0000000..594e1ad
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL  ("http://google.com")
+
+class utc_blink_cb_textselection_mode : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_textselection_mode()
+    : state(Unknown)
+  {
+  }
+
+  void PostSetUp()
+  {
+    ASSERT_EQ(Unknown, state);
+    evas_object_smart_callback_add(GetEwkWebView(), "textselection,mode", ToSmartCallback(textselection_mode_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "textselection,mode", ToSmartCallback(textselection_mode_cb));
+  }
+
+  static void textselection_mode_cb(utc_blink_cb_textselection_mode* owner, Evas_Object* webview, bool* data)
+  {
+    ASSERT_TRUE(owner);
+
+    if (data) {
+      owner->state = (*data ? Selected : Unselected);
+      owner->EventLoopStop(Success);
+    }
+
+    EXPECT_TRUE(data);
+    owner->EventLoopStop(Failure);
+  }
+
+protected:
+  enum SelectionState
+  {
+    Unknown,
+    Selected,
+    Unselected
+  };
+
+  SelectionState state;
+};
+
+/**
+ * @brief Tests "load,finished" callback with ewl_view_html_string_load
+ */
+TEST_F(utc_blink_cb_textselection_mode, selection_textarea)
+{
+  char htmlBuffer[] = "<!DOCTYPE html>"
+                      "<html><head>"
+                      "<script>"
+                      "window.onload = function(){"
+                      "var text_area = document.getElementById('txtarea');"
+                      "text_area.focus();"
+                      "text_area.select();}"
+                      "</script></head>"
+                      "<body>"
+                      "<textarea id='txtarea'>select text</textarea>"
+                      "</body></html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(Selected, state);
+  ASSERT_EQ(EINA_TRUE, ewk_view_text_selection_clear(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(Unselected, state);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_title_changed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_title_changed.cpp
new file mode 100644 (file)
index 0000000..06495c2
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define TITLE1 "TestTitle1"
+#define TITLE2 "TestTitle2"
+
+class utc_blink_cb_title_changed : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_cb_title_changed()
+    : changed_title(NULL)
+  {
+  }
+
+  ~utc_blink_cb_title_changed()
+  {
+    free(changed_title);
+    changed_title = NULL;
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // won't fail the test if EventLoopStop was already called
+  }
+
+  static void title_changed_cb(void* data, Evas_Object*, void* eventInfo)
+  {
+    utc_blink_cb_title_changed* owner = NULL;
+    OwnerFromVoid(data, &owner);
+    ASSERT_TRUE(owner);
+
+    free(owner->changed_title);
+    owner->changed_title = NULL;
+
+    if (eventInfo) {
+      char* new_title = static_cast<char*>(eventInfo);
+      owner->changed_title = strdup(new_title);
+    }
+
+    owner->EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed_cb);
+  }
+
+protected:
+  char* changed_title;
+};
+
+/**
+ * @brief Test case for changing non-empty title to other non-empty title
+ */
+TEST_F(utc_blink_cb_title_changed, TITLE_CHANGE)
+{
+  const char textStyleHTML[] =
+          "<html>"
+          "<head><title>" TITLE1 "</title>"
+          "<script>"
+          "window.onload=function(){"
+          "document.title=\"" TITLE2 "\";"
+          "}"
+          "</script>"
+          "</head>"
+          "<body></body>"
+          "</html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ(TITLE1, changed_title);
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ(TITLE2, changed_title);
+}
+
+/**
+ * @brief Test case for loading page with no title set
+ */
+TEST_F(utc_blink_cb_title_changed, NO_TITLE)
+{
+  const char textStyleHTML[] =
+          "<html>"
+          "<head></head>"
+          "<body></body>"
+          "</html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0));
+  // we don't want the callback to be actually called, so the Failure is an expected result
+  ASSERT_EQ(Failure, EventLoopStart());
+}
+
+/**
+ * @brief Test case for changing non-empty title to null title
+ */
+TEST_F(utc_blink_cb_title_changed, NULL_TITLE)
+{
+  const char textStyleHTML[] =
+          "<html>"
+          "<head><title>" TITLE1 "</title>"
+          "<script>"
+          "window.onload=function(){"
+              "document.title=null;"
+          "}"
+          "</script>"
+          "</head>"
+          "<body></body>"
+          "</html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ(TITLE1, changed_title);
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ("", changed_title); // after second change should be empty string
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_undo_size.cpp b/tizen_src/ewk/unittest/utc_blink_cb_undo_size.cpp
new file mode 100644 (file)
index 0000000..a3f6ea0
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_undo_size : public utc_blink_ewk_base
+{
+ protected:
+
+  utc_blink_cb_undo_size() : size(0)
+  {
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "undo,size", ToSmartCallback(undo_size), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "undo,size", ToSmartCallback(undo_size));
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void undo_size(utc_blink_cb_undo_size* owner, Evas_Object*, unsigned long* size)
+  {
+    ASSERT_TRUE(owner);
+    utc_message("\e[0;32m[ %s ]\e[0m", __FUNCTION__);
+    if (size) owner->size=*size;
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  unsigned long size;
+};
+
+TEST_F(utc_blink_cb_undo_size, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_view/undo_redo.html").c_str()));
+  // Wait for LoadFinished
+  ASSERT_EQ(Success, EventLoopStart());
+
+  for (int i = 4; i > 0; --i) {
+    utc_message("edit");
+    ewk_view_command_execute(GetEwkWebView(),"SelectAll", NULL);
+    ewk_view_command_execute(GetEwkWebView(),"InsertText", ".");
+    // Wait for undo_size callback
+    ASSERT_EQ(Success, EventLoopStart());
+  }
+  ASSERT_EQ(3, size);
+
+  utc_message("Undo");
+  ewk_view_command_execute(GetEwkWebView(),"Undo", NULL);
+  // Wait for undo_size callback
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(2, size);
+
+  utc_message("Undo");
+  ewk_view_command_execute(GetEwkWebView(),"Undo", NULL);
+  // Wait for undo_size callback
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(1, size);
+
+  utc_message("Redo");
+  ewk_view_command_execute(GetEwkWebView(),"Redo", NULL);
+  // Wait for undo_size callback
+  EXPECT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(2, size);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_unfocus_direction.cpp b/tizen_src/ewk/unittest/utc_blink_cb_unfocus_direction.cpp
new file mode 100644 (file)
index 0000000..291851e
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_unfocus_direction : public utc_blink_ewk_base
+{
+protected:
+
+  void LoadFinished(Evas_Object*)
+  {
+    evas_object_focus_set(GetEwkWebView(), EINA_TRUE);
+    EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "unfocus,direction", ToSmartCallback(unfocus_direction_cb), this);
+    received_direction = EWK_UNFOCUS_DIRECTION_NONE;
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "unfocus,direction", ToSmartCallback(unfocus_direction_cb));
+  }
+
+  static void unfocus_direction_cb(utc_blink_cb_unfocus_direction* owner, Evas_Object*, Ewk_Unfocus_Direction* direction)
+  {
+    ASSERT_TRUE(owner);
+    if (direction)
+      owner->received_direction = *direction;
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Ewk_Unfocus_Direction received_direction;
+};
+
+/**
+ * @brief Tests unfocus in forward direction
+ */
+TEST_F(utc_blink_cb_unfocus_direction, Unfocus_direction_forward)
+{
+  const char htmlDocument[] =
+        "<html><body><form>"
+        "<input type='text' id='test1'/><br/>"
+        "<input type='text' id='test2' autofocus/><br/>"
+        "</form></body></html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlDocument, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  evas_event_feed_key_down(GetEwkEvas(), "Tab", "Tab", "\t", NULL, 0, NULL);
+  evas_event_feed_key_up(GetEwkEvas(), "Tab", "Tab", "\t", NULL, 0, NULL);
+  ASSERT_EQ(Success, EventLoopStart()) << "Unfocus,direction callback never called";
+  ASSERT_EQ(EWK_UNFOCUS_DIRECTION_FORWARD, received_direction);
+}
+
+/**
+ * @brief Tests unfocus in backward direction
+ */
+TEST_F(utc_blink_cb_unfocus_direction, Unfocus_direction_backward)
+{
+  const char htmlDocument[] =
+        "<html><body><form>"
+        "<input type='text' id='test1' autofocus\><br\>"
+        "<input type='text' id='test2'\><br\>"
+        "</form></body></html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlDocument, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  evas_key_modifier_on(GetEwkEvas(), "Shift");
+  evas_event_feed_key_down(GetEwkEvas(), "Tab", "Tab", "\t", NULL, 0, NULL);
+  evas_event_feed_key_up(GetEwkEvas(), "Tab", "Tab", "\t", NULL, 0, NULL);
+  evas_key_modifier_off(GetEwkEvas(), "Shift");
+  ASSERT_EQ(Success, EventLoopStart()) << "Unfocus,direction callback never called";
+  ASSERT_EQ(EWK_UNFOCUS_DIRECTION_BACKWARD, received_direction);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_uri_changed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_uri_changed.cpp
new file mode 100644 (file)
index 0000000..f2336f9
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_uri_changed : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "uri,changed", uri_changed, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "uri,changed", uri_changed);
+  }
+
+  static void uri_changed(void* data, Evas_Object* webview, void* arg)
+  {
+    ASSERT_TRUE(data != NULL);
+    ASSERT_TRUE(arg != NULL);
+    const char* url = static_cast<char*>(arg);
+
+    utc_message("[uri_changed]\t%s", url);
+    utc_blink_cb_uri_changed* owner = static_cast<utc_blink_cb_uri_changed*>(data);
+    if (owner->GetResourceUrl("common/sample.html") == url)
+      owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Tests load page with refresh meta tag.
+ */
+TEST_F(utc_blink_cb_uri_changed, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_view/redirect.html").c_str()));
+  EXPECT_EQ(Success, EventLoopStart()); // Wait for "uri,changed" to .../sample.html
+}
+
+/**
+ * @brief Tests load page without refresh meta tag.
+ */
+TEST_F(utc_blink_cb_uri_changed, NEG_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample_1.html").c_str()));
+  EXPECT_EQ(Failure, EventLoopStart(5)); // Check for not redirect
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_cb_url_changed.cpp b/tizen_src/ewk/unittest/utc_blink_cb_url_changed.cpp
new file mode 100644 (file)
index 0000000..d91ec03
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_cb_url_changed : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "url,changed", url_changed, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "url,changed", url_changed);
+  }
+
+  static void url_changed(void* data, Evas_Object* webview, void* arg)
+  {
+    ASSERT_TRUE(arg != NULL);
+    ASSERT_TRUE(data != NULL);
+    const char*const url = static_cast<char*>(arg);
+    utc_blink_cb_url_changed*const owner = static_cast<utc_blink_cb_url_changed*>(data);
+    utc_message("[url_changed]\t%s", url);
+    if (owner->GetResourceUrl("common/sample.html") == url)
+      owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Tests load page with refresh meta tag.
+ */
+TEST_F(utc_blink_cb_url_changed, Refresh)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_view/redirect.html").c_str()));
+  EXPECT_EQ(Success, EventLoopStart()); // Wait for "url,changed" to .../sample.html
+}
+
+/**
+ * @brief Tests load page without refresh meta tag.
+ */
+TEST_F(utc_blink_cb_url_changed, NoRefresh)
+{
+  ASSERT_TRUE(ewk_view_url_set( GetEwkWebView(), GetResourceUrl("common/sample_1.html").c_str()));
+  EXPECT_EQ(Failure, EventLoopStart(5)); // Check for not redirect to .../sample.html
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_credential_cancel_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_credential_cancel_func.cpp
new file mode 100755 (executable)
index 0000000..79c07f6
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+#define URL "http://reference.vodafone.com/widgets/"
+
+static Eina_Bool is_failed;
+static Eina_Bool is_Authenticated;
+
+class utc_blink_ewk_auth_challenge_credential_cancel : public utc_blink_ewk_base {
+protected:
+    void PostSetUp() {
+        evas_object_smart_callback_add(GetEwkWebView(), "authentication,challenge", authentication_challenge, this);
+    }
+
+    void PreTearDown() {
+        evas_object_smart_callback_del(GetEwkWebView(), "authentication,challenge", authentication_challenge);
+    }
+
+    void LoadFinished(Evas_Object* webview)
+    {
+        EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+    }
+
+    static void authentication_challenge(void* data, Evas_Object* webview, void* event_info)
+    {
+        utc_blink_ewk_auth_challenge_credential_cancel *owner = static_cast<utc_blink_ewk_auth_challenge_credential_cancel*>(data);
+        utc_message("[authentication_challenge] :: ");
+
+        Ewk_Auth_Challenge* auth_challenge = (Ewk_Auth_Challenge*)event_info;
+        if (!auth_challenge) {
+            owner->EventLoopStop(utc_blink_ewk_base::Failure);
+            return;
+        }
+
+        const char* realm = ewk_auth_challenge_realm_get(auth_challenge);
+        const char* url = ewk_auth_challenge_url_get(auth_challenge);
+
+        if (!realm || !url) {
+            owner->EventLoopStop(utc_blink_ewk_base::Failure);
+            return;
+        }
+
+        // TODO: invalid test
+        // this test does not check if cancel was successful. It checks if authentication,challange was called
+        ewk_auth_challenge_credential_cancel(auth_challenge);
+        owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+};
+
+/**
+  * @brief Checking whether sending cancellation notification for authentication challenge works properly.
+  */
+TEST_F(utc_blink_ewk_auth_challenge_credential_cancel, POS_TEST)
+{
+    is_failed = EINA_FALSE;
+    is_Authenticated = EINA_FALSE;
+
+    Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+    if (!result)
+        FAIL();
+
+    utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+    if (main_result != utc_blink_ewk_base::Success)
+        FAIL();
+
+    evas_object_show(GetEwkWebView());
+    evas_object_show(GetEwkWindow());
+}
+
+// TODO: this case does nothing. It didn't even start event loop, so callback wouldn't be ever called.
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+/*
+TEST_F(utc_blink_ewk_auth_challenge_credential_cancel, NEG_TEST)
+{
+    Eina_Bool result = ewk_view_url_set(NULL, URL);
+    if (result)
+        FAIL();
+
+    utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart(15.0);
+    evas_object_show(GetEwkWebView());
+    evas_object_show(GetEwkWindow());
+
+
+
+    EXPECT_NE(main_result, utc_blink_ewk_base::Success);
+}
+*/
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_credential_use_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_credential_use_func.cpp
new file mode 100755 (executable)
index 0000000..f9ca8e3
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL "http://reference.vodafone.com/widgets/"
+
+class utc_blink_ewk_auth_challenge_credential_use : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add( GetEwkWebView(), "authentication,challenge", authentication_challenge, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del( GetEwkWebView(), "authentication,challenge", authentication_challenge);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop( utc_blink_ewk_base::Failure ); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void authentication_challenge(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[authentication_challenge] :: ");
+    utc_blink_ewk_auth_challenge_credential_use *owner = static_cast<utc_blink_ewk_auth_challenge_credential_use*>(data);
+
+    Ewk_Auth_Challenge* auth_challenge = (Ewk_Auth_Challenge*)event_info;
+    if (!auth_challenge) {
+      owner->EventLoopStop( utc_blink_ewk_base::Failure ); // will noop if EventLoopStop was alraedy called
+      utc_fail();
+    }
+
+    const char* realm = ewk_auth_challenge_realm_get(auth_challenge);
+    const char* url = ewk_auth_challenge_url_get(auth_challenge);
+    if (!realm || !url) {
+      owner->EventLoopStop( utc_blink_ewk_base::Failure ); // will noop if EventLoopStop was alraedy called
+      utc_fail();
+    }
+
+    const char* user = "access";
+    const char* password = "early";
+    ewk_auth_challenge_credential_use(auth_challenge, user, password);
+    owner->EventLoopStop( utc_blink_ewk_base::Success );
+    // TODO
+    // Here is a logical error because success is called a question about authorization,
+    // not about the result of the authorization.
+    // In the casete of re-call up the callback should be return failuare
+  }
+};
+
+  /**
+  * @brief Checking whether sending cancellation notification for authentication challenge works properly.
+  */
+TEST_F(utc_blink_ewk_auth_challenge_credential_use, POS_TEST)
+{
+  utc_check_true( ewk_view_url_set( GetEwkWebView(), URL));
+
+  utc_check_eq( EventLoopStart(), utc_blink_ewk_base::Success);
+
+  evas_object_show( GetEwkWebView());
+  evas_object_show( GetEwkWindow());
+}
+
+  /**
+  * @brief Checking whether function works properly in case of NULL of a webview.
+  */
+TEST_F(utc_blink_ewk_auth_challenge_credential_use, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_url_set( NULL, URL);
+
+  if (result) {
+    utc_fail();
+  }
+
+  evas_object_show( GetEwkWebView());
+  evas_object_show( GetEwkWindow());
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_realm_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_realm_get_func.cpp
new file mode 100755 (executable)
index 0000000..37b33a9
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_auth_challenge_realm_get : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "authentication,challenge", authentication_challenge, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "authentication,challenge", authentication_challenge);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop( utc_blink_ewk_base::Failure ); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void authentication_challenge(void* data, Evas_Object* webview, void* event_info)
+  {
+    ASSERT_TRUE(data != NULL);
+
+    utc_blink_ewk_auth_challenge_realm_get *owner = static_cast<utc_blink_ewk_auth_challenge_realm_get*>(data);
+
+    Ewk_Auth_Challenge* auth_challenge = static_cast<Ewk_Auth_Challenge*>(event_info);
+
+    if(auth_challenge)
+    {
+      std::string realm = ewk_auth_challenge_realm_get(auth_challenge);
+      if( realm == "Widget TestCases EARLY ACCESS" ) {
+
+          owner->EventLoopStop(utc_blink_ewk_base::Success);
+          return;
+      }
+    }
+    owner->EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+};
+
+/**
+ * @brief Checking whether the realm of authentication challenge is returned properly.
+ */
+TEST_F(utc_blink_ewk_auth_challenge_realm_get, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), "http://reference.vodafone.com/widgets/"));
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_auth_challenge_realm_get, NEG_TEST)
+{
+  ASSERT_FALSE(ewk_view_url_set(NULL, "http://reference.vodafone.com/widgets/"));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_auth_challenge_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..2f68f1b
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_auth_challenge_suspend : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "authentication,challenge", authentication_challenge, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "authentication,challenge", authentication_challenge);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop( utc_blink_ewk_base::Failure ); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void authentication_challenge(void* data, Evas_Object* webview, void* event_info)
+  {
+    ASSERT_TRUE(data != NULL);
+
+    utc_blink_ewk_auth_challenge_suspend *owner = static_cast<utc_blink_ewk_auth_challenge_suspend*>(data);
+
+    Ewk_Auth_Challenge* auth_challenge = static_cast<Ewk_Auth_Challenge*>(event_info);
+
+    if(auth_challenge)
+    {
+      ewk_auth_challenge_suspend(auth_challenge);
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+      return;
+    }
+
+    owner->EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+};
+
+/**
+ * @brief Checking whether the suspend of authentication challenge works properly.
+ */
+TEST_F(utc_blink_ewk_auth_challenge_suspend, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://reference.vodafone.com/widgets/"));
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_auth_challenge_suspend, NEG_TEST)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_view_url_set(NULL,"http://reference.vodafone.com/widgets/"));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_data_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_data_get_func.cpp
new file mode 100644 (file)
index 0000000..44d04d4
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <string>
+
+#include "utc_blink_ewk_base.h"
+
+#include "ewk_autofill_profile.h"
+
+class utc_blink_ewk_autofill_profile_data_get : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_autofill_profile_data_get() : m_profileName("MyProfile")
+  {
+    m_profile = ewk_autofill_profile_new();
+  }
+
+  virtual ~utc_blink_ewk_autofill_profile_data_get()
+  {
+    ewk_autofill_profile_delete(m_profile);
+  }
+
+  const std::string m_profileName;
+  Ewk_Autofill_Profile* m_profile;
+};
+
+TEST_F(utc_blink_ewk_autofill_profile_data_get, POS_TEST)
+{
+  ASSERT_TRUE(m_profile != NULL);
+
+  ewk_autofill_profile_data_set(m_profile, EWK_PROFILE_NAME,
+      m_profileName.c_str());
+
+  const std::string result(ewk_autofill_profile_data_get(m_profile,
+      EWK_PROFILE_NAME));
+
+  ASSERT_TRUE(result.compare(m_profileName) == 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_data_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_data_set_func.cpp
new file mode 100644 (file)
index 0000000..6816dcb
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <string>
+
+#include "utc_blink_ewk_base.h"
+
+#include "ewk_autofill_profile.h"
+
+class utc_blink_ewk_autofill_profile_data_set : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_autofill_profile_data_set()
+  {
+    m_profile = ewk_autofill_profile_new();
+  }
+
+  virtual ~utc_blink_ewk_autofill_profile_data_set()
+  {
+    ewk_autofill_profile_delete(m_profile);
+  }
+
+  Ewk_Autofill_Profile* m_profile;
+};
+
+TEST_F(utc_blink_ewk_autofill_profile_data_set, POS_TEST)
+{
+  ASSERT_TRUE(m_profile != NULL);
+  const std::string m_profileName("MyProfile");
+
+  ewk_autofill_profile_data_set(m_profile, EWK_PROFILE_NAME,
+      m_profileName.c_str());
+
+  const std::string result(ewk_autofill_profile_data_get(m_profile,
+      EWK_PROFILE_NAME));
+
+  ASSERT_TRUE(result.compare(m_profileName) == 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_delete_func.cpp
new file mode 100644 (file)
index 0000000..f1705a3
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#include "ewk_autofill_profile.h"
+
+class utc_blink_ewk_autofill_profile_delete : public utc_blink_ewk_base
+{
+};
+
+/* No way to check if delete function worked without access to
+ewk_autofill_profile_private.h
+*/
+
+TEST_F(utc_blink_ewk_autofill_profile_delete, POS_TEST)
+{
+  Ewk_Autofill_Profile* mProfile = ewk_autofill_profile_new();
+  ewk_autofill_profile_delete(mProfile);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_id_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_id_get_func.cpp
new file mode 100644 (file)
index 0000000..e385218
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#include "ewk_autofill_profile.h"
+
+class utc_blink_ewk_autofill_profile_id_get : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_autofill_profile_id_get()
+  {
+    m_profile = ewk_autofill_profile_new();
+  }
+
+  virtual ~utc_blink_ewk_autofill_profile_id_get()
+  {
+    ewk_autofill_profile_delete(m_profile);
+  }
+
+  Ewk_Autofill_Profile* m_profile;
+};
+
+TEST_F(utc_blink_ewk_autofill_profile_id_get, POS_TEST)
+{
+  unsigned id = ewk_autofill_profile_id_get(m_profile);
+  /* There is no way to set value of id. Default value set by constructor
+   * is 0 and the only way to test ewk_autofill_profile_id_get is check if
+   * returns this default value.
+   */
+  ASSERT_EQ(0, id);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_new_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_new_func.cpp
new file mode 100644 (file)
index 0000000..59155ad
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#include "ewk_autofill_profile.h"
+
+class utc_blink_ewk_autofill_profile_new : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_autofill_profile_new, POS_TEST)
+{
+  Ewk_Autofill_Profile* profile = ewk_autofill_profile_new();
+  ASSERT_TRUE(profile != NULL);
+
+  ewk_autofill_profile_delete(profile);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_base.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_base.cpp
new file mode 100644 (file)
index 0000000..b3c75c2
--- /dev/null
@@ -0,0 +1,295 @@
+/**
+ * @file   utc_blink_ewk_base.cpp
+ * @author Kamil Klimek <k.klimek@partner.samsung.com>
+ * @date   2014-03-03
+ * @brief  A Source file to be used by all unit test cases for Chromium EFL API
+ *
+ * This header file contains a common content for unit test cases, i.e.:
+ * it includes useful header files, defines shared object pointers,
+ * useful macros, functions and enumeration types.
+ */
+
+#include "utc_blink_ewk_base.h"
+
+utc_blink_ewk_base::utc_blink_ewk_base()
+    : ::testing::Test()
+    , timeout(NULL)
+    , main_loop_running(false)
+    , main_loop_result(utc_blink_ewk_base::NoOp)
+    , log_javascript(true)
+    , ewk_window(NULL)
+    , ewk_evas(NULL)
+    , ewk_background(NULL)
+    , ewk_webview(NULL)
+    , ewk_context(NULL)
+    , resource_dir(NULL)
+{
+    char *env_dir = getenv("UTC_RESOURCE_PATH");
+
+    if (env_dir) {
+        resource_dir = strdup(env_dir);
+    } else {
+        resource_dir = strdup("/opt/usr/resources");
+    }
+}
+
+utc_blink_ewk_base::~utc_blink_ewk_base()
+{
+    if (timeout) {
+        ecore_timer_del(timeout);
+        timeout = NULL;
+    }
+
+    free(resource_dir);
+}
+
+std::string utc_blink_ewk_base::GetResourcePath(const char* resource_path) const
+{
+    std::string retval = resource_dir;
+    retval.append("/");
+    retval.append(resource_path);
+
+    return retval;
+}
+
+std::string utc_blink_ewk_base::GetResourceUrl(const char* resource_path) const
+{
+    std::string retval("file://");
+    retval.append(GetResourcePath(resource_path));
+    return retval;
+}
+
+utc_blink_ewk_base::MainLoopResult utc_blink_ewk_base::EventLoopStart(double max_time)
+{
+    utc_blink_ewk_base::MainLoopResult retval = utc_blink_ewk_base::NoOp;
+
+    if (!main_loop_running) {
+        main_loop_result = utc_blink_ewk_base::NoOp;
+
+        utc_message("[EventLoopStart] :: timeout: %f", max_time);
+        main_loop_running = true;
+        timeout = ecore_timer_add(max_time, timeout_cb, this);
+        ecore_main_loop_begin();
+
+        if (timeout) {
+          ecore_timer_del(timeout);
+          timeout = NULL;
+        }
+
+        main_loop_running = false;
+        retval = main_loop_result;
+    }
+
+    return retval;
+}
+
+bool utc_blink_ewk_base::EventLoopWait(double time)
+{
+    if (!main_loop_running) {
+        utc_message("[EventLoopWait] :: time %f", time);
+        main_loop_running = true;
+        timeout = ecore_timer_add(time, timeout_cb_event_loop_wait, this);
+
+        ecore_main_loop_begin();
+
+        if (timeout) {
+          ecore_timer_del(timeout);
+          timeout = NULL;
+        }
+
+        main_loop_running = false;
+        return true;
+    }
+
+    return false;
+}
+
+bool utc_blink_ewk_base::EventLoopStop(utc_blink_ewk_base::MainLoopResult result)
+{
+    if (main_loop_running && result != utc_blink_ewk_base::NoOp ) {
+        utc_message("[EventLoopStop] :: Setting result to: %s", (result == utc_blink_ewk_base::Success ? "Success" : "Failure"));
+        main_loop_running = false;
+        main_loop_result = result;
+        ecore_main_loop_quit();
+        return true;
+    }
+
+    return false;
+}
+
+void utc_blink_ewk_base::SetUp()
+{
+    PreSetUp();
+
+    EwkInit();
+
+    evas_object_smart_callback_add(ewk_webview, "load,started", load_started_cb, this);
+    evas_object_smart_callback_add(ewk_webview, "load,finished", load_finished_cb, this);
+    evas_object_smart_callback_add(ewk_webview, "load,error", load_error_cb, this);
+    evas_object_smart_callback_add(ewk_webview, "load,progress", load_progress_cb, this);
+    evas_object_smart_callback_add(ewk_webview, "load,progress,started", load_progress_started_cb, this);
+    evas_object_smart_callback_add(ewk_webview, "load,progress,finished", load_progress_finished_cb, this);
+    evas_object_smart_callback_add(ewk_webview, "console,message", console_message_logger_cb, this);
+
+    PostSetUp();
+}
+
+void utc_blink_ewk_base::TearDown()
+{
+    PreTearDown();
+
+    evas_object_smart_callback_del(ewk_webview, "load,started", load_started_cb);
+    evas_object_smart_callback_del(ewk_webview, "load,finished", load_finished_cb);
+    evas_object_smart_callback_del(ewk_webview, "load,error", load_error_cb);
+    evas_object_smart_callback_del(ewk_webview, "load,progress", load_progress_cb);
+    evas_object_smart_callback_del(ewk_webview, "load,progress,started", load_progress_started_cb);
+    evas_object_smart_callback_del(ewk_webview, "load,progress,finished", load_progress_finished_cb);
+    evas_object_smart_callback_del(ewk_webview, "console,message", console_message_logger_cb);
+
+    EwkDeinit();
+
+    PostTearDown();
+}
+
+void utc_blink_ewk_base::load_started_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_message("[load,started] :: data: %p, webview: %p, event_info: %p", data, webview, event_info);
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    ut->LoadStarted(webview);
+}
+
+void utc_blink_ewk_base::load_finished_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_message("[load,finished] :: data: %p, webview: %p, event_info: %p", data, webview, event_info);
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    ut->LoadFinished(webview);
+}
+
+void utc_blink_ewk_base::load_error_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_message("[load,error] :: data: %p, webview: %p, event_info: %p", data, webview, event_info);
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    Ewk_Error *err = static_cast<Ewk_Error *>(event_info);
+
+    if(!ut->LoadError(webview, err)) {
+        utc_message("[load,error] :: not handled by test, stopping main loop with Failure");
+        ut->EventLoopStop(utc_blink_ewk_base::Failure);
+    }
+}
+
+void utc_blink_ewk_base::load_progress_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_message("[load,progress] :: data: %p, webview: %p, event_info: %p", data, webview, event_info);
+    double progress = -1.0;
+    if (event_info) {
+        progress = *((double*)event_info);
+    }
+
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    ut->LoadProgress(webview, progress);
+}
+
+void utc_blink_ewk_base::load_progress_started_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_message("[load,progress,started] :: data: %p, webview: %p, event_info: %p", data, webview, event_info);
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    ut->LoadProgressStarted(webview);
+}
+
+void utc_blink_ewk_base::load_progress_finished_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_message("[load,progress,finished] :: data: %p, webview: %p, event_info: %p", data, webview, event_info);
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    ut->LoadProgressFinished(webview);
+}
+
+void utc_blink_ewk_base::console_message_logger_cb(void* data, Evas_Object* webview, void* event_info)
+{
+  if (data && event_info) {
+    utc_blink_ewk_base* owner = static_cast<utc_blink_ewk_base*>(data);
+
+    if (owner->log_javascript && owner->ewk_webview == webview) {
+      Ewk_Console_Message* console = static_cast<Ewk_Console_Message*>(event_info);
+      const char *msg = ewk_console_message_text_get(console);
+
+      if (msg) {
+        utc_message("JavaScript::console (%p): %s", webview, msg);
+      } else {
+        utc_message("JavaScript::console (%p) ERROR: NULL messsage", webview);
+      }
+    }
+  }
+}
+
+Eina_Bool utc_blink_ewk_base::timeout_cb(void *data)
+{
+    utc_message("[timeout] :: data: %p", data);
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+
+    if (!ut->TimeOut()) {
+        utc_message("[timeout] :: not handled by test, stopping main loop with Failure");
+        ut->EventLoopStop(utc_blink_ewk_base::Failure);
+    }
+
+    ut->timeout = NULL;
+    return ECORE_CALLBACK_CANCEL;
+}
+
+Eina_Bool utc_blink_ewk_base::timeout_cb_event_loop_wait(void *data)
+{
+    utc_blink_ewk_base *ut = static_cast<utc_blink_ewk_base*>(data);
+    ecore_main_loop_quit();
+    ut->timeout = NULL;
+    return ECORE_CALLBACK_CANCEL;
+}
+
+void utc_blink_ewk_base::EwkInit()
+{
+    /* 1. Standard TETware test initialization message */
+    utc_message("[[ TET_MSG ]]:: ============ Startup ============");
+
+    ewk_window = elm_win_add(NULL, "TC Launcher", ELM_WIN_BASIC);
+    elm_win_title_set(ewk_window, "TC Launcher");
+    ewk_evas = evas_object_evas_get(ewk_window);
+
+    ewk_background = evas_object_rectangle_add(ewk_evas);
+    evas_object_name_set(ewk_background, "view");
+    evas_object_color_set(ewk_background, 255, 0, 255, 255);
+    evas_object_move(ewk_background, 0, 0);
+    evas_object_resize(ewk_background, DEFAULT_WIDTH_OF_WINDOW, DEFAULT_HEIGHT_OF_WINDOW);
+    evas_object_layer_set(ewk_background, EVAS_LAYER_MIN);
+
+    evas_object_show(ewk_background);
+
+    /* 3. Initialization of webview */
+    ewk_context = ewk_context_default_get();
+    ewk_webview = ewk_view_add_with_context(ewk_evas, ewk_context);
+    evas_object_move(ewk_webview, 10, 10);
+    evas_object_resize(ewk_webview, DEFAULT_WIDTH_OF_WINDOW - 20, DEFAULT_HEIGHT_OF_WINDOW - 20);
+
+    evas_object_show(ewk_webview);
+    evas_object_show(ewk_window);
+}
+
+void utc_blink_ewk_base::EwkDeinit()
+{
+    /* 1. Standard TETware test end/cleanup messages */
+    utc_message("[[ TET_MSG ]]:: ============ Cleanup ============");
+
+    /* 2. Freeing resources */
+/*
+    FIXME: This code happen segmentation fault. So, commented out.
+    ewk_context_unref(ewk_context);
+    if (ewk_webview)
+        evas_object_del(ewk_webview);
+
+    if (ewk_window)
+        evas_object_del(ewk_window);
+
+    ewk_window = NULL;
+    ewk_evas = NULL;
+    ewk_background = NULL;
+    ewk_webview = NULL;
+*/
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_base.h b/tizen_src/ewk/unittest/utc_blink_ewk_base.h
new file mode 100644 (file)
index 0000000..63a3c91
--- /dev/null
@@ -0,0 +1,360 @@
+/**
+ * @file   utc_blink_ewk_base.h
+ * @author Kamil Klimek <k.klimek@partner.samsung.com>
+ * @date   2014-02-28
+ * @brief  A header file to be used by all unit test cases for Chromium EFL API
+ *
+ * This header file contains a common content for unit test cases, i.e.:
+ * it includes useful header files, defines shared object pointers,
+ * useful macros, functions and enumeration types.
+ */
+
+
+#ifndef UTC_BLINK_EWK_BASE_H
+#define UTC_BLINK_EWK_BASE_H
+
+/* google test header */
+#include "gtest/gtest.h"
+/* Common headers */
+#include <Ecore_Evas.h>
+#include <Ecore.h>
+#include <Edje.h>
+#include <Eina.h>
+#include <Elementary.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <Evas.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+/* ewk header */
+#include "ewk_auth_challenge.h"
+#include "ewk_certificate.h"
+#include "ewk_console_message.h"
+#include "ewk_context.h"
+#include "ewk_context_menu.h"
+#include "ewk_cookie_manager.h"
+#include "ewk_custom_handlers.h"
+#include "ewk_enums.h"
+#include "ewk_error.h"
+#include "ewk_export.h"
+#include "ewk_geolocation.h"
+#include "ewk_log.h"
+#include "ewk_main.h"
+#include "ewk_notification.h"
+#include "ewk_policy_decision.h"
+#include "ewk_settings.h"
+#include "ewk_touch.h"
+#include "ewk_user_media.h"
+#include "ewk_view.h"
+#include "ewk_hit_test.h"
+#include "ewk_text_style.h"
+#include "ewk_web_application_icon_data.h"
+
+/* Definitions and macros */
+#define DEFAULT_WIDTH_OF_WINDOW 480
+#define DEFAULT_HEIGHT_OF_WINDOW 800
+/* User macros */
+#define utc_message(msg, ...) fprintf(stderr, msg "\n", ##__VA_ARGS__)
+
+/* Compatibility macros only. Please use gtest macros instead. This will be removed. */
+#define utc_check_true(condition) EXPECT_TRUE(condition)
+#define utc_check_false(condition) EXPECT_FALSE(condition)
+#define utc_check_eq(value, needed) EXPECT_EQ(value, needed)
+#define utc_check_ne(value, needed) EXPECT_NE(value, needed)
+#define utc_check_gt(value, needed) EXPECT_GT(value, needed)
+#define utc_check_ge(value, needed) EXPECT_GE(value, needed)
+#define utc_check_lt(value, needed) EXPECT_LT(value, needed)
+#define utc_check_le(value, needed) EXPECT_LE(value, needed)
+#define utc_check_str_eq(value, needed) EXPECT_STREQ(value, needed)
+#define utc_check_str_ne(value, needed) EXPECT_STRNE(value, needed)
+#define utc_assert_eq(value, needed) ASSERT_EQ(value, needed)
+#define utc_assert_ne(value, needed) ASSERT_NE(value, needed)
+#define utc_assert_gt(value, needed) ASSERT_GT(value, needed)
+#define utc_assert_ge(value, needed) ASSERT_GE(value, needed)
+#define utc_assert_lt(value, needed) ASSERT_LT(value, needed)
+#define utc_assert_le(value, needed) ASSERT_LE(value, needed)
+#define utc_assert_str_eq(value, needed) ASSERT_STREQ(value, needed)
+#define utc_assert_str_ne(value, needed) ASSERT_STRNE(value, needed)
+#define utc_pass() SUCCEED()
+#define utc_fail() FAIL()
+
+class utc_blink_ewk_base: public ::testing::Test
+{
+public:
+    enum MainLoopResult {
+      NoOp = 0,
+      Success,
+      Failure,
+      LoadFailure
+    };
+protected:
+    class evas_object_smart_callback_auto
+    {
+    public:
+      evas_object_smart_callback_auto(Evas_Object* obj, const char* event, Evas_Smart_Cb func, const void* data)
+        : obj_(obj)
+        , event_(eina_stringshare_add(event))
+        , func_(func)
+      {
+        evas_object_smart_callback_add(obj, event, func, data);
+      }
+
+      ~evas_object_smart_callback_auto()
+      {
+        evas_object_smart_callback_del(obj_, event_, func_);
+        eina_stringshare_del(event_);
+      }
+
+    private:
+      Evas_Object* obj_;
+      Eina_Stringshare* event_;
+      Evas_Smart_Cb func_;
+    };
+
+    utc_blink_ewk_base();
+    virtual ~utc_blink_ewk_base();
+
+    void SetLogJavascript(bool enabled) { log_javascript = enabled; }
+
+    /**
+     * Generates proper path for resource file
+     *
+     * @param [in] resource_path  resource file subpath
+     *
+     * @retval  full resource path
+     */
+    std::string GetResourcePath(const char* resource_path) const;
+
+    /**
+     * Generates proper url for resource file
+     *
+     * @param [in] resource_path  resource file subpath
+     *
+     * @retval  full resource url including file://
+     */
+    std::string GetResourceUrl(const char* resource_path) const;
+
+    /**
+     * Starts main application loop.
+     *
+     * @param [in] max_time  main loop timeout
+     *
+     * @retval MainLoopResult::NoOp if event loop is already running.
+     *         MainLoopResult::Success if event loop was stopped normally.
+     *         MainLoopResult::Failure if stopped abnormally.
+     */
+    MainLoopResult EventLoopStart(double max_time = 30.0);
+
+    /**
+     * Waits given time on main application loop.
+     *
+     * @params [in] time  time to wait
+     */
+    bool EventLoopWait(double time);
+
+    /**
+     * Stop main application loop.
+     *
+     * @param [in] result  result to be returned by EventLoopStart.
+     *                     if result is MainLoopResult::NoOp this method will do nothing.
+     *
+     * @retval true if this call stopped event loop, false otherwise.
+     *
+     * @note This metod may be called multiple times, but only first call will change
+     *       event loop result. All other calls will do nothing and return false.
+     */
+    bool EventLoopStop(MainLoopResult result);
+
+    /**
+     * Override this method if you need to peform some extra
+     * initialization before initializing ewk.
+     */
+    virtual void PreSetUp() {}
+
+    /**
+     * Override this method if you need to perform some extra
+     * initialization after initializing ewk.
+     */
+    virtual void PostSetUp() {}
+
+    /**
+     * Override this method if you need to perform some extra
+     * deinitialization before deinitializng ewk.
+     */
+    virtual void PreTearDown() {}
+
+    /**
+     * Override this method if you need to perform some extra
+     * deinitialization after deinitialzing ewk.
+     */
+    virtual void PostTearDown() {}
+
+    /**
+     * Called when main application loop timeouted.
+     *
+     * @retval true if timeout was handled by method, false otherwise.
+     *         If method returns false then main application event loop will be stopped with error.
+     */
+    virtual bool TimeOut() { return false; }
+
+    /**
+     * Override this method if you need to handle "load,finished" ewk callback.
+     */
+    virtual void LoadFinished(Evas_Object* webview) {}
+
+    /**
+     * Override this method if you need to handle "load,started" ewk callback.
+     */
+    virtual void LoadStarted(Evas_Object* webview) {}
+
+    /**
+     * Override this method if you need to handle "load,error" ewk callback.
+     *
+     * @retval true if "load,error" was handled by method, false otherwise.
+     *         If method returns false then main application event loop will be stopped with error.
+     */
+    virtual bool LoadError(Evas_Object* webview, Ewk_Error *error) { EventLoopStop(LoadFailure); return false; }
+
+    /**
+     * Override this method if you need to handle "load,progress" ewk callback.
+     */
+    virtual void LoadProgress(Evas_Object* webview, double progress) {}
+
+    /**
+     * Override this method if you need to handle "load,progress,started" ewk callback.
+     */
+    virtual void LoadProgressStarted(Evas_Object* webview) {}
+
+    /**
+     * Override this method if you need to handle "load,progress,finished" ewk callback.
+     */
+    virtual void LoadProgressFinished(Evas_Object* webview) {}
+
+    /**
+     * Performs unit test setup. It calls PreSetUp before default initialization
+     * and PostSetUp after default initialization.
+     *
+     * @note This method should not be overriden.
+     */
+    void SetUp();
+
+    /**
+     * Performs unit test deinitialization. It calls PreTearDown before default deinitialization
+     * and PostTearDown after default deinitialization.
+     *
+     * @note This method should not be overriden.
+     */
+    void TearDown();
+
+    template<class T> static void OwnerFromVoid(void *owner, T** out)
+    {
+      if(out) {
+        *out = static_cast<T*>(owner);
+      }
+    }
+
+    template<typename T> static Evas_Smart_Cb ToSmartCallback(T proc)
+    {
+      return reinterpret_cast<Evas_Smart_Cb>(proc);
+    }
+
+    inline Evas_Object* GetEwkWebView() const { return ewk_webview; }
+    inline Evas_Object* GetEwkWindow() const { return ewk_window; }
+    inline Evas* GetEwkEvas() const { return ewk_evas; }
+
+private:
+    /**
+     * Default "load,started" event callback, will call LoadStarted method
+     *
+     * @see LoadStarted
+     */
+    static void load_started_cb(void* data, Evas_Object* webview, void* event_info);
+
+    /**
+     * Default "load,finished" event callback, will call LoadFinish method
+     *
+     * @see LoadFinished
+     */
+    static void load_finished_cb(void* data, Evas_Object* webview, void* event_info);
+
+    /**
+     * Default "load,error" event callback, will call LoadError method
+     *
+     * @see LoadError
+     */
+    static void load_error_cb(void* data, Evas_Object* webview, void* event_info);
+
+    /**
+     * Default "load,progress" event callback, will call LoadProgress method
+     *
+     * @see LoadProgress
+     */
+    static void load_progress_cb(void* data, Evas_Object* webview, void* event_info);
+
+    /**
+     * Default "load,progress,started" event callback, will call LoadProgressStarted method
+     *
+     * @see LoadProgressStarted
+     */
+    static void load_progress_started_cb(void* data, Evas_Object* webview, void* event_info);
+    /**
+     * Default load,progress,finished" event callback, will call LoadProgressFinished method
+     *
+     * @see LoadProgressFinished
+     */
+    static void load_progress_finished_cb(void* data, Evas_Object* webview, void* event_info);
+
+    /**
+     * Default "console,message" event callback, logs message to console using utc_message
+     */
+    static void console_message_logger_cb(void* data, Evas_Object* webview, void* event_info);
+
+    /**
+     * Default event loop timeout callback, will call TimeOut method
+     *
+     * @see TimeOut
+     */
+    static Eina_Bool timeout_cb(void *data);
+
+    /**
+     * EventLoopWait timeotut callback, will stop event loop
+     */
+    static Eina_Bool timeout_cb_event_loop_wait(void *data);
+
+private:
+    /**
+     * Initializes objects used in the test
+     *
+     * This method is always called in SetUp method.
+     * @see SetUp
+     */
+    void EwkInit();
+
+    /**
+     * Deinitializes and frees resources used during test.
+     *
+     * This method is always called in TearDown method.
+     * @see TearDown
+     */
+    void EwkDeinit();
+
+private:
+    Ecore_Timer *timeout;
+    bool main_loop_running;
+    MainLoopResult main_loop_result;
+
+    bool log_javascript;
+
+    Evas_Object* ewk_window;
+    Evas* ewk_evas;
+    Evas_Object* ewk_background;
+    Evas_Object* ewk_webview;
+    Ewk_Context* ewk_context;
+
+    char *resource_dir;
+};
+
+#endif // UTC_BLINK_EWK_BASE_HUTC_BLINK_EWK_BASE_H
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_allowed_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_allowed_set_func.cpp
new file mode 100755 (executable)
index 0000000..69a5caf
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL "https://www.pcwebshop.co.uk"
+
+class utc_blink_ewk_certificate_policy_decision_allowed_set  : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "request,certificate,confirm", policy_decision, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "request,certificate,confirm", policy_decision);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_decision(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy decision] :: \n");
+    utc_blink_ewk_certificate_policy_decision_allowed_set *owner = static_cast<utc_blink_ewk_certificate_policy_decision_allowed_set*>(data);
+
+    Ewk_Certificate_Policy_Decision* policy = (Ewk_Certificate_Policy_Decision*)event_info;
+
+    if (policy) {
+      ewk_certificate_policy_decision_allowed_set(policy, true);
+      //TODO we need to check here correctness of the API action
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+      return;
+    }
+  }
+};
+
+/**
+* @brief Checking whether sending cancellation notification for authentication challenge works properly.
+*/
+TEST_F(utc_blink_ewk_certificate_policy_decision_allowed_set, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+/*
+//TODO : need to implement properly
+TEST_F(utc_blink_ewk_certificate_policy_decision_allowed_set, NEG_TEST)
+{
+  is_failed = EINA_FALSE;
+  is_Accepted = EINA_FALSE;
+
+  Eina_Bool result = ewk_view_url_set(NULL, URL);
+  if (result)
+    utc_fail();
+
+  result = is_Accepted;
+
+  evas_object_show(test_view.webview);
+  evas_object_show(test_view.window);
+  utc_check_ne(result, EINA_TRUE);
+}
+*/
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_certificate_pem_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_certificate_pem_get_func.cpp
new file mode 100755 (executable)
index 0000000..fcd5f74
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL "https://www.pcwebshop.co.uk"
+
+class utc_blink_ewk_certificate_pem_get : public utc_blink_ewk_base
+{
+
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "request,certificate,confirm", policy_decision, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "request,certificate,confirm", policy_decision);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_decision(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy decision] :: \n");
+    utc_blink_ewk_certificate_pem_get *owner = static_cast<utc_blink_ewk_certificate_pem_get*>(data);
+
+    Ewk_Certificate_Policy_Decision* policy = (Ewk_Certificate_Policy_Decision*)event_info;
+
+    if (policy && ewk_certificate_policy_decision_certificate_pem_get(policy)) {
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+* @brief Checking whether certification request confirmation works properly.
+*/
+TEST_F(utc_blink_ewk_certificate_pem_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+/*  To be implemented
+TEST_F(utc_blink_ewk_certificate_pem_get, NEG_TEST)
+{
+  is_failed = EINA_FALSE;
+  is_Accepted = EINA_FALSE;
+
+  Eina_Bool result = ewk_view_url_set(NULL, URL);
+  if (result)
+    utc_fail();
+
+  result = is_Accepted;
+
+  evas_object_show(test_view.webview);
+  evas_object_show(test_view.window);
+  utc_check_ne(result, EINA_TRUE);
+}
+*/
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..67ecd72
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL "https://www.pcwebshop.co.uk"
+
+class utc_blink_ewk_certificate_policy_decision_suspend  : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "request,certificate,confirm", policy_decision, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "request,certificate,confirm", policy_decision);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_decision(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy decision] :: \n");
+    utc_blink_ewk_certificate_policy_decision_suspend *owner = static_cast<utc_blink_ewk_certificate_policy_decision_suspend*>(data);
+
+    Ewk_Certificate_Policy_Decision* policy = (Ewk_Certificate_Policy_Decision*)event_info;
+
+    if (policy) {
+
+      ewk_certificate_policy_decision_suspend(policy);
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+* @brief Checking whether certification request confirmation works properly.
+*/
+TEST_F(utc_blink_ewk_certificate_policy_decision_suspend, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+/*TODO
+TEST_F(utc_blink_ewk_certificate_policy_decision_suspend, NEG_TEST)
+{
+  is_failed = EINA_FALSE;
+  is_Accepted = EINA_FALSE;
+
+  Eina_Bool result = ewk_view_url_set(NULL, URL);
+  if (result)
+    utc_fail();
+
+  result = is_Accepted;
+
+  evas_object_show(test_view.webview);
+  evas_object_show(test_view.window);
+  utc_check_ne(result, EINA_TRUE);
+}
+*/
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_certificate_policy_decision_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..de7b959
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL "https://www.pcwebshop.co.uk"
+
+class utc_blink_ewk_certificate_url_get  : public utc_blink_ewk_base
+{
+
+ protected:
+
+    void PostSetUp()
+    {
+        evas_object_smart_callback_add(GetEwkWebView(), "request,certificate,confirm", policy_decision, this);
+    }
+
+    void PreTearDown()
+    {
+        evas_object_smart_callback_del(GetEwkWebView(), "request,certificate,confirm", policy_decision);
+    }
+
+    void LoadFinished(Evas_Object* webview)
+    {
+        EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+    }
+
+    static void policy_decision(void* data, Evas_Object* webview, void* event_info)
+    {
+        utc_message("[policy decision] :: \n");
+        utc_blink_ewk_certificate_url_get *owner = static_cast<utc_blink_ewk_certificate_url_get*>(data);
+
+        Ewk_Certificate_Policy_Decision* policy = (Ewk_Certificate_Policy_Decision*)event_info;
+
+        if (policy && ewk_certificate_policy_decision_url_get(policy)) {
+            owner->EventLoopStop(utc_blink_ewk_base::Success);
+        }
+    }
+};
+
+/**
+* @brief Checking whether certification request confirmation works properly.
+*/
+TEST_F(utc_blink_ewk_certificate_url_get, POS_TEST)
+{
+    Eina_Bool result = ewk_view_url_set(GetEwkWebView(), URL);
+
+    if (!result)
+        FAIL();
+
+    utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+    if (main_result != utc_blink_ewk_base::Success)
+        FAIL();
+
+    evas_object_show(GetEwkWebView());
+    evas_object_show(GetEwkWindow());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+/*
+//TODO: should be implemented properly
+TEST_F(utc_blink_ewk_certificate_url_get, NEG_TEST)
+{
+  is_failed = EINA_FALSE;
+  is_Accepted = EINA_FALSE;
+
+  Eina_Bool result = ewk_view_url_set(NULL, URL);
+  if (result)
+    utc_fail();
+
+  result = is_Accepted;
+
+  evas_object_show(test_view.webview);
+  evas_object_show(test_view.window);
+  utc_check_ne(result, EINA_TRUE);
+}
+*/
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_console_message_level_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_console_message_level_get_func.cpp
new file mode 100755 (executable)
index 0000000..9e48f2d
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_LOG_HTML_FILE        ("/ewk_view/console_log.html")
+#define SAMPLE_WARN_HTML_FILE        ("/ewk_view/console_warn.html")
+#define SAMPLE_ERROR_HTML_FILE        ("/ewk_view/console_error.html")
+#define SAMPLE_DEBUG_HTML_FILE        ("/ewk_view/console_debug.html")
+#define SAMPLE_INFO_HTML_FILE        ("/ewk_view/console_info.html")
+
+class utc_blink_ewk_console_message_level_get : public utc_blink_ewk_base
+{
+
+protected:
+
+  int gResult;
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"console,message",console_message_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"console,message",console_message_cb);
+  }
+
+  /* Callback for console message */
+  static void console_message_cb(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[console,message] :: \n");
+    utc_blink_ewk_console_message_level_get* owner = static_cast<utc_blink_ewk_console_message_level_get*>(data);
+
+    Ewk_Console_Message* console = (Ewk_Console_Message*)event_info;
+    if(console) {
+
+      owner->gResult = ewk_console_message_level_get(console);   
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests ewk_console_message_level_get incase Ewk_Console_Message-log message exists
+ */
+TEST_F(utc_blink_ewk_console_message_level_get, POS_TEST1)
+{
+  gResult = -1;
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_LOG_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(gResult, 0);
+}
+
+/**
+ * @brief Tests ewk_console_message_level_get incase Ewk_Console_Message-warning message exists
+ */
+TEST_F(utc_blink_ewk_console_message_level_get, POS_TEST2)
+{
+  gResult = 0;
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_WARN_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(gResult, 1);
+}
+
+/**
+ * @brief Tests ewk_console_message_level_get incase Ewk_Console_Message-error message exists
+ */
+TEST_F(utc_blink_ewk_console_message_level_get, POS_TEST3)
+{
+  gResult = 0;
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_ERROR_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+  
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(gResult, 2);
+}
+
+/**
+ * @brief Tests ewk_console_message_level_get incase Ewk_Console_Message-debug message exists
+ */
+TEST_F(utc_blink_ewk_console_message_level_get, POS_TEST4)
+{
+  gResult = 0;
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_DEBUG_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(gResult, -1);
+}
+
+/**
+ * @brief Tests ewk_console_message_level_get incase Ewk_Console_Message-info message exists
+ */
+TEST_F(utc_blink_ewk_console_message_level_get, POS_TEST5)
+{
+  gResult = -1;
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_INFO_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(gResult, 0);
+}
+
+/**
+ * @brief Tests ewk_console_message_level_get incase Ewk_Console_Message does not exist
+ */
+TEST_F(utc_blink_ewk_console_message_level_get, NEG_TEST)
+{
+  utc_check_eq(ewk_console_message_level_get(NULL), 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_console_message_line_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_console_message_line_get_func.cpp
new file mode 100755 (executable)
index 0000000..3925ba4
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/console_info.html")
+
+class utc_blink_ewk_console_message_line_get : public utc_blink_ewk_base
+{
+
+protected:
+
+  int getResult;
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"console,message",console_message_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"console,message",console_message_cb);
+  }
+
+  /* Callback for console message */
+  static void console_message_cb(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[console,message] :: \n");
+
+    utc_blink_ewk_console_message_line_get* owner = static_cast<utc_blink_ewk_console_message_line_get*>(data);
+
+    Ewk_Console_Message* console = (Ewk_Console_Message*)event_info;
+    if(console) {
+
+      owner->getResult = ewk_console_message_line_get(console);
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests ewk_console_message_line_get incase Ewk_Console_Message exists
+ */
+TEST_F(utc_blink_ewk_console_message_line_get, POS_TEST)
+{
+  getResult = 0;
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(getResult, 5);
+}
+
+/**
+ * @brief Tests ewk_console_message_line_get incase Ewk_Console_Message does not exist
+ */
+TEST_F(utc_blink_ewk_console_message_line_get, NEG_TEST)
+{
+  utc_check_eq(ewk_console_message_line_get(NULL), 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_console_message_source_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_console_message_source_get_func.cpp
new file mode 100755 (executable)
index 0000000..efc5256
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/console_info.html")
+
+class utc_blink_ewk_console_message_source_get : public utc_blink_ewk_base
+{
+ protected:
+
+  std::string getSource;
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"console,message",console_message_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"console,message",console_message_cb);
+  }
+
+  /* Callback for console message */
+  static void console_message_cb(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[console,message] :: \n");
+
+    utc_blink_ewk_console_message_source_get* owner = static_cast<utc_blink_ewk_console_message_source_get*>(data);
+
+    Ewk_Console_Message* console = (Ewk_Console_Message*)event_info;
+    if(console) {
+
+      owner->getSource = ewk_console_message_source_get(console);
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests  ewk_console_message_source_get incase Ewk_Console_Message exists
+ */
+TEST_F(utc_blink_ewk_console_message_source_get, POS_TEST)
+{
+  getSource = '\0';
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_str_eq(getSource.c_str(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+}
+
+/**
+ * @brief Tests ewk_console_message_source_get incase Ewk_Console_Message does not exist
+ */
+TEST_F(utc_blink_ewk_console_message_source_get, NEG_TEST)
+{
+  utc_check_str_eq(NULL, ewk_console_message_source_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_console_message_text_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_console_message_text_get_func.cpp
new file mode 100755 (executable)
index 0000000..6dc427a
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/console_info.html")
+
+class utc_blink_ewk_console_message_text_get : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"console,message",console_message_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"console,message",console_message_cb);
+  }
+
+  /* Callback for console message */
+  static void console_message_cb(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[console,message] :: ");
+
+    utc_blink_ewk_console_message_text_get* owner = static_cast<utc_blink_ewk_console_message_text_get*>(data);
+
+    Ewk_Console_Message* console = (Ewk_Console_Message*)event_info;
+
+    if(console) {
+      owner->getText = ewk_console_message_text_get(console);
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    } else {
+      owner->EventLoopStop(utc_blink_ewk_base::Failure);
+    }
+  }
+
+protected:
+  std::string getText;
+};
+
+/**
+ * @brief Tests ewk_console_message_text_get incase Ewk_Console_Message exists
+ */
+TEST_F(utc_blink_ewk_console_message_text_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_str_eq(getText.c_str(), "info");
+}
+
+/**
+ * @brief Tests ewk_console_message_text_get incase Ewk_Console_Message does not exist
+ */
+TEST_F(utc_blink_ewk_console_message_text_get, NEG_TEST)
+{
+  utc_check_str_eq(NULL, ewk_console_message_text_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_additional_plugin_path_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_additional_plugin_path_set_func.cpp
new file mode 100755 (executable)
index 0000000..b09d2f3
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_additional_plugin_path_set : public utc_blink_ewk_base
+{
+protected:
+  static const char*const plugin;
+};
+
+const char*const utc_blink_ewk_context_additional_plugin_path_set::plugin="/tmp";
+
+/**
+ * @brief Tests if can set additional plugin path.
+ */
+TEST_F(utc_blink_ewk_context_additional_plugin_path_set, POS_TEST)
+{
+  Eina_Bool result = ewk_context_additional_plugin_path_set(ewk_view_context_get(GetEwkWebView()),plugin);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns false which context is null.
+ */
+TEST_F(utc_blink_ewk_context_additional_plugin_path_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_context_additional_plugin_path_set(NULL, NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_delete_all_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_delete_all_func.cpp
new file mode 100644 (file)
index 0000000..13850f1
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+
+class utc_blink_ewk_context_application_cache_delete_all : public utc_blink_ewk_base {
+protected:
+
+  utc_blink_ewk_context_application_cache_delete_all()
+    : ctx(NULL)
+    , origins(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_application_cache_delete_all()
+  {
+    SetOrigins(NULL);
+  }
+
+  void PostSetUp()
+  {
+    utc_message("[postSetUp] :: ");
+    ctx = ewk_view_context_get(GetEwkWebView());
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Success);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("origins_get_cb: %p, %p", origins, user_data);
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_application_cache_delete_all* owner;
+    owner = static_cast<utc_blink_ewk_context_application_cache_delete_all*>(user_data);
+
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("[setOrigins] :: ");
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+      origins = new_origins;
+    }
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    // application cache operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_application_cache_origins_get(ctx, origins_get_cb, this)) {
+        break;
+      }
+
+      if (Success != EventLoopStart()) {
+        break;
+      }
+
+      if (expected_count == eina_list_count(origins)) {
+        break;
+      }
+
+      if (!EventLoopWait(3.0)) {
+        break;
+      }
+    }
+  }
+
+protected:
+  Ewk_Context* ctx;
+  Eina_List* origins;
+  static const char* const appCacheURL;
+  static const char* const appCacheURLOther;
+};
+
+const char* const utc_blink_ewk_context_application_cache_delete_all::appCacheURL = "http://htmlfive.appspot.com/static/stickies.html";
+const char* const utc_blink_ewk_context_application_cache_delete_all::appCacheURLOther = "http://www.w3schools.com/html/tryhtml5_html_manifest.htm";
+
+/**
+* @brief Tests if can delete all application cache.
+*/
+TEST_F(utc_blink_ewk_context_application_cache_delete_all, POS_TEST)
+{
+  // Load page, so all related APIs are initialized
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), "http://www.google.pl"));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // we want empty cache at test start
+  ASSERT_EQ(EINA_TRUE, ewk_context_application_cache_delete_all(ctx));
+  GetOrigins(0);
+  ASSERT_TRUE(origins == NULL);
+  ASSERT_EQ(0, eina_list_count(origins));
+
+  utc_message("set 1st url : %s", appCacheURL);
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), appCacheURL));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  GetOrigins(1);
+  ASSERT_TRUE(origins != NULL);
+  ASSERT_EQ(1, eina_list_count(origins));
+
+  utc_message("set 2nd url : %s", appCacheURLOther);
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), appCacheURLOther));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  GetOrigins(2);
+  ASSERT_TRUE(origins != NULL);
+  ASSERT_EQ(2, eina_list_count(origins));
+
+  ASSERT_EQ(EINA_TRUE, ewk_context_application_cache_delete_all(ctx));
+  GetOrigins(0);
+  ASSERT_EQ(0, eina_list_count(origins));
+
+  // if there are no origins for cache, the "origins" argument passed to callback is NULL
+  ASSERT_TRUE(origins == NULL);
+}
+
+/**
+ * @brief Tests if it returns false which context is null.
+ */
+TEST_F(utc_blink_ewk_context_application_cache_delete_all, NEG_CONTEXT_NULL)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_context_application_cache_delete_all(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_delete_func.cpp
new file mode 100644 (file)
index 0000000..f72366b
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_ORIGIN_HOST "htmlfive.appspot.com"
+#define SAMPLE_ORIGIN_PROTOCOL "http"
+// TODO consider using cache status check - possible implementation left for reference
+class utc_blink_ewk_context_application_cache_delete : public utc_blink_ewk_base {
+
+protected:
+  utc_blink_ewk_context_application_cache_delete()
+    : utc_blink_ewk_base()
+    , ctx_(NULL)
+    , origins_(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_application_cache_delete()
+  {
+    SetOrigins(NULL);
+  }
+
+  void PostSetUp()
+  {
+    ctx_ = ewk_view_context_get(GetEwkWebView());
+    ASSERT_TRUE(ctx_);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[LoadFinished]");
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  Eina_Bool DeleteCache(const char* origin_host, const char* origin_protocol)
+  {
+    utc_message("DeleteCache: %s in %p", origin_host, origins_);
+
+    if (origins_ && origin_host) {
+      Eina_List* it = NULL;
+      void* list_data = NULL;
+      EINA_LIST_FOREACH(origins_, it, list_data) {
+        Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(list_data);
+
+        utc_message("%s, %s", ewk_security_origin_protocol_get(origin), ewk_security_origin_host_get(origin));
+
+        if (!strcmp(ewk_security_origin_protocol_get(origin), origin_protocol) &&
+            !strcmp(ewk_security_origin_host_get(origin), origin_host)) {
+          utc_message("DeleteCache: found origin, deleting");
+          return ewk_context_application_cache_delete(ctx_, origin);
+        }
+      }
+    }
+    return EINA_FALSE;
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    utc_message("[GetOrigins] : expecting count %d", expected_count);
+
+    // delete operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_application_cache_origins_get(ctx_, origins_get_cb, this)) {
+        break;
+      }
+
+      if (Success != EventLoopStart()) {
+        break;
+      }
+
+      int count = eina_list_count(origins_);
+      utc_message("[GetOrigins] : origins count: %d", count);
+      if (expected_count == count) {
+        break;
+      }
+
+      if (!EventLoopWait(3.0)) {
+        break;
+      }
+    }
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("[SetOrigins]");
+    if (new_origins != origins_) {
+      if (origins_) {
+        ewk_context_origins_free(origins_);
+      }
+
+      origins_ = new_origins;
+    }
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("origins_get_cb: %p, %p", origins, user_data);
+    ASSERT_TRUE(user_data);
+
+    utc_blink_ewk_context_application_cache_delete* owner =
+        static_cast<utc_blink_ewk_context_application_cache_delete*>(user_data);
+
+    Eina_List* it = NULL;
+    void* list_data = NULL;
+    EINA_LIST_FOREACH(origins, it, list_data) {
+      Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(list_data);
+
+      utc_message("%s, %s", ewk_security_origin_protocol_get(origin), ewk_security_origin_host_get(origin));
+    }
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const appCacheURL;
+  static const char* const appCacheURLOther;
+
+  Ewk_Context* ctx_;
+  Eina_List* origins_;
+};
+
+const char* const utc_blink_ewk_context_application_cache_delete::appCacheURL = SAMPLE_ORIGIN_PROTOCOL "://" SAMPLE_ORIGIN_HOST "/static/stickies.html";
+const char* const utc_blink_ewk_context_application_cache_delete::appCacheURLOther = "http://www.w3schools.com/html/tryhtml5_html_manifest.htm";
+
+/**
+* @brief Tests if delete application cache is working.
+*/
+TEST_F(utc_blink_ewk_context_application_cache_delete, POS_TEST)
+{
+  // Load page, so all related APIs are initialized
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), "http://www.google.pl"));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // we want empty cache at test start
+  ASSERT_EQ(EINA_TRUE, ewk_context_application_cache_delete_all(ctx_));
+  GetOrigins(0);
+  ASSERT_TRUE(origins_ == NULL);
+  ASSERT_EQ(0, eina_list_count(origins_));
+
+  utc_message("set 1st url : %s", appCacheURL);
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), appCacheURL));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  GetOrigins(1);
+  ASSERT_TRUE(origins_ != NULL);
+  ASSERT_EQ(1, eina_list_count(origins_));
+
+  utc_message("set 2nd url : %s", appCacheURLOther);
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), appCacheURLOther));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  GetOrigins(2);
+  ASSERT_TRUE(origins_ != NULL);
+  ASSERT_EQ(2, eina_list_count(origins_));
+
+  ASSERT_TRUE(DeleteCache(SAMPLE_ORIGIN_HOST, SAMPLE_ORIGIN_PROTOCOL));
+
+  // there should be one origin left; the delete call is asynhronous
+  GetOrigins(1);
+  ASSERT_TRUE(origins_ != NULL);
+  ASSERT_EQ(1, eina_list_count(origins_));
+}
+
+/**
+ * @brief Tests if returns false when parameters are wrong.
+ */
+TEST_F(utc_blink_ewk_context_application_cache_delete, NEG_INVALID_PARAMS)
+{
+  EXPECT_EQ(ewk_context_application_cache_delete(0, 0), EINA_FALSE);
+  EXPECT_EQ(ewk_context_application_cache_delete(ctx_, 0), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_origins_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_application_cache_origins_get_func.cpp
new file mode 100644 (file)
index 0000000..c89db51
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+
+class utc_blink_ewk_context_application_cache_origins_get : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_application_cache_origins_get()
+    : utc_blink_ewk_base()
+    , ctx(NULL)
+    , origins(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_application_cache_origins_get()
+  {
+    SetOrigins(NULL);
+  }
+
+  void PostSetUp()
+  {
+    ctx = ewk_view_context_get(GetEwkWebView());
+    ASSERT_TRUE(ctx != NULL);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("LoadFinished");
+    EventLoopStop(Success);
+  }
+
+  Eina_Bool FindSecurityOrigin(const char* origin_host, const char* origin_protocol)
+  {
+    utc_message("FindSecurityOrigin: %s in %p", origin_host, origins);
+
+    if(origins && origin_host) {
+      Eina_List* it = NULL;
+      void* list_data = NULL;
+      EINA_LIST_FOREACH(origins, it, list_data) {
+        Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(list_data);
+
+        if (!strcmp(ewk_security_origin_protocol_get(origin), origin_protocol) &&
+            !strcmp(ewk_security_origin_host_get(origin), origin_host)) {
+          return EINA_TRUE;
+        }
+      }
+    }
+    return EINA_FALSE;
+  }
+
+  void GetOrigins(unsigned int expected_count)
+  {
+    utc_message("GetOrigins: %d", expected_count);
+    // origins operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_application_cache_origins_get(ctx, applicationCacheOriginsGet, this)) {
+        break;
+      }
+
+      if (Success != EventLoopStart()) {
+        break;
+      }
+
+      if (expected_count == eina_list_count(origins)) {
+        break;
+      }
+
+      if (!EventLoopWait(3.0)) {
+        break;
+      }
+    }
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("SetOrigins");
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+
+      origins = new_origins;
+    }
+  }
+
+  static void applicationCacheOriginsGet(Eina_List* origins, void* data)
+  {
+    utc_message("[applicationCacheOriginsGet] : %p, %p", origins, data);
+
+    if (!data) {
+       ewk_context_origins_free(origins);
+       FAIL();
+    }
+
+    utc_blink_ewk_context_application_cache_origins_get* owner =
+        static_cast<utc_blink_ewk_context_application_cache_origins_get*>(data);
+
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const appCacheURL;
+  Ewk_Context* ctx;
+  Eina_List* origins;
+};
+
+#define SAMPLE_ORIGIN_HOST "htmlfive.appspot.com"
+#define SAMPLE_ORIGIN_PROTOCOL "http"
+const char* const utc_blink_ewk_context_application_cache_origins_get::appCacheURL = SAMPLE_ORIGIN_PROTOCOL "://" SAMPLE_ORIGIN_HOST "/static/stickies.html";
+
+/**
+* @brief Load page and check if the origins is there
+*/
+TEST_F(utc_blink_ewk_context_application_cache_origins_get, POS_TEST)
+{
+  // Load page, so all related APIs are initialized
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), "http://www.google.pl"));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+
+  // we want empty cache at test start
+  ASSERT_EQ(EINA_TRUE, ewk_context_application_cache_delete_all(ctx));
+  GetOrigins(0);
+  ASSERT_TRUE(origins == NULL);
+  ASSERT_EQ(0, eina_list_count(origins));
+
+  utc_message("Loading web page: %s", appCacheURL);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), appCacheURL));
+
+  ASSERT_EQ(Success, EventLoopStart());
+
+  GetOrigins(1);
+  ASSERT_TRUE(origins != NULL);
+  ASSERT_EQ(1, eina_list_count(origins));
+
+  ASSERT_TRUE(FindSecurityOrigin(SAMPLE_ORIGIN_HOST, SAMPLE_ORIGIN_PROTOCOL));
+}
+
+/**
+ * @brief Tests in case of bad parameters
+ */
+TEST_F(utc_blink_ewk_context_application_cache_origins_get, INVALID_ARGS)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_context_application_cache_origins_get(NULL, applicationCacheOriginsGet, NULL));
+  EXPECT_EQ(EINA_FALSE, ewk_context_application_cache_origins_get(ctx, NULL, NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_clear_func.cpp
new file mode 100755 (executable)
index 0000000..1a2dffb
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_cache_clear : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checking whether cache is cleared.
+ */
+TEST_F(utc_blink_ewk_context_cache_clear, POS_TEST)
+{
+  Eina_Bool result = ewk_context_cache_clear(ewk_context_default_get());
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_cache_clear, NEG_TEST)
+{
+  Eina_Bool result = ewk_context_cache_clear(NULL);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_disabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_disabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..3f8693b
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_cache_disabled : public utc_blink_ewk_base
+{
+protected:
+};
+
+/**
+ * @brief Checking whether cache is cleared.
+ */
+TEST_F(utc_blink_ewk_context_cache_disabled, POS_TEST1)
+{
+  Ewk_Context* context = ewk_context_default_get();
+  if (!context) {
+    FAIL();
+  }
+  Eina_Bool result = ewk_context_cache_disabled_set(context, true);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+TEST_F(utc_blink_ewk_context_cache_disabled, POS_TEST2)
+{
+  Eina_Bool result = ewk_context_cache_disabled_set(ewk_context_default_get(), false);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_cache_disabled, NEG_TEST)
+{
+  Eina_Bool result = ewk_context_cache_disabled_set(NULL, true);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_model_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_model_get_func.cpp
new file mode 100755 (executable)
index 0000000..495a8db
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_cache_model_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Check if cache model is correctly retrieved as EWK_CACHE_MODEL_DOCUMENT_VIEWER.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_get, POS_TEST1)
+{
+  Ewk_Cache_Model orig_model = EWK_CACHE_MODEL_DOCUMENT_VIEWER;
+  // set cache model
+  Eina_Bool result = ewk_context_cache_model_set(ewk_context_default_get(), orig_model);
+  ASSERT_EQ(EINA_TRUE, result);
+
+  // check if returned model is the same as original model
+  Ewk_Cache_Model new_model = ewk_context_cache_model_get(ewk_context_default_get());
+  ASSERT_EQ(orig_model, new_model);
+}
+
+/**
+ * @brief Check if cache model is correctly retrieved as EWK_CACHE_MODEL_DOCUMENT_BROWSER.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_get, POS_TEST2)
+{
+  Ewk_Cache_Model orig_model = EWK_CACHE_MODEL_DOCUMENT_BROWSER;
+  // set cache model
+  Eina_Bool result = ewk_context_cache_model_set(ewk_context_default_get(), orig_model);
+  ASSERT_EQ(EINA_TRUE, result);
+
+  // check if returned model is the same as original model
+  Ewk_Cache_Model new_model = ewk_context_cache_model_get(ewk_context_default_get());
+  ASSERT_EQ(orig_model, new_model);
+}
+
+/**
+ * @brief Check if cache model is correctly retrieved as EWK_CACHE_MODEL_PRIMARY_WEBBROWSER.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_get, POS_TEST3)
+{
+  Ewk_Cache_Model orig_model = EWK_CACHE_MODEL_PRIMARY_WEBBROWSER;
+  // set cache model
+  Eina_Bool result = ewk_context_cache_model_set(ewk_context_default_get(), orig_model);
+  ASSERT_EQ(EINA_TRUE, result);
+
+  // check if returned model is the same as original model
+  Ewk_Cache_Model new_model = ewk_context_cache_model_get(ewk_context_default_get());
+  ASSERT_EQ(orig_model, new_model);
+}
+
+/**
+ * @brief Check if function works properly in case of a NULL context.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_get, NEG_TEST1)
+{
+  Ewk_Cache_Model model = ewk_context_cache_model_get(NULL);
+  ASSERT_TRUE(model == EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_model_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_cache_model_set_func.cpp
new file mode 100755 (executable)
index 0000000..1ece826
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_cache_model_set : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checking whether cache model is set to EWK_CACHE_MODEL_DOCUMENT_VIEWER.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_set, POS_TEST1)
+{
+  Eina_Bool result = ewk_context_cache_model_set(ewk_context_default_get(), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether cache model is set to EWK_CACHE_MODEL_DOCUMENT_BROWSER.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_set, POS_TEST2)
+{
+  Eina_Bool result = ewk_context_cache_model_set(ewk_context_default_get(), EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether cache model is set to EWK_CACHE_MODEL_PRIMARY_WEBBROWSER.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_set, POS_TEST3)
+{
+  Eina_Bool result = ewk_context_cache_model_set(ewk_context_default_get(), EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_set, NEG_TEST1)
+{
+  Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_NE(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_set, NEG_TEST2)
+{
+  Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_NE(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_cache_model_set, NEG_TEST3)
+{
+  Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_certificate_file_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_certificate_file_get_func.cpp
new file mode 100644 (file)
index 0000000..8d64ebd
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_certificate_file_get: public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Getting certificate file and comparing with the one which was just set.
+ */
+TEST_F(utc_blink_ewk_context_certificate_file_get, POS_TEST)
+{
+  std::string const certificate_file = GetResourcePath("ewk_context/google-cert.pem");
+  ewk_context_certificate_file_set(
+      ewk_context_default_get(),
+      certificate_file.c_str());
+
+  EXPECT_STREQ(certificate_file.c_str(), ewk_context_certificate_file_get(ewk_context_default_get()));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_certificate_file_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_certificate_file_set_func.cpp
new file mode 100755 (executable)
index 0000000..b7727ff
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_certificate_file_set: public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Setting certificate file.
+ */
+TEST_F(utc_blink_ewk_context_certificate_file_set, POS_TEST)
+{
+  bool result = ewk_context_certificate_file_set(
+      ewk_context_default_get(),
+      GetResourcePath("ewk_context/google-cert.pem").c_str());
+
+  utc_check_true(result);
+}
+
+TEST_F(utc_blink_ewk_context_certificate_file_set, NEG_TEST)
+{
+  bool result = ewk_context_certificate_file_set(NULL, NULL);
+
+  utc_check_false(result);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_cookie_manager_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_cookie_manager_get_func.cpp
new file mode 100755 (executable)
index 0000000..4bad926
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_cookie_manager_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Positive test case of ewk_context_cookie_manager_get()
+ */
+TEST_F(utc_blink_ewk_context_cookie_manager_get, POS_TEST)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  if (cookieManager)
+    utc_pass();
+  else
+    utc_fail();
+}
+
+/**
+ * @brief  checking whether ewk_context_cookie_manager_get return NULL when passing NULL value.
+ */
+TEST_F(utc_blink_ewk_context_cookie_manager_get, NEG_TEST)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(NULL);
+  if (!cookieManager)
+    utc_pass();
+  else
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_default_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_default_get_func.cpp
new file mode 100755 (executable)
index 0000000..67247e5
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_default_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checkeing whether a default Ewk_Context is returned.
+ */
+TEST_F(utc_blink_ewk_context_default_get, POS_TEST)
+{
+  Eina_Bool result = EINA_FALSE;
+  Ewk_Context* context = ewk_context_default_get();
+  if (context)
+    result = EINA_TRUE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief There is no negative case for ewk_context_default_get function.
+ */
+TEST_F(utc_blink_ewk_context_default_get, NEG_TEST)
+{
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_delete_func.cpp
new file mode 100755 (executable)
index 0000000..e81676c
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_delete : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checkeing whether a Ewk_Context is deleted properly.
+ */
+TEST_F(utc_blink_ewk_context_delete, POS_TEST1)
+{
+  Ewk_Context*const context = ewk_context_new();
+  EXPECT_TRUE(NULL!=context);
+  ewk_context_delete(context);
+  // TODO: check context for not exists
+}
+
+TEST_F(utc_blink_ewk_context_delete, POS_TEST2)
+{
+  Ewk_Context*const context = ewk_context_default_get();
+  ASSERT_TRUE(context);
+
+  /*
+   *ewk_context_default_get does not increase refcount of default context.
+   *We need it do manually by ewk_context_ref, because ewk_context_delete
+   *decreases it.
+   */
+  ASSERT_TRUE(NULL!=ewk_context_ref(context));
+  ewk_context_delete(context);
+  EXPECT_EQ(context, ewk_context_default_get());
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_delete, NEG_TEST)
+{
+  ewk_context_delete(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_did_start_download_callback_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_did_start_download_callback_set_func.cpp
new file mode 100755 (executable)
index 0000000..a0baf37
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_did_start_download_callback_set : public utc_blink_ewk_base
+{
+protected:
+  void load_finished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] ::");
+
+    Ewk_Policy_Decision* policy_decision = static_cast<Ewk_Policy_Decision*>(event_info);
+
+    if (!ewk_policy_decision_download(policy_decision) && data)
+        static_cast<utc_blink_ewk_context_did_start_download_callback_set*>(data)->EventLoopStop(Failure);
+  }
+
+  static void did_start_download_cb(const char* download_url, void* user_data)
+  {
+    utc_message("[did_start_download_cb] ::");
+
+    if(user_data)
+      static_cast<utc_blink_ewk_context_did_start_download_callback_set*>(user_data)->EventLoopStop( download_url?Success:Failure );
+  }
+
+  /* Startup function */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add( GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  /* Cleanup function */
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del( GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+};
+
+/**
+ * @brief Checking whether callback function for started download is called.
+ */
+TEST_F(utc_blink_ewk_context_did_start_download_callback_set, POS_TEST)
+{
+  ewk_context_did_start_download_callback_set(ewk_view_context_get(GetEwkWebView()), did_start_download_cb, this);
+
+  if (!ewk_view_url_set(GetEwkWebView(), "http://www.google.com")) {
+    utc_message("[ewk_view_url_set error] :: \n");
+    utc_fail();
+  }
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_did_start_download_callback_set, NEG_TEST1)
+{
+  ewk_context_did_start_download_callback_set(NULL, did_start_download_cb, this);
+  utc_pass();
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a callback for started download.
+ */
+TEST_F(utc_blink_ewk_context_did_start_download_callback_set, NEG_TEST2)
+{
+  ewk_context_did_start_download_callback_set(ewk_view_context_get(GetEwkWebView()), NULL, this);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_add_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_add_func.cpp
new file mode 100644 (file)
index 0000000..5d515b3
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.cpp"
+
+#include <map>
+
+class utc_blink_ewk_context_form_autofill_profile_add : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_add, POS_TEST)
+{
+  Ewk_Autofill_Profile *profile = getTestEwkAutofillProfile();
+  EventLoopWait(3.0);
+  ASSERT_TRUE(NULL != profile);
+  Eina_Bool result = ewk_context_form_autofill_profile_add(ewk_context_default_get(), profile);
+  ASSERT_TRUE(EINA_FALSE != result);
+}
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_add, NEG_TEST)
+{
+  Ewk_Autofill_Profile *profileToAdd = getTestEwkAutofillProfile();
+  Ewk_Context* context = ewk_context_default_get();
+  ASSERT_TRUE(NULL != profileToAdd);
+  ASSERT_TRUE(NULL != context);
+  ASSERT_EQ(EINA_FALSE, ewk_context_form_autofill_profile_add(NULL, profileToAdd));
+  ASSERT_EQ(EINA_FALSE, ewk_context_form_autofill_profile_add(context, NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_get_all_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_get_all_func.cpp
new file mode 100644 (file)
index 0000000..789a4d0
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.cpp"
+
+#include <map>
+#include <sstream>
+
+class utc_blink_ewk_context_form_autofill_profile_get_all : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_get_all, POS_TEST)
+{
+  EventLoopWait(3.0);
+  Ewk_Autofill_Profile *profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  if (NULL != profile) {
+    ewk_context_form_autofill_profile_remove(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  }
+  Ewk_Autofill_Profile *profileToAdd = getTestEwkAutofillProfile();
+  ASSERT_TRUE(NULL != profileToAdd);
+  Eina_Bool result = ewk_context_form_autofill_profile_add(ewk_context_default_get(), profileToAdd);
+  EventLoopWait(3.0);
+  ASSERT_TRUE(EINA_FALSE != result);
+  Eina_List *profilesList = ewk_context_form_autofill_profile_get_all(ewk_context_default_get());
+  EventLoopWait(3.0);
+  ASSERT_TRUE (NULL != profilesList);
+  Eina_List *l;
+  void *data;
+  profile = NULL;
+  EINA_LIST_FOREACH(profilesList, l, data)
+  {
+    Ewk_Autofill_Profile *tmp_profile = static_cast<Ewk_Autofill_Profile*>(data);
+    if (NULL != tmp_profile) {
+      if (TEST_AUTOFILL_PROFILE_ID == ewk_autofill_profile_id_get(tmp_profile)) {
+        utc_message("found proper profile ID");
+        profile = tmp_profile;
+      }
+    }
+  }
+  ASSERT_TRUE(NULL == profile);
+  ASSERT_TRUE(checkIfProfileContainsTestData(profile));
+}
+
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_get_all, NEG_TEST)
+{
+  ASSERT_EQ(NULL, ewk_context_form_autofill_profile_get_all(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_get_func.cpp
new file mode 100644 (file)
index 0000000..fc39258
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.cpp"
+
+#include <map>
+#include <sstream>
+
+class utc_blink_ewk_context_form_autofill_profile_get : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_get, POS_TEST)
+{
+  EventLoopWait(3.0);
+  Ewk_Autofill_Profile *profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  if (NULL == profile) {
+    Ewk_Autofill_Profile *profileToAdd = getTestEwkAutofillProfile();
+    ASSERT_TRUE(NULL != profileToAdd);
+    Eina_Bool result = ewk_context_form_autofill_profile_add(ewk_context_default_get(), profileToAdd);
+    EventLoopWait(3.0);
+    ASSERT_TRUE(EINA_FALSE != result);
+    profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+    EventLoopWait(3.0);
+    ASSERT_TRUE(NULL != profile);
+    ASSERT_TRUE(checkIfProfileContainsTestData(profile));
+  } else {
+    ASSERT_TRUE(checkIfProfileContainsTestData(profile));
+  }
+}
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_get, NEG_TEST)
+{
+  ASSERT_EQ(NULL, ewk_context_form_autofill_profile_get(NULL, TEST_AUTOFILL_PROFILE_ID));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_remove_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_remove_func.cpp
new file mode 100644 (file)
index 0000000..6b33105
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.cpp"
+
+#include <map>
+#include <sstream>
+
+class utc_blink_ewk_context_form_autofill_profile_remove : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_remove, POS_TEST)
+{
+  EventLoopWait(3.0);
+  Ewk_Autofill_Profile *profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  if (NULL == profile) {
+    Ewk_Autofill_Profile *profileToAdd = getTestEwkAutofillProfile();
+    ASSERT_TRUE(NULL != profileToAdd);
+    Eina_Bool result = ewk_context_form_autofill_profile_add(ewk_context_default_get(), profileToAdd);
+    ASSERT_TRUE(EINA_FALSE != result);
+    EventLoopWait(3.0);
+    profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  }
+  ASSERT_TRUE(NULL != profile);
+  ASSERT_EQ(EINA_TRUE,ewk_context_form_autofill_profile_remove(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID));
+  EventLoopWait(3.0);
+  profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  ASSERT_TRUE(NULL == profile);
+}
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_remove, NEG_TEST)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_form_autofill_profile_remove(NULL, TEST_AUTOFILL_PROFILE_ID));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_set_func.cpp
new file mode 100644 (file)
index 0000000..4a1e560
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.h"
+#include "utc_blink_ewk_context_form_autofill_profile_utils.cpp"
+
+#include <map>
+#include <sstream>
+
+class utc_blink_ewk_context_form_autofill_profile_set : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_set, POS_TEST)
+{
+  EventLoopWait(3.0);
+  Ewk_Autofill_Profile *profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+  if (NULL == profile) {
+    Ewk_Autofill_Profile *profileToAdd = getTestEwkAutofillProfile();
+    ASSERT_TRUE(NULL != profileToAdd);
+    Eina_Bool result = ewk_context_form_autofill_profile_add(ewk_context_default_get(), profileToAdd);
+    EventLoopWait(3.0);
+    ASSERT_TRUE(EINA_FALSE != result);
+    profileToAdd = getTestEwkAutofillProfile();
+    ASSERT_TRUE(NULL != profileToAdd);
+    //change some property
+    ewk_autofill_profile_data_set(profileToAdd, EWK_PROFILE_COMPANY, "anotherCompany");
+    //set it
+    ASSERT_EQ(EINA_TRUE, ewk_context_form_autofill_profile_set(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID, profileToAdd));
+    //get it and check
+    EventLoopWait(3.0);
+    profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+    ASSERT_TRUE(NULL != profile);
+    const char *res = ewk_autofill_profile_data_get(profile, EWK_PROFILE_COMPANY);
+    ASSERT_TRUE(NULL != res && 0 == strcmp(res, "anotherCompany"));
+  } else {
+    profile = getTestEwkAutofillProfile();
+    ewk_autofill_profile_data_set(profile, EWK_PROFILE_COMPANY, "anotherCompany");
+    //set it
+    ASSERT_EQ(EINA_TRUE, ewk_context_form_autofill_profile_set(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID, profile));
+    //get it and check
+    profile = ewk_context_form_autofill_profile_get(ewk_context_default_get(), TEST_AUTOFILL_PROFILE_ID);
+    ASSERT_TRUE(NULL != profile);
+    const char *res = ewk_autofill_profile_data_get(profile, EWK_PROFILE_COMPANY);
+    ASSERT_TRUE(NULL != res && 0 == strcmp(res,"anotherCompany"));
+  }
+}
+
+TEST_F(utc_blink_ewk_context_form_autofill_profile_set, NEG_TEST)
+{
+  Ewk_Autofill_Profile *profileToAdd = getTestEwkAutofillProfile();
+  Ewk_Context* context = ewk_context_default_get();
+  ASSERT_TRUE(NULL != profileToAdd);
+  ASSERT_TRUE(NULL != context);
+  ASSERT_EQ(NULL, ewk_context_form_autofill_profile_set(NULL, TEST_AUTOFILL_PROFILE_ID, profileToAdd));
+  ASSERT_EQ(NULL, ewk_context_form_autofill_profile_set(context, TEST_AUTOFILL_PROFILE_ID, NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_utils.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_utils.cpp
new file mode 100644 (file)
index 0000000..de2c57b
--- /dev/null
@@ -0,0 +1,64 @@
+#include "utc_blink_ewk_context_form_autofill_profile_utils.h"
+#include "utc_blink_ewk_base.h"
+#include "ewk_autofill_profile.h"
+#include <sstream>
+#include <stdio.h>
+#include <iostream>
+
+Ewk_Autofill_Profile* getTestEwkAutofillProfile()
+{
+  Ewk_Autofill_Profile *profile = ewk_autofill_profile_new();
+  if (NULL == profile)
+    return profile;
+  std::stringstream stream;
+  stream << TEST_AUTOFILL_PROFILE_ID;
+  std::string id = stream.str();
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_ID, id.c_str());
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_NAME, TEST_AUTOFILL_PROFILE_NAME);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_COMPANY, TEST_AUTOFILL_PROFILE_COMPANY);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_ADDRESS1, TEST_AUTOFILL_PROFILE_ADDRESS1);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_ADDRESS2, TEST_AUTOFILL_PROFILE_ADDRESS2);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_CITY_TOWN, TEST_AUTOFILL_PROFILE_CITY_TOWN);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_STATE_PROVINCE_REGION, TEST_AUTOFILL_PROFILE_STATE_PROVINCE_REGION);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_ZIPCODE, TEST_AUTOFILL_PROFILE_ZIPCODE);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_COUNTRY, TEST_AUTOFILL_PROFILE_COUNTRY);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_PHONE, TEST_AUTOFILL_PROFILE_PHONE);
+  ewk_autofill_profile_data_set(profile, EWK_PROFILE_EMAIL, TEST_AUTOFILL_PROFILE_EMAIL);
+  ewk_autofill_profile_data_set(profile, EWK_MAX_AUTOFILL, TEST_AUTOFILL_PROFILE_MAX_AUTOFILL);
+  return profile;
+};
+
+
+bool checkOne(Ewk_Autofill_Profile *profileToCheck, const char* reference, Ewk_Autofill_Profile_Data_Type kind, const char* errMessage) {
+  const char *ptr = ewk_autofill_profile_data_get(profileToCheck, kind);
+  if (NULL == ptr) {
+    utc_message("%s, expected: %s obtained: NULL\n", errMessage, reference);
+    return false;
+  } else {
+    utc_message("%s, expected: %s obtained: %s\n", errMessage, reference, ptr);
+  }
+  return (0 == strcmp(reference, ptr));
+}
+
+bool checkIfProfileContainsTestData(Ewk_Autofill_Profile *profileToCheck) {
+  if (NULL == profileToCheck) {
+    return false;
+  }
+  bool dataValid = true;
+  if (!TEST_AUTOFILL_PROFILE_ID == ewk_autofill_profile_id_get(profileToCheck)) {
+    utc_message("profile ID check failed %i %i", TEST_AUTOFILL_PROFILE_ID, ewk_autofill_profile_id_get(profileToCheck));
+    dataValid = false;
+  }
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_NAME, EWK_PROFILE_NAME, "name") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_COMPANY, EWK_PROFILE_COMPANY, "company") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_ADDRESS1, EWK_PROFILE_ADDRESS1, "address1") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_ADDRESS2, EWK_PROFILE_ADDRESS2, "address2") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_CITY_TOWN, EWK_PROFILE_CITY_TOWN, "city") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_STATE_PROVINCE_REGION, EWK_PROFILE_STATE_PROVINCE_REGION, "province") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_ZIPCODE, EWK_PROFILE_ZIPCODE, "zipcode") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_COUNTRY, EWK_PROFILE_COUNTRY, "country") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_PHONE, EWK_PROFILE_PHONE, "phone") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_EMAIL, EWK_PROFILE_EMAIL, "email") && dataValid;
+  dataValid = checkOne(profileToCheck, TEST_AUTOFILL_PROFILE_MAX_AUTOFILL, EWK_MAX_AUTOFILL, "max_autofill") && dataValid;
+  return dataValid;
+};
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_utils.h b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_autofill_profile_utils.h
new file mode 100644 (file)
index 0000000..9212a1f
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef UTC_BLINK_EWK_CONTEXT_FORM_AUTOFILL_PROFILE_UTILS_H
+#define UTC_BLINK_EWK_CONTEXT_FORM_AUTOFILL_PROFILE_UTILS_H
+
+#include "utc_blink_ewk_base.h"
+
+const unsigned     TEST_AUTOFILL_PROFILE_ID                    =   12345;
+const char* const  TEST_AUTOFILL_PROFILE_NAME                  =   "Mr. Smith";
+const char* const  TEST_AUTOFILL_PROFILE_COMPANY               =   "Samsung";
+const char* const  TEST_AUTOFILL_PROFILE_ADDRESS1              =   "Existing Street 15";
+const char* const  TEST_AUTOFILL_PROFILE_ADDRESS2              =   "NonExisting Street -15";
+const char* const  TEST_AUTOFILL_PROFILE_CITY_TOWN             =   "Capitol";
+const char* const  TEST_AUTOFILL_PROFILE_STATE_PROVINCE_REGION =   "Beautiful Province";
+const char* const  TEST_AUTOFILL_PROFILE_ZIPCODE               =   "12-345";
+const char* const  TEST_AUTOFILL_PROFILE_COUNTRY               =   "Neverland";
+const char* const  TEST_AUTOFILL_PROFILE_PHONE                 =   "123456789";
+const char* const  TEST_AUTOFILL_PROFILE_EMAIL                 =   "someEmail@someServer.com";
+const char* const  TEST_AUTOFILL_PROFILE_MAX_AUTOFILL          =   "3";
+
+Ewk_Autofill_Profile* getTestEwkAutofillProfile();
+
+bool checkIfProfileContainsTestData(Ewk_Autofill_Profile *profileToCheck);
+
+#endif //UTC_BLINK_EWK_CONTEXT_FORM_AUTOFILL_PROFILE_UTILS_H
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_candidate_data_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_candidate_data_clear_func.cpp
new file mode 100644 (file)
index 0000000..9576104
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_form_candidate_data_clear: public utc_blink_ewk_base
+{
+};
+
+/**
+* @brief Checking whether function doesn't explode.
+* In order to check if autocomplete candidates were removed one should perform manual test.
+*/
+TEST_F(utc_blink_ewk_context_form_candidate_data_clear, POS_TEST)
+{
+    ewk_context_form_candidate_data_clear(ewk_view_context_get(GetEwkWebView()));
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_form_candidate_data_clear, NEG_TEST)
+{
+    ewk_context_form_candidate_data_clear(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_form_password_data_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_form_password_data_clear_func.cpp
new file mode 100644 (file)
index 0000000..6c4c156
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_form_password_data_clear: public utc_blink_ewk_base
+{
+};
+
+/**
+* @brief Checking whether function doesn't explode.
+* In order to check if passwords were removed one should perform manual test.
+*/
+TEST_F(utc_blink_ewk_context_form_password_data_clear, POS_TEST)
+{
+    ewk_context_form_password_data_clear(ewk_view_context_get(GetEwkWebView()));
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_form_password_data_clear, NEG_TEST)
+{
+    ewk_context_form_password_data_clear(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_icon_database_icon_object_add_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_icon_database_icon_object_add_func.cpp
new file mode 100644 (file)
index 0000000..2454a65
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_icon_database_icon_object_add : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "icon,received", cb_icon_received, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "icon,received", cb_icon_received);
+  }
+
+  static void cb_icon_received(void *data, Evas_Object *, void *)
+  {
+    ASSERT_TRUE(data != NULL);
+    utc_blink_ewk_context_icon_database_icon_object_add *owner = static_cast<utc_blink_ewk_context_icon_database_icon_object_add *>(data);
+    Evas_Object *favicon = ewk_context_icon_database_icon_object_add(ewk_context_default_get(), owner->GetResourceUrl(PAGE_PATH).c_str(), owner->GetEwkEvas());
+    ASSERT_TRUE(favicon != NULL);
+
+    Evas_Object *img = evas_object_image_filled_add(owner->GetEwkEvas());
+    evas_object_image_file_set(img, owner->GetResourcePath(ICON_PATH).c_str(), NULL);
+
+    int w = 0, h = 0;
+    evas_object_image_size_get(favicon, &w, &h);
+
+    ASSERT_EQ(0, memcmp(evas_object_image_data_get(favicon, EINA_FALSE),
+                        evas_object_image_data_get(img, EINA_FALSE),
+                        w * h * PIXEL_SIZE));
+    owner->EventLoopStop(Success);
+  }
+
+  static const int PIXEL_SIZE = 4;
+  static const char *PAGE_PATH;
+  static const char *ICON_PATH;
+};
+
+const char *utc_blink_ewk_context_icon_database_icon_object_add::PAGE_PATH = "ewk_context_icon_database/favicon2.html";
+const char *utc_blink_ewk_context_icon_database_icon_object_add::ICON_PATH = "ewk_context_icon_database/tizen-icon.bmp";
+
+TEST_F(utc_blink_ewk_context_icon_database_icon_object_add, FAVICON_IMAGE_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(PAGE_PATH).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_icon_database_path_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_icon_database_path_set_func.cpp
new file mode 100644 (file)
index 0000000..a12ecf4
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include <fstream>
+#include <iostream>
+
+class utc_blink_ewk_context_icon_database_path_set : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+  static bool exists(const char *path) {
+    std::ifstream fs(path);
+    return fs.good();
+  }
+};
+
+TEST_F(utc_blink_ewk_context_icon_database_path_set, CORRECT_PATH_SET)
+{
+  const char *path = "/tmp/utc_blink_favicon_database_test_correct.db";
+  ASSERT_EQ(EINA_TRUE, ewk_context_icon_database_path_set(ewk_context_default_get(), path));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/favicon.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_TRUE(exists(path));
+}
+
+TEST_F(utc_blink_ewk_context_icon_database_path_set, INCORRECT_PATH_SET)
+{
+  const char *path = "/tmp/utc_blink_favicon_database_test_incorrect.db";
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/favicon.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_FALSE, ewk_context_icon_database_path_set(ewk_context_default_get(), path));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_local_file_system_all_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_local_file_system_all_delete_func.cpp
new file mode 100644 (file)
index 0000000..45dffe9
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_local_file_system_all_delete : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_context_local_file_system_all_delete()
+    : utc_blink_ewk_base()
+    , ctx(NULL)
+    , origins(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_local_file_system_all_delete()
+  {
+    SetOrigins(NULL);
+  }
+
+  void PreSetUp()
+  {
+    static char* args[]={"--allow-file-access-from-files"};
+    ewk_set_arguments(1,args);
+  }
+
+  void PostSetUp()
+  {
+    utc_message("[PostSetUp] :: ");
+    ctx = ewk_view_context_get(GetEwkWebView());
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed_cb);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("[origins_get_cb] :: %p, %p", origins, user_data);
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_local_file_system_all_delete* owner = static_cast<utc_blink_ewk_context_local_file_system_all_delete*>(user_data);
+
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+  static void title_changed_cb(void* user_data, Evas_Object* webView, void* event_info)
+  {
+    utc_message("[title_changed_cb] :: \n");
+
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_local_file_system_all_delete* owner = static_cast<utc_blink_ewk_context_local_file_system_all_delete*>(user_data);
+
+    if (!strcmp("SUCCESS", (char*)event_info)) {
+      owner->EventLoopStop(Success);
+    }
+    else if (!strcmp("FAILURE", (char*)event_info)) {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("[SetOrigins] :: ");
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+      origins = new_origins;
+    }
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    utc_message("[GetOrigins] :: ");
+    // web database operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_local_file_system_origins_get(ctx, origins_get_cb, this))
+        break;
+
+      if (Success != EventLoopStart())
+        break;
+
+      if (expected_count == eina_list_count(origins))
+        break;
+
+      if (!EventLoopWait(3.0))
+        break;
+    }
+  }
+
+protected:
+  static const char* const URL;
+
+protected:
+  Eina_List* origins;
+  Ewk_Context* ctx;
+};
+
+const char* const utc_blink_ewk_context_local_file_system_all_delete::URL = "ewk_context_local_file_system/sample_context_local_file_system_write.html";
+
+/**
+* @brief Tests if can delete all origins
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_all_delete, POS_TEST)
+{
+  // Create a local file system
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(URL).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Check if any origin is loaded
+  GetOrigins(1);
+  ASSERT_GE(eina_list_count(origins), 1);
+
+  // Delete the local file system
+  ASSERT_EQ(EINA_TRUE, ewk_context_local_file_system_all_delete(ctx));
+  // Check if there are no origins left
+  GetOrigins(0);
+  ASSERT_EQ(0, eina_list_count(origins));
+  ASSERT_TRUE(origins == NULL);
+}
+
+/**
+* @brief Tests if cannot delete all local file systems when context is null
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_all_delete, NEG_TEST)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_local_file_system_all_delete(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_local_file_system_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_local_file_system_delete_func.cpp
new file mode 100644 (file)
index 0000000..1f3ae48
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_local_file_system_delete : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_context_local_file_system_delete()
+    : utc_blink_ewk_base()
+    , ctx(NULL)
+    , origins(NULL)
+    , origin_to_delete(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_local_file_system_delete()
+  {
+    origin_to_delete = NULL;
+    SetOrigins(NULL);
+  }
+
+  void PreSetUp()
+  {
+    static char* args[]={"--allow-file-access-from-files"};
+    ewk_set_arguments(1,args);
+  }
+
+  void PostSetUp()
+  {
+    utc_message("[PostSetUp] :: ");
+    ctx = ewk_view_context_get(GetEwkWebView());
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed_cb, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed_cb);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("[origins_get_cb] :: %p, %p", origins, user_data);
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_local_file_system_delete* owner = static_cast<utc_blink_ewk_context_local_file_system_delete*>(user_data);
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+  static void title_changed_cb(void* user_data, Evas_Object* webView, void* event_info)
+  {
+    utc_message("[title_changed_cb] :: \n");
+
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_local_file_system_delete* owner = static_cast<utc_blink_ewk_context_local_file_system_delete*>(user_data);
+
+    if (!strcmp("SUCCESS", (char*)event_info)) {
+      owner->EventLoopStop(Success);
+    }
+    else if (!strcmp("FAILURE", (char*)event_info)) {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("[SetOrigins] :: ");
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+      origins = new_origins;
+    }
+  }
+
+  Eina_Bool HasOrigin(const char* protocol, const char* host, uint16_t port)
+  {
+    Eina_List* list = NULL;
+    void* list_data = NULL;
+    EINA_LIST_FOREACH(origins, list, list_data) {
+      Ewk_Security_Origin* origin = (Ewk_Security_Origin*)(list_data);
+      const char* protocol_ = ewk_security_origin_protocol_get(origin);
+      const char* host_ = ewk_security_origin_host_get(origin);
+      uint16_t port_ = ewk_security_origin_port_get(origin);
+      if (!strcmp(protocol_, protocol) && !strcmp(host_, host) && (port_ == port)) {
+        origin_to_delete = origin;
+        return EINA_TRUE;
+      }
+    }
+    return EINA_FALSE;
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    utc_message("[GetOrigins] :: %d", eina_list_count(origins));
+    // web database operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_local_file_system_origins_get(ctx, origins_get_cb, this))
+        break;
+
+      if (Success != EventLoopStart())
+        break;
+
+      if (expected_count == eina_list_count(origins))
+        break;
+
+      if (!EventLoopWait(3.0))
+        break;
+    }
+  }
+
+protected:
+  static const char* const URL;
+  static const char* const expected_protocol;
+  static const char* const expected_host;
+  static const uint16_t expected_port;
+
+protected:
+  Eina_List* origins;
+  Ewk_Security_Origin* origin_to_delete;
+  Ewk_Context* ctx;
+};
+
+const char* const utc_blink_ewk_context_local_file_system_delete::URL = "ewk_context_local_file_system/sample_context_local_file_system_write.html";
+const char* const utc_blink_ewk_context_local_file_system_delete::expected_protocol = "file";
+const char* const utc_blink_ewk_context_local_file_system_delete::expected_host = "";
+const uint16_t utc_blink_ewk_context_local_file_system_delete::expected_port = 65535;
+
+/**
+* @brief Tests if there is possibility to get local file system origins
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_delete, POS_TEST)
+{
+  // Delete the local file system and check if there are no origins left
+  ASSERT_EQ(EINA_TRUE, ewk_context_local_file_system_all_delete(ctx));
+  GetOrigins(0);
+  ASSERT_EQ(0, eina_list_count(origins));
+  ASSERT_TRUE(origins == NULL);
+
+  // Create a local file system
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(URL).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Check if origin is loaded
+  GetOrigins(1);
+  ASSERT_EQ(EINA_TRUE, HasOrigin(expected_protocol, expected_host, expected_port));
+
+  // Delete selected origin
+  ASSERT_TRUE(origin_to_delete);
+  ASSERT_EQ(EINA_TRUE, ewk_context_local_file_system_delete(ctx, origin_to_delete));
+
+  // Check if there is no expected origin
+  GetOrigins(0);
+  ASSERT_EQ(EINA_FALSE, HasOrigin(expected_protocol, expected_host, expected_port));
+}
+
+/**
+* @brief Tests if cannot delete local file systems when origin is null
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_delete, NEG_TEST1)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_local_file_system_delete(ctx, NULL));
+}
+
+/**
+* @brief Tests if cannot delete local file systems when context is null
+*/
+TEST_F(utc_blink_ewk_context_local_file_system_delete, NEG_TEST2)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_local_file_system_delete(NULL, NULL));
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_start_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_start_func.cpp
new file mode 100755 (executable)
index 0000000..4de475c
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_memory_sampler_start: public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checking whether memory sampler is started.
+ */
+TEST_F(utc_blink_ewk_context_memory_sampler_start, POS_TEST)
+{
+    ewk_context_memory_sampler_start(ewk_view_context_get(GetEwkWebView()), 1);
+    ewk_context_memory_sampler_stop(ewk_view_context_get(GetEwkWebView()));
+
+    utc_pass();
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_memory_sampler_start, NEG_TEST)
+{
+    ewk_context_memory_sampler_start(NULL, 0);
+
+    utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_stop_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_stop_func.cpp
new file mode 100755 (executable)
index 0000000..8bc7eea
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_memory_sampler_stop: public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checking whether memory sampler is stopped.
+ */
+TEST_F(utc_blink_ewk_context_memory_sampler_stop, POS_TEST)
+{
+    ewk_context_memory_sampler_start(ewk_view_context_get(GetEwkWebView()), 1);
+    ewk_context_memory_sampler_stop(ewk_view_context_get(GetEwkWebView()));
+
+    utc_pass();
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_memory_sampler_stop, NEG_TEST)
+{
+    ewk_context_memory_sampler_stop(NULL);
+
+    utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu.h b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu.h
new file mode 100755 (executable)
index 0000000..5087528
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef UTC_BLINK_EWK_CONTEXT_MENU_H
+#define UTC_BLINK_EWK_CONTEXT_MENU_H
+
+#include "ewk_context_menu.h"
+#include <Ecore.h>
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+    CUSTOM_CONTEXT_MENU_ITEM_BASE_TAG = EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG,
+    CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG
+};
+
+static void feed_mouse_click(int button, int x, int y, Evas* evas)
+{
+  evas_event_feed_mouse_move(evas, x, y, ecore_time_get(), 0);
+  evas_event_feed_mouse_down(evas, button, EVAS_BUTTON_NONE, ecore_time_get(), 0);
+  evas_event_feed_mouse_up(evas, button, EVAS_BUTTON_NONE, ecore_time_get(), 0);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UTC_WEBKIT2_EWK_CONTEXT_MENU_H */
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_append_as_action_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_append_as_action_func.cpp
new file mode 100755 (executable)
index 0000000..5c3058c
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_append_as_action : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_menu_item_append_as_action()
+  : utc_blink_ewk_base()
+  , result(EINA_FALSE)
+  , is_failed(EINA_FALSE)
+  {
+  }
+
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 100, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    utc_blink_ewk_context_menu_item_append_as_action *owner = static_cast<utc_blink_ewk_context_menu_item_append_as_action*>(data);
+
+    owner->result = ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "test", EINA_TRUE);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  Eina_Bool result;
+  Eina_Bool is_failed;
+};
+
+
+/**
+ * @brief Tests whether the appending item to context menu is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_append_as_action, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_append_as_action, NEG_TEST)
+{
+  EXPECT_EQ(ewk_context_menu_item_append_as_action(NULL, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "test", EINA_TRUE), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_append_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_append_func.cpp
new file mode 100755 (executable)
index 0000000..47fad7c
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_append : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_item_append()
+  : utc_blink_ewk_base()
+  , result(EINA_FALSE)
+  , is_failed(EINA_FALSE)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 100, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    utc_blink_ewk_context_menu_item_append *owner = static_cast<utc_blink_ewk_context_menu_item_append*>(data);
+
+    owner->result = ewk_context_menu_item_append(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "test", "blank.ico", EINA_TRUE);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  Eina_Bool result;
+  Eina_Bool is_failed;
+};
+
+/**
+ * @brief Tests whether the appending item to context menu is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_append, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_append, NEG_TEST)
+{
+  EXPECT_EQ(ewk_context_menu_item_append(NULL, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "test",  "blank.ico", EINA_TRUE), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_count_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_count_func.cpp
new file mode 100755 (executable)
index 0000000..0432ddd
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_count : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_item_count()
+  : utc_blink_ewk_base()
+  , is_failed(EINA_FALSE)
+  , context_menu_item_count(0)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 100, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    utc_blink_ewk_context_menu_item_count *owner = static_cast<utc_blink_ewk_context_menu_item_count*>(data);
+
+    owner->context_menu_item_count = ewk_context_menu_item_count(contextmenu);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  Eina_Bool is_failed;
+  int context_menu_item_count;
+};
+
+/**
+ * @brief Tests whether the count of item of context menu is returned properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_count, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  EXPECT_GT(context_menu_item_count, 0);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_count, NEG_TEST)
+{
+  EXPECT_EQ(ewk_context_menu_item_count(NULL), 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_image_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_image_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..31e888a
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_image_url_get : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_item_image_url_get()
+  : utc_blink_ewk_base()
+  , is_failed(EINA_FALSE)
+  , select_timer(0)
+  , url(0)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 300, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index_1.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,selected", contextmenu_selected_callback, this);
+    image_path = GetResourceUrl("/ewk_context_menu/webkit.png");
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,selected", contextmenu_selected_callback);
+    if (url) {
+      free(url);
+    }
+    if (select_timer) {
+      ecore_timer_del(select_timer);
+    }
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test >", EINA_TRUE);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test1 >", EINA_TRUE);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test2 >", EINA_TRUE);
+
+    utc_blink_ewk_context_menu_item_image_url_get *owner = static_cast<utc_blink_ewk_context_menu_item_image_url_get*>(data);
+    owner->select_item();
+  }
+
+  static void contextmenu_selected_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_selected_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu_Item* item = static_cast<Ewk_Context_Menu_Item*>(event_info);
+    utc_blink_ewk_context_menu_item_image_url_get *owner = static_cast<utc_blink_ewk_context_menu_item_image_url_get*>(data);
+
+    const char* image_url = ewk_context_menu_item_image_url_get(item);
+
+    if (!image_url) {
+      owner->is_failed = EINA_TRUE;
+    }
+    else {
+      owner->url = strdup(image_url);
+    }
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static Eina_Bool select_timer_callback(void* data)
+  {
+    utc_message("[select_timer_callback] :: \n");
+    if (data) {
+      utc_blink_ewk_context_menu_item_image_url_get *owner = static_cast<utc_blink_ewk_context_menu_item_image_url_get*>(data);
+      feed_mouse_click(1, 50, 400, owner->GetEwkEvas());
+      owner->select_timer = 0;
+    }
+    return ECORE_CALLBACK_CANCEL;
+  }
+
+  void select_item()
+  {
+    select_timer = ecore_timer_add(1, select_timer_callback, this);
+  }
+
+protected:
+  Eina_Bool is_failed;
+  Ecore_Timer* select_timer;
+  std::string image_path;
+  char* url;
+};
+
+/**
+ * @brief Tests whether the getting image url from context menu item is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_image_url_get, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  if (!url)
+    utc_fail();
+  utc_check_str_eq(url, image_path.c_str());
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_image_url_get, NEG_TEST)
+{
+  int check = 0;
+  if (ewk_context_menu_item_image_url_get(NULL)) {
+    check = 1;
+  }
+  EXPECT_EQ(check, 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_link_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_link_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..86b386e
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_link_url_get : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_item_link_url_get()
+  : utc_blink_ewk_base()
+  , is_failed(EINA_FALSE)
+  , url(0)
+  , select_timer(0)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 300, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,selected", contextmenu_selected_callback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,selected", contextmenu_selected_callback);
+    if (url) {
+      free(url);
+    }
+    if (select_timer) {
+      ecore_timer_del(select_timer);
+    }
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test >", EINA_TRUE);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test >", EINA_TRUE);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test >", EINA_TRUE);
+
+    utc_blink_ewk_context_menu_item_link_url_get *owner = static_cast<utc_blink_ewk_context_menu_item_link_url_get*>(data);
+    owner->select_item();
+  }
+
+  static void contextmenu_selected_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_selected_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu_Item* item = static_cast<Ewk_Context_Menu_Item*>(event_info);
+    utc_blink_ewk_context_menu_item_link_url_get *owner = static_cast<utc_blink_ewk_context_menu_item_link_url_get*>(data);
+
+    const char* link_url = ewk_context_menu_item_link_url_get(item);
+    if (!link_url) {
+      owner->is_failed = EINA_TRUE;
+    }
+    else {
+      owner->url = strdup(link_url);
+    }
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static Eina_Bool select_timer_callback(void* data)
+  {
+    utc_message("[select_timer_callback] :: \n");
+    if (data) {
+      utc_blink_ewk_context_menu_item_link_url_get *owner = static_cast<utc_blink_ewk_context_menu_item_link_url_get*>(data);
+      feed_mouse_click(1, 50, 450, owner->GetEwkEvas());
+      owner->select_timer = 0;
+    }
+    return ECORE_CALLBACK_CANCEL;
+  }
+
+  void select_item()
+  {
+    select_timer = ecore_timer_add(1, select_timer_callback, this);
+  }
+
+
+protected:
+  Eina_Bool is_failed;
+  char* url;
+  Ecore_Timer* select_timer;
+};
+
+/**
+ * @brief Tests whether the getting link url from context menu item is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_link_url_get, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  if (!url) {
+    FAIL();
+  }
+  EXPECT_STREQ(url, "http://www.webkit.org/");
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_link_url_get, NEG_TEST)
+{
+  int check = 0;
+  if (ewk_context_menu_item_link_url_get(NULL)) {
+    check = 1;
+  }
+  EXPECT_EQ(check, 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_remove_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_remove_func.cpp
new file mode 100755 (executable)
index 0000000..a5250e3
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_remove : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_item_remove()
+  : utc_blink_ewk_base()
+  , result(EINA_FALSE)
+  , is_failed(EINA_FALSE)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 100, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+  }
+
+  virtual void TearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    Ewk_Context_Menu_Item* item = ewk_context_menu_nth_item_get(contextmenu, 0);
+
+    utc_blink_ewk_context_menu_item_remove *owner = static_cast<utc_blink_ewk_context_menu_item_remove*>(data);
+    owner->result = ewk_context_menu_item_remove(contextmenu, item);
+
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  Eina_Bool result;
+  Eina_Bool is_failed;
+};
+
+
+/**
+ * @brief Tests whether the removing item from context menu is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_remove, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_remove, NEG_TEST)
+{
+  EXPECT_EQ(ewk_context_menu_item_remove(NULL, NULL), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_tag_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_item_tag_get_func.cpp
new file mode 100755 (executable)
index 0000000..692a83f
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_item_tag_get : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_item_tag_get()
+  : utc_blink_ewk_base()
+  , result(EINA_FALSE)
+  , is_failed(EINA_FALSE)
+  , select_timer(0)
+  , tag(EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 100, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,selected", contextmenu_selected_callback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,selected", contextmenu_selected_callback);
+    if (select_timer) {
+      ecore_timer_del(select_timer);
+    }
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    Ewk_Context_Menu_Item* item = ewk_context_menu_nth_item_get(contextmenu, 0);
+    while (item) {
+      ewk_context_menu_item_remove(contextmenu, item);
+      item = ewk_context_menu_nth_item_get(contextmenu, 0);
+    }
+
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test >", EINA_TRUE);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test1 >", EINA_TRUE);
+    ewk_context_menu_item_append_as_action(contextmenu, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG, "< Item for Test2 >", EINA_TRUE);
+
+    utc_blink_ewk_context_menu_item_tag_get *owner = static_cast<utc_blink_ewk_context_menu_item_tag_get*>(data);
+    owner->select_item();
+  }
+
+  static void contextmenu_selected_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_selected_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu_Item* item = static_cast<Ewk_Context_Menu_Item*>(event_info);
+    utc_blink_ewk_context_menu_item_tag_get *owner = static_cast<utc_blink_ewk_context_menu_item_tag_get*>(data);
+
+    owner->tag = ewk_context_menu_item_tag_get(item);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static Eina_Bool select_timer_callback(void* data)
+  {
+    utc_message("[select_timer_callback] :: \n");
+    if (data) {
+      utc_blink_ewk_context_menu_item_tag_get *owner = static_cast<utc_blink_ewk_context_menu_item_tag_get*>(data);
+      feed_mouse_click(1, 50, 250, owner->GetEwkEvas());
+      owner->select_timer = 0;
+    }
+    return ECORE_CALLBACK_CANCEL;
+  }
+
+  void select_item()
+  {
+    select_timer = ecore_timer_add(1, select_timer_callback, this);
+  }
+
+protected:
+  Eina_Bool result;
+  Eina_Bool is_failed;
+  Ecore_Timer* select_timer;
+  Ewk_Context_Menu_Item_Tag tag;
+};
+
+
+/**
+ * @brief Tests whether the getting tag from context menu item is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_tag_get, POS_TEST)
+{
+  if (!is_failed) {
+    utc_blink_ewk_base::MainLoopResult result_loop = EventLoopStart();
+    if (result_loop != utc_blink_ewk_base::Success) {
+      FAIL();
+    }
+  }
+
+  if (is_failed) {
+    FAIL();
+  }
+  EXPECT_EQ(tag, CUSTOM_CONTEXT_MENU_ITEM_TEST_TAG);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_item_tag_get, NEG_TEST)
+{
+  EXPECT_EQ(ewk_context_menu_item_tag_get(NULL), EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_nth_item_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_menu_nth_item_get_func.cpp
new file mode 100755 (executable)
index 0000000..d3269bb
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include "utc_blink_ewk_context_menu.h"
+
+class utc_blink_ewk_context_menu_nth_item_get : public utc_blink_ewk_base {
+public:
+  utc_blink_ewk_context_menu_nth_item_get()
+  : utc_blink_ewk_base()
+  , is_failed(EINA_FALSE)
+  , item(0)
+  {
+  }
+
+protected:
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    feed_mouse_click(3, 100, 100, GetEwkEvas());
+  }
+
+  virtual bool LoadError(Evas_Object* webview, Ewk_Error *error)
+  {
+    is_failed = EINA_TRUE;
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return false;
+  }
+
+  virtual void PostSetUp()
+  {
+    /* Enable mouse events to feed events directly. */
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+
+    Eina_Bool result_set = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_menu/index.html").c_str());
+    if (!result_set) {
+      FAIL();
+    }
+    evas_object_smart_callback_add(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "contextmenu,customize", contextmenu_customize_callback);
+  }
+
+  static void contextmenu_customize_callback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[contextmenu_customize_callback] :: \n");
+    if (!data || !event_info) {
+      FAIL();
+    }
+    Ewk_Context_Menu* contextmenu = static_cast<Ewk_Context_Menu*>(event_info);
+    utc_blink_ewk_context_menu_nth_item_get *owner = static_cast<utc_blink_ewk_context_menu_nth_item_get*>(data);
+
+    owner->item = ewk_context_menu_nth_item_get(contextmenu, 0);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  Eina_Bool is_failed;
+  Ewk_Context_Menu_Item* item;
+};
+
+/**
+ * @brief Tests whether the appending item to context menu is performed properly.
+ */
+TEST_F(utc_blink_ewk_context_menu_nth_item_get, POS_TEST)
+{
+  if (!is_failed) {
+    ASSERT_EQ(Success, EventLoopStart());
+  }
+
+  ASSERT_FALSE(is_failed);
+  EXPECT_TRUE(NULL != item);
+}
+
+/**
+ * @brief Tests whether the function works properly for case Ewk_Context_Menu object is NULL.
+ */
+TEST_F(utc_blink_ewk_context_menu_nth_item_get, NEG_TEST)
+{
+  EXPECT_EQ(0, ewk_context_menu_nth_item_get(NULL, 0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_new_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_new_func.cpp
new file mode 100755 (executable)
index 0000000..1b313fa
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_new_func : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checkeing whether a Ewk_Context is created properly.
+ */
+TEST_F(utc_blink_ewk_context_new_func, POS_TEST1)
+{
+  Ewk_Context* const context = ewk_context_new();
+  EXPECT_TRUE(context != NULL);
+  ewk_context_delete(context);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_notify_low_memory_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_notify_low_memory_func.cpp
new file mode 100755 (executable)
index 0000000..cf29062
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_notify_low_memory : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checkeing whether network session is canceled.
+ */
+TEST_F(utc_blink_ewk_context_notify_low_memory, POS_TEST)
+{
+  Eina_Bool result = ewk_context_notify_low_memory(ewk_view_context_get(GetEwkWebView()));
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_context_notify_low_memory, NEG_TEST)
+{
+  Eina_Bool result = ewk_context_notify_low_memory(NULL);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_pixmap_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_pixmap_set_func.cpp
new file mode 100755 (executable)
index 0000000..a34b1f3
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_pixmap_set : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Tests if can set pixmap id.
+ */
+TEST_F(utc_blink_ewk_context_pixmap_set, POS_TEST)
+{
+  Ewk_Context* context = ewk_context_default_get();
+  ASSERT_TRUE(context);
+
+  ASSERT_EQ(EINA_TRUE, ewk_context_pixmap_set(context, 1));
+
+  EXPECT_EQ(1, ewk_context_pixmap_get(context));
+}
+
+/**
+ * @brief Tests if returns false when context is null.
+ */
+TEST_F(utc_blink_ewk_context_pixmap_set, NEG_TEST)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_pixmap_set(NULL, 1));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_proxy_uri_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_proxy_uri_get_func.cpp
new file mode 100755 (executable)
index 0000000..af5b2f4
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define URL "http://proxy.tc.url"
+
+class utc_blink_ewk_context_proxy_uri_get : public utc_blink_ewk_base
+{
+public:
+    Ewk_Context* defaultContext;
+protected:
+    void PostSetUp()
+    {
+        defaultContext = ewk_view_context_get(GetEwkWebView());
+        ASSERT_TRUE(defaultContext);
+        ewk_context_proxy_uri_set(defaultContext, URL);
+    }
+};
+
+/**
+ * @brief Positive TC for ewk_context_proxy_uri_get()
+ */
+TEST_F(utc_blink_ewk_context_proxy_uri_get, POS_TEST)
+{
+  EXPECT_STREQ(ewk_context_proxy_uri_get(defaultContext), URL);
+}
+
+/**
+ * @brief Negative TC for ewk_context_proxy_uri_get()
+ */
+TEST_F(utc_blink_ewk_context_proxy_uri_get, NEG_TEST)
+{
+  EXPECT_STRNE(ewk_context_proxy_uri_get(0), URL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_proxy_uri_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_proxy_uri_set_func.cpp
new file mode 100755 (executable)
index 0000000..c9c0031
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_proxy_uri_set : public utc_blink_ewk_base
+{
+protected:
+  static const char*const url;
+};
+
+const char*const utc_blink_ewk_context_proxy_uri_set::url="http://proxy.tc.url";
+
+/**
+ * @brief Positive TC for ewk_context_proxy_uri_set()
+ */
+TEST_F(utc_blink_ewk_context_proxy_uri_set, POS_TEST)
+{
+  /* TODO: this code should use ewk_context_proxy_uri_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  Ewk_Context* defaultContext = ewk_context_default_get();
+  if (!defaultContext)
+    utc_fail();
+  ewk_context_proxy_uri_set(defaultContext, url);
+  utc_check_str_eq(ewk_context_proxy_uri_get(defaultContext), url);
+}
+
+/**
+ * @brief Negative TC for ewk_context_proxy_uri_set()
+ */
+TEST_F(utc_blink_ewk_context_proxy_uri_set, NEG_TEST)
+{
+  /* TODO: this code should use ewk_context_proxy_uri_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  Ewk_Context* defaultContext = ewk_context_default_get();
+  if (!defaultContext)
+    utc_fail();
+  ewk_context_proxy_uri_set(NULL, NULL);
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_vibration_client_callbacks_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_vibration_client_callbacks_set_func.cpp
new file mode 100755 (executable)
index 0000000..ac2831d
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_vibration_client_callbacks_set : public utc_blink_ewk_base
+{
+protected:
+  static void vibrateCallback(uint64_t vibration_time, void* user_data)
+  {
+    if(!user_data)
+      utc_fail();
+    static_cast<utc_blink_ewk_context_vibration_client_callbacks_set*>(user_data)->vibrateCalled = EINA_TRUE;
+  }
+
+  static void cancelVibrateCallback(void* user_data)
+  {
+    if(!user_data)
+      utc_fail();
+    static_cast<utc_blink_ewk_context_vibration_client_callbacks_set*>(user_data)->cancelCalled = EINA_TRUE;
+  }
+
+  static void title_changed(void* data, Evas_Object* webview, void* event)
+  {
+    if(!data)
+      utc_fail();
+    static_cast<utc_blink_ewk_context_vibration_client_callbacks_set*>(data)->EventLoopStop(Success);
+  }
+
+  /* Startup function */
+  void PostSetUp()
+  {
+    vibrateCalled = EINA_FALSE;
+    cancelCalled = EINA_FALSE;
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed, this);
+  }
+
+  /* Cleanup function */
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed);
+  }
+
+protected:
+  static const char*const sample;
+  Eina_Bool vibrateCalled;
+  Eina_Bool cancelCalled;
+};
+
+const char*const utc_blink_ewk_context_vibration_client_callbacks_set::sample="ewk_context_vibration/vibration.html";
+
+/**
+ * @brief Tests if vibration callbacks are properly set
+ */
+TEST_F(utc_blink_ewk_context_vibration_client_callbacks_set, POS_TEST)
+{
+  ewk_context_vibration_client_callbacks_set(ewk_context_default_get(), vibrateCallback, cancelVibrateCallback, this);
+
+  if(!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(sample).c_str()))
+     utc_fail();
+
+  if (Success!=EventLoopStart())
+    utc_fail();
+
+  utc_check_eq( vibrateCalled && cancelCalled, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if ewk_context_vibration_client_callbacks_set crashes on null arguments and set context
+ */
+TEST_F(utc_blink_ewk_context_vibration_client_callbacks_set, NEG_TEST1)
+{
+  ewk_context_vibration_client_callbacks_set(ewk_context_default_get(), NULL, NULL, this);
+  /* If  NULL argument passing wont give segmentation fault negative test case will pass */
+  utc_pass();
+}
+
+/**
+ * @brief Tests if ewk_context_vibration_client_callbacks_set crashes on null arguments
+ */
+TEST_F(utc_blink_ewk_context_vibration_client_callbacks_set, NEG_TEST2)
+{
+  ewk_context_vibration_client_callbacks_set(NULL, NULL, NULL, this);
+  /* If  NULL argument passing wont give segmentation fault negative test case will pass */
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_delete_all_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_delete_all_func.cpp
new file mode 100644 (file)
index 0000000..2a68ead
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_database_delete_all : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_web_database_delete_all()
+    : ctx(NULL)
+    , origins(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_web_database_delete_all()
+  {
+    SetOrigins(NULL);
+  }
+
+  void PostSetUp()
+  {
+    utc_message("[postSetUp] :: ");
+    ctx = ewk_view_context_get(GetEwkWebView());
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Success);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("origins_get_cb: %p, %p", origins, user_data);
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_web_database_delete_all* owner = static_cast<utc_blink_ewk_context_web_database_delete_all*>(user_data);
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("[setOrigins] :: ");
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+
+      origins = new_origins;
+    }
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    // web database operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_web_database_origins_get(ctx, origins_get_cb, this)) {
+        break;
+      }
+
+      if (Success != EventLoopStart()) {
+        break;
+      }
+
+      if (expected_count == eina_list_count(origins)) {
+        break;
+      }
+
+      if (!EventLoopWait(3.0)) {
+        break;
+      }
+    }
+  }
+
+protected:
+  Ewk_Context* ctx;
+  Eina_List* origins;
+protected:
+  static const char* const web_database_file;
+};
+
+const char* const utc_blink_ewk_context_web_database_delete_all::web_database_file = "ewk_context/WebDB2.html";
+
+/**
+* @brief Tests if can delete all web databases.
+*/
+TEST_F(utc_blink_ewk_context_web_database_delete_all, POS_TEST)
+{
+  // Load from file
+  std::string resurl = GetResourceUrl(web_database_file);
+  utc_message("Loading resource: %s", resurl.c_str());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Check if any origin is loaded
+  ASSERT_GE(1, eina_list_count(origins));
+
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_database_delete_all(ctx));
+  GetOrigins(0);
+  ASSERT_EQ(0, eina_list_count(origins));
+
+  // if there are no origins in db, the "origins" argument passed to callback is NULL
+  // see "void OnGetWebDBOrigins()" in "eweb_context.cc"
+  ASSERT_TRUE(origins == NULL);
+}
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_web_database_delete_all, NEG_TEST)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_web_database_delete_all(0));
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_delete_func.cpp
new file mode 100644 (file)
index 0000000..c2e29cc
--- /dev/null
@@ -0,0 +1,209 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_database_delete : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_web_database_delete()
+  : ctx(NULL)
+  , origins(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_web_database_delete()
+  {
+    SetOrigins(NULL);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    utc_message("[postSetUp] :: ");
+    ctx = ewk_view_context_get(GetEwkWebView());
+    ASSERT_TRUE(ctx != NULL);
+
+    ASSERT_EQ(EINA_TRUE, ewk_context_web_database_delete_all(ctx));
+
+    GetOrigins(0);
+    ASSERT_TRUE(origins == NULL);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("origins_get_cb: %p, %p", origins, user_data);
+    if (!user_data) {
+      ewk_context_origins_free(origins);
+      FAIL();
+    }
+    utc_blink_ewk_context_web_database_delete* owner = static_cast<utc_blink_ewk_context_web_database_delete*>(user_data);
+
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+  static void ScriptExecuteCallback(Evas_Object* o, const char* result_value, void* user_data)
+  {
+    utc_message("[scriptExecuteCallback] :: ");
+    ASSERT_TRUE(user_data);
+    utc_blink_ewk_context_web_database_delete* owner = static_cast<utc_blink_ewk_context_web_database_delete*>(user_data);
+    owner->EventLoopStop(Success);
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    utc_message("[setOrigins] :: ");
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+
+      origins = new_origins;
+
+      // print all origins
+      Eina_List* it;
+      void *vorigin = NULL;
+      EINA_LIST_FOREACH(origins, it, vorigin) {
+        Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(vorigin);
+        const char* host = ewk_security_origin_host_get(origin);
+        const char* protocol = ewk_security_origin_protocol_get(origin);
+        const int port = ewk_security_origin_port_get(origin);
+        utc_message("[ORIGIN] :: %s:%s:%d", protocol, host, port);
+      }
+    }
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    // web database operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_web_database_origins_get(ctx, origins_get_cb, this)) {
+        break;
+      }
+
+      if (Success != EventLoopStart()) {
+        break;
+      }
+
+      if (expected_count == eina_list_count(origins)) {
+        break;
+      }
+
+      if (!EventLoopWait(3.0)) {
+        break;
+      }
+    }
+  }
+
+  Ewk_Security_Origin* FindSecurityOrigin(const char* origin_host)
+  {
+    utc_message("FindSecurityOrigin: %s in %p", origin_host, origins);
+    Ewk_Security_Origin* retval = NULL;
+
+    if(origins && origin_host) {
+      Eina_List* it;
+      void *vorigin = NULL;
+      EINA_LIST_FOREACH(origins, it, vorigin) {
+        Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(vorigin);
+
+        const char* host = ewk_security_origin_host_get(origin);
+        const char* protocol = ewk_security_origin_protocol_get(origin);
+        if (host && strcmp(host, origin_host) == 0) {
+          retval = origin;
+          break;
+        }
+      }
+    }
+
+    return retval;
+  }
+
+protected:
+  static const char* const web_database_file;
+  static const char* const sample_origin;
+
+protected:
+  Ewk_Context* ctx;
+  Eina_List* origins;
+};
+
+const char* const utc_blink_ewk_context_web_database_delete::web_database_file = "ewk_context/WebDB2.html";
+const char* const utc_blink_ewk_context_web_database_delete::sample_origin = "";
+
+/**
+* @brief Tests if can delete web database.
+* If you encounter sql error "14 unable to open database file" set /tmp/databases/ write permissions.
+*/
+TEST_F(utc_blink_ewk_context_web_database_delete, POS_TEST)
+{
+  // Load from file
+  std::string resurl = GetResourceUrl(web_database_file);
+  utc_message("Loading resource: %s", resurl.c_str());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Number of different origins that are used in this test
+  const int origin_count = 1;
+
+  GetOrigins(origin_count);
+
+  ASSERT_TRUE(origins != NULL);
+  ASSERT_EQ(origin_count, eina_list_count(origins));
+
+  // remove sample origin
+  Ewk_Security_Origin* origin = FindSecurityOrigin(sample_origin);
+  ASSERT_TRUE(origin != NULL);
+
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_database_delete(ctx, origin));
+
+  // Wait for changes to propagate
+  GetOrigins(origin_count - 1);
+
+  // if there are no origins in db, the "origins" argument passed to callback is NULL
+  // see "void OnGetWebDBOrigins()" in "eweb_context.cc"
+  ASSERT_TRUE(origins == NULL);
+  ASSERT_EQ(origin_count - 1, eina_list_count(origins));
+
+  // verify security origin was removed
+  origin = FindSecurityOrigin(sample_origin);
+  ASSERT_TRUE(origin == NULL);
+}
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_web_database_delete, NEG_TEST1)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_context_web_database_delete(0, 0));
+}
+
+/**
+* @brief Tests if returns false when origin is null.
+*/
+TEST_F(utc_blink_ewk_context_web_database_delete, NEG_TEST2)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_context_web_database_delete(ctx, 0));
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_origins_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_database_origins_get_func.cpp
new file mode 100644 (file)
index 0000000..83341c3
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_database_origins_get : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_web_database_origins_get()
+    : ctx(NULL)
+  {
+  }
+
+  void PostSetUp()
+  {
+    utc_message("[postSetUp] :: ");
+    ctx = ewk_view_context_get(GetEwkWebView());
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Success);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("origins_get_cb: %p, %p", origins, user_data);
+    ASSERT_TRUE(origins);
+    ASSERT_TRUE(user_data);
+    ASSERT_GE(1, eina_list_count(origins));
+    utc_blink_ewk_context_web_database_origins_get* owner = static_cast<utc_blink_ewk_context_web_database_origins_get*>(user_data);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Ewk_Context* ctx;
+  static const char* const web_database_file;
+};
+
+const char* const utc_blink_ewk_context_web_database_origins_get::web_database_file = "ewk_context/WebDB2.html";
+
+/**
+* @brief Tests if can get web database origins after loading a web page.
+*/
+TEST_F(utc_blink_ewk_context_web_database_origins_get, POS_TEST)
+{
+  // Load from file
+  std::string resurl = GetResourceUrl(web_database_file);
+  utc_message("Loading resource: %s", resurl.c_str());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_database_origins_get(ctx, origins_get_cb, this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_web_database_origins_get, NEG_TEST1)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_web_database_origins_get(0, origins_get_cb, 0));
+}
+
+/**
+* @brief Tests if returns false which callback was null.
+*/
+TEST_F(utc_blink_ewk_context_web_database_origins_get, NEG_TEST2)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_web_database_origins_get(ctx, 0, 0));
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_indexed_database_delete_all_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_indexed_database_delete_all_func.cpp
new file mode 100644 (file)
index 0000000..d1b1b8e
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+*/
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_indexed_database_delete_all : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_web_indexed_database_delete_all()
+  : utc_blink_ewk_base()
+  {
+  }
+
+  static void title_changed(void* data, Evas_Object* webview, void* event)
+  {
+    static_cast<utc_blink_ewk_context_web_indexed_database_delete_all*>(data)->title = ewk_view_title_get(webview);
+    static_cast<utc_blink_ewk_context_web_indexed_database_delete_all*>(data)->EventLoopStop(Success);
+  }
+
+  virtual void LoadFinished(Evas_Object* webview)
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed, this);
+  }
+
+  virtual void PostSetUp()
+  {
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_web_indexed_database/CreateDB.html").c_str()));
+  }
+
+  virtual void PreTearDown()
+  {
+      evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed);
+  }
+
+protected:
+  std::string title;
+};
+
+/**
+* @brief Tests if indexed database is deleted when initiated properly.
+*/
+TEST_F(utc_blink_ewk_context_web_indexed_database_delete_all, POS_TEST)
+{
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_STREQ("success", utc_blink_ewk_context_web_indexed_database_delete_all::title.c_str());
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_indexed_database_delete_all(ewk_view_context_get(GetEwkWebView())));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_web_indexed_database/DBExists.html").c_str()));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  EXPECT_STREQ("error", utc_blink_ewk_context_web_indexed_database_delete_all::title.c_str());
+}
+
+/**
+* @brief Tests if indexed db is not deleted when initiated with NULL context.
+*/
+TEST_F(utc_blink_ewk_context_web_indexed_database_delete_all, NEG_TEST)
+{
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_STREQ("success", utc_blink_ewk_context_web_indexed_database_delete_all::title.c_str());
+  ASSERT_NE(EINA_TRUE, ewk_context_web_indexed_database_delete_all(0));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/ewk_context_web_indexed_database/DBExists.html").c_str()));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  EXPECT_STRNE("error", utc_blink_ewk_context_web_indexed_database_delete_all::title.c_str());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_delete_all_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_delete_all_func.cpp
new file mode 100644 (file)
index 0000000..d1198dc
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_storage_delete_all : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed);
+  }
+
+  static void title_changed(void* data, Evas_Object* webview, void* event_info)
+  {
+    ASSERT_TRUE(data != NULL);
+
+    utc_blink_ewk_context_web_storage_delete_all* owner = static_cast<utc_blink_ewk_context_web_storage_delete_all*>(data);
+
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+* @brief Tests if can delete all web storages
+*/
+TEST_F(utc_blink_ewk_context_web_storage_delete_all, POS_TEST)
+{
+  std::string storageItemValue;
+
+  // Set web storage item StorageTest=STORAGE_TEST_VALUE
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_context_web_storage/webStorageSet.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Check if the storage was properly set
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_context_web_storage/webStorageGet.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  storageItemValue = ewk_view_title_get(GetEwkWebView());
+  ASSERT_EQ("STORAGE_TEST_VALUE", storageItemValue);
+  EventLoopWait(3.0);
+
+  // Delete all web storage
+  Ewk_Context* context = ewk_view_context_get(GetEwkWebView());
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_storage_delete_all(context));
+
+  // Check if the storage was really deleted
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_context_web_storage/webStorageGet.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  storageItemValue = ewk_view_title_get(GetEwkWebView());
+  EXPECT_EQ("EMPTY", storageItemValue);
+}
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_web_storage_delete_all, NEG_TEST)
+{
+  EXPECT_FALSE(ewk_context_web_storage_delete_all(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_origin_delete_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_origin_delete_func.cpp
new file mode 100644 (file)
index 0000000..64ac2d5
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_storage_origin_delete: public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_context_web_storage_origin_delete()
+    : utc_blink_ewk_base()
+    , origins(NULL)
+    , ctx(NULL)
+  {
+  }
+
+  ~utc_blink_ewk_context_web_storage_origin_delete()
+  {
+    SetOrigins(NULL);
+  }
+
+  void PostSetUp()
+  {
+    ctx = ewk_view_context_get(GetEwkWebView());
+    ASSERT_TRUE(ctx != NULL);
+
+    // we want empty web storage at test start
+    ASSERT_EQ(EINA_TRUE, ewk_context_web_storage_delete_all(ctx));
+
+    GetOrigins(0);
+    ASSERT_TRUE(origins == NULL);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    utc_message("origins_get_cb: %p, %p", origins, user_data);
+    if (!user_data) {
+      ewk_context_origins_free(origins);
+      FAIL();
+    }
+
+    utc_blink_ewk_context_web_storage_origin_delete* owner = static_cast<utc_blink_ewk_context_web_storage_origin_delete*>(user_data);
+
+    owner->SetOrigins(origins);
+    owner->EventLoopStop(Success);
+  }
+
+  Ewk_Security_Origin* FindSecurityOrigin(const char* origin_host)
+  {
+    utc_message("FindSecurityOrigin: %s in %p", origin_host, origins);
+    Ewk_Security_Origin* retval = NULL;
+
+    if(origins && origin_host) {
+      Eina_List* it;
+      void *vorigin = NULL;
+      EINA_LIST_FOREACH(origins, it, vorigin) {
+        Ewk_Security_Origin* origin = static_cast<Ewk_Security_Origin*>(vorigin);
+
+        const char* host = ewk_security_origin_host_get(origin);
+        if (host && strcmp(host, origin_host) == 0) {
+          retval = origin;
+          break;
+        }
+      }
+    }
+
+    return retval;
+  }
+
+  void SetOrigins(Eina_List* new_origins)
+  {
+    if (new_origins != origins) {
+      if (origins) {
+        ewk_context_origins_free(origins);
+      }
+
+      origins = new_origins;
+    }
+  }
+
+  void GetOrigins(int expected_count)
+  {
+    // web storage operations are async, we must wait for changes to propagate
+    for (int i = 0; i < 3; ++i) {
+      if (EINA_TRUE != ewk_context_web_storage_origins_get(ctx, origins_get_cb, this)) {
+        break;
+      }
+
+      if (Success != EventLoopStart()) {
+        break;
+      }
+
+      if (expected_count == eina_list_count(origins)) {
+        break;
+      }
+
+      if (!EventLoopWait(3.0)) {
+        break;
+      }
+    }
+  }
+
+protected:
+  static const char* const web_storage_sample_resource;
+  static const char* const web_storage_sample_url;
+  static const char* const sample_origin;
+
+protected:
+  Eina_List* origins;
+  Ewk_Context* ctx;
+};
+
+const char* const utc_blink_ewk_context_web_storage_origin_delete::web_storage_sample_resource = "ewk_context_web_storage/web_storage_create_simple.html";
+const char* const utc_blink_ewk_context_web_storage_origin_delete::web_storage_sample_url = "http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_webstorage_local";
+const char* const utc_blink_ewk_context_web_storage_origin_delete::sample_origin = "www.w3schools.com";
+
+/**
+* @brief Tests if can delete all web storages
+*/
+TEST_F(utc_blink_ewk_context_web_storage_origin_delete, POS_TEST)
+{
+  // load some pages with web storage
+  std::string resurl = GetResourceUrl(web_storage_sample_resource);
+  utc_message("Loading resource: %s", resurl.c_str());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  utc_message("Loading web page: %s", web_storage_sample_url);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), web_storage_sample_url));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  GetOrigins(2);
+  ASSERT_TRUE(origins != NULL);
+  ASSERT_EQ(2, eina_list_count(origins));
+
+  // remove sample origin
+  Ewk_Security_Origin* origin = FindSecurityOrigin(sample_origin);
+  ASSERT_TRUE(origin != NULL);
+
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_storage_origin_delete(ctx, origin));
+
+  GetOrigins(1);
+  ASSERT_TRUE(origins != NULL);
+  ASSERT_EQ(1, eina_list_count(origins));
+
+  // verify security origin was removed
+  origin = FindSecurityOrigin(sample_origin);
+  ASSERT_TRUE(origin == NULL);
+}
+
+/**
+* @brief Tests if returns false when context is null.
+*/
+TEST_F(utc_blink_ewk_context_web_storage_origin_delete, invalid_args)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_context_web_storage_origin_delete(NULL, NULL));
+  EXPECT_EQ(EINA_FALSE, ewk_context_web_storage_origin_delete(ctx, NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_origins_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_web_storage_origins_get_func.cpp
new file mode 100644 (file)
index 0000000..303387f
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_context_web_storage_origins_get: public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_context_web_storage_origins_get()
+    : ctx(NULL)
+  {
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    ctx = ewk_view_context_get(GetEwkWebView());
+    ASSERT_TRUE(ctx);
+  }
+
+  static void origins_get_cb(Eina_List* origins, void* user_data)
+  {
+    // We don't need origins here
+    if (origins) {
+      ewk_context_origins_free(origins);
+    }
+
+    ASSERT_TRUE(user_data);
+
+    utc_blink_ewk_context_web_storage_origins_get* owner = static_cast<utc_blink_ewk_context_web_storage_origins_get*>(user_data);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Ewk_Context* ctx;
+  static const char* const web_storage_sample_url;
+};
+
+const char* const utc_blink_ewk_context_web_storage_origins_get::web_storage_sample_url = "http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_webstorage_local";
+
+TEST_F(utc_blink_ewk_context_web_storage_origins_get, callback)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), web_storage_sample_url));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_context_web_storage_origins_get(ctx, origins_get_cb, this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_context_web_storage_origins_get, invalid_args)
+{
+  ASSERT_EQ(EINA_FALSE, ewk_context_web_storage_origins_get(NULL, NULL, NULL));
+  ASSERT_EQ(EINA_FALSE, ewk_context_web_storage_origins_get(ctx, NULL, NULL));
+  ASSERT_EQ(EINA_FALSE, ewk_context_web_storage_origins_get(NULL, origins_get_cb, NULL));
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_accept_policy_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_accept_policy_set_func.cpp
new file mode 100755 (executable)
index 0000000..b9d542b
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_cookie_manager_accept_policy_set : public utc_blink_ewk_base
+{
+protected:
+  Ewk_Cookie_Accept_Policy cookies_policy;
+
+  static void cookies_policy_get_cb(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info)
+  {
+    utc_blink_ewk_cookie_manager_accept_policy_set *owner = static_cast<utc_blink_ewk_cookie_manager_accept_policy_set*>(event_info);
+    owner->cookies_policy = policy;
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Checking whether cookies's policy is returned to EWK_COOKIE_ACCEPT_POLICY_NEVER.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_accept_policy_set, POS_TEST1)
+{
+  cookies_policy = EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
+
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_NEVER);
+  ewk_cookie_manager_async_accept_policy_get(cookieManager, cookies_policy_get_cb, this);
+
+  // Wait until callback finished.
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(cookies_policy, EWK_COOKIE_ACCEPT_POLICY_NEVER);
+}
+
+/**
+ * @brief Checking whether cookies's policy is returned to EWK_COOKIE_ACCEPT_POLICY_ALWAYS.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_accept_policy_set, POS_TEST2)
+{
+  cookies_policy = EWK_COOKIE_ACCEPT_POLICY_NEVER;
+
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+  ewk_cookie_manager_async_accept_policy_get(cookieManager, cookies_policy_get_cb, this);
+
+  // Wait until callback finished.
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(cookies_policy, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+}
+
+/**
+ * @brief Checking whether cookies's policy is returned to EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_accept_policy_set, POS_TEST3)
+{
+  cookies_policy = EWK_COOKIE_ACCEPT_POLICY_NEVER;
+
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
+  ewk_cookie_manager_async_accept_policy_get(cookieManager, cookies_policy_get_cb, this);
+
+  // Wait until callback finished.
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_eq(cookies_policy, EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_accept_policy_set, NEG_TEST1)
+{
+  ewk_cookie_manager_accept_policy_set(NULL, EWK_COOKIE_ACCEPT_POLICY_NEVER);
+  ewk_cookie_manager_async_accept_policy_get(NULL, NULL, NULL);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_accept_policy_set, NEG_TEST2)
+{
+  ewk_cookie_manager_accept_policy_set(NULL, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+  ewk_cookie_manager_async_accept_policy_get(NULL, NULL, NULL);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+TEST_F(utc_blink_ewk_cookie_manager_accept_policy_set, NEG_TEST3)
+{
+  ewk_cookie_manager_accept_policy_set(NULL, EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
+  ewk_cookie_manager_async_accept_policy_get(NULL, NULL, NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_async_accept_policy_get_func.cpp
new file mode 100755 (executable)
index 0000000..d6aa935
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_cookie_manager_async_accept_policy_get : public utc_blink_ewk_base
+{
+protected:
+  Ewk_Cookie_Accept_Policy cookies_policy;
+
+  static void cookies_policy_get_cb(Ewk_Cookie_Accept_Policy policy, Ewk_Error* error, void* event_info)
+  {
+    ASSERT_TRUE(event_info);
+    utc_blink_ewk_cookie_manager_async_accept_policy_get* owner = static_cast<utc_blink_ewk_cookie_manager_async_accept_policy_get*>(event_info);
+    owner->cookies_policy = policy;
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+TEST_F(utc_blink_ewk_cookie_manager_async_accept_policy_get, positive_test)
+{
+  cookies_policy = EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
+
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ASSERT_TRUE(cookieManager);
+  ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_NEVER);
+  ewk_cookie_manager_async_accept_policy_get(cookieManager, cookies_policy_get_cb, this);
+
+  ASSERT_EQ(Success,  EventLoopStart());
+  ASSERT_EQ(cookies_policy, EWK_COOKIE_ACCEPT_POLICY_NEVER);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_async_accept_policy_get, invalid_param_callback)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ASSERT_TRUE(cookieManager);
+  ewk_cookie_manager_async_accept_policy_get(cookieManager, NULL, this);
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_async_accept_policy_get, invalid_param_cookie_manager)
+{
+  ewk_cookie_manager_async_accept_policy_get(NULL, cookies_policy_get_cb, this);
+  ASSERT_EQ(Failure,  EventLoopStart(3)) << "This callback shall never be called";
+}
+
+TEST_F(utc_blink_ewk_cookie_manager_async_accept_policy_get, invalid_param_all)
+{
+  ewk_cookie_manager_async_accept_policy_get(NULL, NULL, NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_cookies_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_cookie_manager_cookies_clear_func.cpp
new file mode 100755 (executable)
index 0000000..043c376
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_cookie_manager_cookies_clear : public utc_blink_ewk_base {
+protected:
+  static void getHostnamesWithCookiesCallback(Eina_List* hostnames, Ewk_Error* error, void* event_info)
+  {
+    ASSERT_TRUE(error == 0);
+    ASSERT_TRUE(event_info != NULL);
+
+    utc_blink_ewk_cookie_manager_cookies_clear* owner = static_cast<utc_blink_ewk_cookie_manager_cookies_clear*>(event_info);
+
+    owner->host_count = eina_list_count(hostnames);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  int host_count;
+};
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_cookies_clear()
+ */
+TEST_F(utc_blink_ewk_cookie_manager_cookies_clear, POS_TEST)
+{
+  Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(GetEwkWebView()));
+  ASSERT_TRUE(cookieManager != NULL);
+
+  ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://www.google.com"));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ewk_cookie_manager_async_hostnames_with_cookies_get(cookieManager, getHostnamesWithCookiesCallback, this);
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ASSERT_NE(host_count, 0);
+
+  // Second page load
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://m.naver.com"));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ewk_cookie_manager_async_hostnames_with_cookies_get(cookieManager, getHostnamesWithCookiesCallback, this);
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ASSERT_NE(host_count, 0);
+
+  // Clear all cookies
+  ewk_cookie_manager_cookies_clear(cookieManager);
+
+  ewk_cookie_manager_async_hostnames_with_cookies_get(cookieManager, getHostnamesWithCookiesCallback, this);
+  ASSERT_EQ(Success, EventLoopStart());
+
+  EXPECT_EQ(host_count, 0);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL is sent.
+*/
+TEST_F(utc_blink_ewk_cookie_manager_cookies_clear, NEG_TEST)
+{
+  ewk_cookie_manager_cookies_clear(NULL);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_base_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_base_url_get_func.cpp
new file mode 100644 (file)
index 0000000..1179991
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_custom_handlers_data_base_url_get: public utc_blink_ewk_base {
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Failure);
+  }
+
+  static void custom_handler(utc_blink_ewk_custom_handlers_data_base_url_get* owner, Evas_Object* /*webview*/, Ewk_Custom_Handlers_Data* custom_handler_data)
+  {
+    utc_message("[custom handler] :: \n");
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != custom_handler_data);
+
+    ASSERT_STREQ("codebits.glennjones.net", ewk_custom_handlers_data_base_url_get(custom_handler_data));
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Checking if base_url is returned properly.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_base_url_get, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://codebits.glennjones.net/registerprotocol/register.html"));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking if NULL is returned when custom_handler_data is NULL.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_base_url_get, NEG_TEST)
+{
+  ASSERT_EQ(NULL, ewk_custom_handlers_data_base_url_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_result_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_result_set_func.cpp
new file mode 100755 (executable)
index 0000000..40be1a2
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_custom_handlers_data_result_set : public utc_blink_ewk_base {
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"protocolhandler,registration,requested", custom_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"protocolhandler,registration,requested", custom_handler);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Failure);
+  }
+
+  static void custom_handler(void* data, Evas_Object* /*webview*/, void* event_info)
+  {
+    utc_message("[custom handler] :: \n");
+
+    ASSERT_TRUE(data != NULL);
+    ASSERT_TRUE(event_info != NULL);
+
+    utc_blink_ewk_custom_handlers_data_result_set* owner = static_cast<utc_blink_ewk_custom_handlers_data_result_set*>(data);
+    Ewk_Custom_Handlers_Data* custom_handler_data = static_cast<Ewk_Custom_Handlers_Data*>(event_info);
+
+    ewk_custom_handlers_data_result_set(custom_handler_data, EWK_CUSTOM_HANDLERS_DECLINED);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const URL;
+};
+
+const char* const utc_blink_ewk_custom_handlers_data_result_set::URL = "http://codebits.glennjones.net/registerprotocol/register.html";
+
+/**
+ * @brief Checking whether sending cancellation notification for authentication challenge works properly.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_result_set, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), URL));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a custom_handler_data.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_result_set, NEG_TEST)
+{
+  ewk_custom_handlers_data_result_set(NULL, EWK_CUSTOM_HANDLERS_DECLINED);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_target_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_target_get_func.cpp
new file mode 100644 (file)
index 0000000..fc7f8e0
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_custom_handlers_data_target_get: public utc_blink_ewk_base {
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Failure);
+  }
+
+  static void custom_handler(utc_blink_ewk_custom_handlers_data_target_get* owner, Evas_Object* /*webview*/, Ewk_Custom_Handlers_Data* custom_handler_data)
+  {
+    utc_message("[custom handler] :: \n");
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != custom_handler_data);
+
+    ASSERT_STREQ("tel", ewk_custom_handlers_data_target_get(custom_handler_data));
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Checking if base_url is returned properly.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_target_get, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://codebits.glennjones.net/registerprotocol/register.html"));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking if NULL is returned when custom_handler_data is NULL.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_target_get, NEG_TEST)
+{
+  ASSERT_EQ(NULL, ewk_custom_handlers_data_target_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_title_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_title_get_func.cpp
new file mode 100644 (file)
index 0000000..9ece72c
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_custom_handlers_data_title_get: public utc_blink_ewk_base {
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Failure);
+  }
+
+  static void custom_handler(utc_blink_ewk_custom_handlers_data_title_get* owner, Evas_Object* /*webview*/, Ewk_Custom_Handlers_Data* custom_handler_data)
+  {
+    utc_message("[custom handler] :: \n");
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != custom_handler_data);
+
+    ASSERT_STREQ("Telephony App", ewk_custom_handlers_data_title_get(custom_handler_data));
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Checking if base_url is returned properly.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_title_get, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://codebits.glennjones.net/registerprotocol/register.html"));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking if NULL is returned when custom_handler_data is NULL.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_title_get, NEG_TEST)
+{
+  ASSERT_EQ(NULL, ewk_custom_handlers_data_title_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_custom_handlers_data_url_get_func.cpp
new file mode 100644 (file)
index 0000000..2dd942a
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_custom_handlers_data_url_get: public utc_blink_ewk_base {
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"protocolhandler,registration,requested", (void(*)(void*, Evas_Object*, void*))custom_handler);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    EventLoopStop(Failure);
+  }
+
+  static void custom_handler(utc_blink_ewk_custom_handlers_data_url_get* owner, Evas_Object* /*webview*/, Ewk_Custom_Handlers_Data* custom_handler_data)
+  {
+    utc_message("[custom handler] :: \n");
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != custom_handler_data);
+
+    ASSERT_STREQ("http://codebits.glennjones.net/registerprotocol/register.html?%s", ewk_custom_handlers_data_url_get(custom_handler_data));
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Checking if base_url is returned properly.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_url_get, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://codebits.glennjones.net/registerprotocol/register.html"));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Checking if NULL is returned when custom_handler_data is NULL.
+*/
+TEST_F(utc_blink_ewk_custom_handlers_data_url_get, NEG_TEST)
+{
+  ASSERT_EQ(NULL, ewk_custom_handlers_data_url_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_error_code_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_error_code_get_func.cpp
new file mode 100755 (executable)
index 0000000..6768357
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_error_code_get : public utc_blink_ewk_base {
+protected:
+  /* Callback for load error */
+  bool LoadError(Evas_Object* webview, Ewk_Error* error)
+  {
+    utc_message("LoadError");
+    int err = ewk_error_code_get(error);
+
+    if (err != 0) {
+      EventLoopStop(utc_blink_ewk_base::Success);
+      return true;
+    }
+
+    // returning false will cause default behaviour - exiting main loop with Failure
+    return false;
+  }
+
+  /* Callback for load progress */
+  void LoadProgress(Evas_Object* webview, double progress)
+  {
+    utc_message("LoadProgress");
+    ewk_view_stop(webview);
+  }
+
+protected:
+  static const char* const test_url;
+};
+
+const char* const utc_blink_ewk_error_code_get::test_url = "http://google.com";
+
+/**
+ * @brief Positive test case of ewk_error_code_get(). Page is loaded and stopped in between to generate loadError
+ */
+TEST_F(utc_blink_ewk_error_code_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), test_url);
+
+  if (!result) {
+    utc_fail();
+  }
+
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+  utc_check_eq(loop_result, utc_blink_ewk_base::Success);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL argument.
+*/
+TEST_F(utc_blink_ewk_error_code_get, NEG_TEST)
+{
+  utc_check_eq(ewk_error_code_get(NULL), 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_error_description_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_error_description_get_func.cpp
new file mode 100755 (executable)
index 0000000..02129ac
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_error_description_get : public utc_blink_ewk_base {
+protected:
+  /* Callback for load error */
+  bool LoadError(Evas_Object* webview, Ewk_Error* error)
+  {
+    utc_message("[load_error] :: ");
+
+    if(ewk_error_description_get(error)) {
+      EventLoopStop(utc_blink_ewk_base::Success);
+      return true; // handled load error, supress default behaviour
+    }
+
+    return false; // fallback default behaviour
+  }
+
+  /* Callback for load progress */
+  void LoadProgress(Evas_Object *webview, double progress)
+  {
+    ewk_view_stop(webview);
+  }
+
+protected:
+  static const char* const test_url;
+};
+
+const char* const utc_blink_ewk_error_description_get::test_url = "http://google.com";
+/**
+ * @brief Positive test case of ewk_error_description_get(). Page is loaded and stopped in between to generate loadError
+ */
+TEST_F(utc_blink_ewk_error_description_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), test_url);
+  if (!result) {
+    utc_fail();
+  }
+
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+  utc_check_eq(utc_blink_ewk_base::Success, loop_result);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL argument.
+*/
+TEST_F(utc_blink_ewk_error_description_get, NEG_TEST)
+{
+  const char* description = ewk_error_description_get(NULL);
+  utc_check_eq(NULL, description);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_error_type_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_error_type_get_func.cpp
new file mode 100755 (executable)
index 0000000..a7b309b
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_error_type_get : public utc_blink_ewk_base {
+ protected:
+  utc_blink_ewk_error_type_get()
+    : error_type(EWK_ERROR_TYPE_NONE)
+  {
+  }
+
+  /* Callback for load error */
+  bool LoadError(Evas_Object* webview, Ewk_Error* error)
+  {
+    utc_message("[load_error] :: ");
+    error_type = ewk_error_type_get(error);
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return true;
+  }
+
+  /* Callback for load progress */
+  void LoadProgress(Evas_Object* webview, double progress)
+  {
+    ewk_view_stop(webview);
+  }
+
+protected:
+  Ewk_Error_Type error_type;
+  static const char* const test_url;
+};
+
+const char* const utc_blink_ewk_error_type_get::test_url = "http://google.com";
+
+/**
+ * @brief Positive test case of ewk_error_type_get(). Page is loaded and stopped in between to generate loadError
+ */
+TEST_F(utc_blink_ewk_error_type_get, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), test_url));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_EQ(EWK_ERROR_TYPE_NETWORK, error_type); // right now this is the only error type supported
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL argument.
+*/
+TEST_F(utc_blink_ewk_error_type_get, NEG_TEST)
+{
+  ASSERT_EQ(EWK_ERROR_TYPE_NONE, ewk_error_type_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_error_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_error_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..575670c
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_error_url_get : public utc_blink_ewk_base {
+ protected:
+  /* Callback for load error */
+  bool LoadError(Evas_Object* webview, Ewk_Error* error)
+  {
+    utc_message("[load_error] :: ");
+    if(ewk_error_url_get(error)) {
+      EventLoopStop(utc_blink_ewk_base::Success);
+      return true;
+    }
+
+    return false;
+  }
+
+  /* Callback for load progress */
+  void LoadProgress(Evas_Object* webview, double progress)
+  {
+    ewk_view_stop(webview);
+  }
+
+protected:
+  static const char* const test_url;
+};
+
+const char* const utc_blink_ewk_error_url_get::test_url = "http://google.com";
+
+/**
+ * @brief Positive test case of ewk_error_url_get(). Page is loaded and stopped in between to generate loadError
+ */
+TEST_F(utc_blink_ewk_error_url_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), test_url);
+  if (!result)
+    utc_fail();
+
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+  utc_check_eq(loop_result, utc_blink_ewk_base::Success);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL argument.
+*/
+TEST_F(utc_blink_ewk_error_url_get, NEG_TEST)
+{
+  const char* url = ewk_error_url_get(NULL);
+  utc_check_eq(NULL, url);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_frame_is_main_frame_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_frame_is_main_frame_func.cpp
new file mode 100644 (file)
index 0000000..f1bba6f
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_frame_is_main_frame: public utc_blink_ewk_base
+{
+protected:
+  static void main_frame_check(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("  [ %s ]", __PRETTY_FUNCTION__);
+    CheckIsMainFrame(data, event_info, EINA_TRUE);
+  }
+
+  static void sub_frame_check(void* data, Evas_Object* webview, void* event_info)
+  {
+    CheckIsMainFrame(data, event_info, EINA_FALSE);
+  }
+
+  static void CheckIsMainFrame(void* data, void* event_info, Eina_Bool expected_value)
+  {
+    utc_message("  [ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(data);
+    ASSERT_TRUE(event_info);
+
+    utc_blink_ewk_frame_is_main_frame* owner = NULL;
+    OwnerFromVoid(data, &owner);
+
+    Ewk_Policy_Decision* policy_decision = static_cast<Ewk_Policy_Decision*>(event_info);
+    Ewk_Frame_Ref frame = ewk_policy_decision_frame_get(policy_decision);
+
+    ASSERT_TRUE(frame);
+    if (ewk_frame_is_main_frame(frame) == expected_value) {
+      owner->EventLoopStop(Success);
+    }
+  }
+};
+
+TEST_F(utc_blink_ewk_frame_is_main_frame, MAIN_FRAME)
+{
+  evas_object_smart_callback_auto scb(GetEwkWebView(), "policy,navigation,decide", main_frame_check, this);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://www.google.com"));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_frame_is_main_frame, SUB_FRAME)
+{
+  evas_object_smart_callback_auto scb(GetEwkWebView(), "policy,navigation,decide", sub_frame_check, this);
+  std::string resurl = GetResourceUrl("ewk_frame/iframetest.html");
+  ASSERT_NE(resurl.length(), 0);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_frame_is_main_frame, INVALID_ARGS)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_frame_is_main_frame(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_origin_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_origin_get_func.cpp
new file mode 100755 (executable)
index 0000000..15eca4c
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE                 ("/common/sample_js_geolocation.html")
+
+class utc_blink_ewk_geolocation_permission_request_origin_get : public utc_blink_ewk_base {
+
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"geolocation,permission,request", request_geolocation_permisson, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"geolocation,permission,request", request_geolocation_permisson);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void request_geolocation_permisson(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[request_geolocation_permisson] :: \n");
+    utc_blink_ewk_geolocation_permission_request_origin_get *owner = static_cast<utc_blink_ewk_geolocation_permission_request_origin_get*>(data);
+
+    Ewk_Geolocation_Permission_Request* permission_request = (Ewk_Geolocation_Permission_Request*)event_info;
+    if (permission_request && ewk_geolocation_permission_request_origin_get(permission_request)) {
+
+        owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Positive test whether Ewk_Geolocation_Permission_Request has the Ewk_Security_Origin value when web page requests geolocation permission for frame.
+ */
+TEST_F(utc_blink_ewk_geolocation_permission_request_origin_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+//TODO: this code should use ewk_geolocation_permission_request_origin_get and check its behaviour.
+//Results should be reported using one of utc_ macros
+}
+
+/**
+ * @brief Negative test whether Ewk_Geolocation_Permission_Data has the Ewk_Geolocation_Permission_Request value when web page requests geolocation permission for frame.
+ */
+TEST_F(utc_blink_ewk_geolocation_permission_request_origin_get, NEG_TEST)
+{
+  Eina_Bool test_result = EINA_FALSE;
+  if( ewk_geolocation_permission_request_origin_get(NULL) ) {
+
+    test_result = EINA_TRUE;
+  }
+  utc_check_ne(test_result, EINA_TRUE);
+
+//TODO: this code should use ewk_geolocation_permission_request_origin_get and check its behaviour.
+//Results should be reported using one of utc_ macros
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_set_func.cpp
new file mode 100755 (executable)
index 0000000..ede7b26
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE                 ("/common/sample_js_geolocation.html")
+
+class utc_blink_ewk_geolocation_permission_request_set : public utc_blink_ewk_base {
+
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"geolocation,permission,request", request_geolocation_permisson, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"geolocation,permission,request", request_geolocation_permisson);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void request_geolocation_permisson(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[request_geolocation_permisson] :: \n");
+    utc_blink_ewk_geolocation_permission_request_set *owner = static_cast<utc_blink_ewk_geolocation_permission_request_set*>(data);
+
+    Ewk_Geolocation_Permission_Request* permission_request = (Ewk_Geolocation_Permission_Request*)event_info;
+    if (permission_request && ewk_geolocation_permission_request_set(permission_request, EINA_TRUE)) {
+
+       owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Positive test whether request of permission is allowed when web page requests geolocation permission for frame.
+ */
+TEST_F(utc_blink_ewk_geolocation_permission_request_set, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+//TODO: this code should use ewk_geolocation_permission_request_set and check its behaviour.
+//Results should be reported using one of utc_ macros */
+}
+
+/**
+ * @brief Negative test whether request of permission is allowed when web page requests geolocation permission for frame.
+ */
+TEST_F(utc_blink_ewk_geolocation_permission_request_set, NEG_TEST)
+{
+  Eina_Bool test_result = EINA_FALSE;
+  if( ewk_geolocation_permission_request_set(NULL, EINA_TRUE) ) {
+
+    test_result = EINA_TRUE;
+  }
+
+//TODO: this code should use ewk_geolocation_permission_request_set and check its behaviour.
+//Results should be reported using one of utc_ macros */
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_geolocation_permission_request_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..124eb47
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+static const char* PERMISSION_DENIED = "EWK Geolocation PERMISSION_DENIED";
+static const char* POSITION_UNAVAILABLE = "EWK Geolocation POSITION_UNAVAILABLE";
+static const char* GEOLOCATION_SUCCESS = "EWK Geolocation SUCCESS";
+
+#define SAMPLE_HTML_FILE                 ("/common/sample_js_geolocation.html")
+
+class utc_blink_ewk_geolocation_permission_request_suspend : public utc_blink_ewk_base {
+
+protected:
+
+  Eina_Bool call_request_suspend;
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"geolocation,permission,request", request_geolocation_permisson, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", onTitleChanged, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"geolocation,permission,request", request_geolocation_permisson);
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", onTitleChanged);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+    //EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static Eina_Bool geolocation_permision_request_set_wrapper(void* permission_request)
+  {
+     Eina_Bool ret = ewk_geolocation_permission_request_set((Ewk_Geolocation_Permission_Request*)permission_request, EINA_TRUE);
+
+     EXPECT_TRUE(ret);
+
+     //return ECORE_CALLBACK_CANCEL to stop calling function by timer.
+     return ECORE_CALLBACK_CANCEL;
+  }
+
+  static void request_geolocation_permisson(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[request_geolocation_permisson] :: \n");
+    utc_blink_ewk_geolocation_permission_request_suspend *owner = static_cast<utc_blink_ewk_geolocation_permission_request_suspend*>(data);
+    Ewk_Geolocation_Permission_Request* permission_request = (Ewk_Geolocation_Permission_Request*)event_info;
+
+    /*
+     * If call_request_suspend is equal EINA_TRUE then
+     * ewk_geolocation_permission_request_suspend is invoke, otherwise is not call.
+     */
+    if (owner->call_request_suspend) {
+
+      ewk_geolocation_permission_request_suspend(permission_request);
+      ecore_timer_add(2, geolocation_permision_request_set_wrapper, permission_request);
+    }
+  }
+
+  static void onTitleChanged(void* userData, Evas_Object* webView, void* event_info)
+  {
+    utc_message("[onTitleChanged] :: \n");
+
+    if (!userData) {
+      FAIL();
+    }
+
+    utc_blink_ewk_geolocation_permission_request_suspend *owner = static_cast<utc_blink_ewk_geolocation_permission_request_suspend*>(userData);
+
+    if (owner->call_request_suspend) {
+      // Positive test:
+      // In some situations although that geolocation permission request is set to EINA_TRUE,
+      // geolocation position cannot be obtained because GPS signal is unavailable.
+      // Thus both state POSITION_UNAVAILABLE and GEOLOCATION_SUCCESS are possible.
+      // However if permission is denied then it is incorrect behaviour.
+      if (!strcmp(POSITION_UNAVAILABLE, (char*)event_info) || !strcmp(GEOLOCATION_SUCCESS, (char*)event_info)) {
+
+        owner->EventLoopStop(utc_blink_ewk_base::Success);       
+      }
+      else if (!strcmp(PERMISSION_DENIED, (char*)event_info)) {
+
+        owner->EventLoopStop(utc_blink_ewk_base::Failure);
+      }
+    } else {
+      // Negative test:
+      // The permission should be denied.
+      if (!strcmp(PERMISSION_DENIED, (char*)event_info)) {
+
+        owner->EventLoopStop(utc_blink_ewk_base::Success);
+      }
+    }
+  }
+};
+
+/**
+* @brief Positive test whether geolocation permission request is successfully suspended.
+* When geolocation permission request is suspended then ewk_geolocation_permission_request_set can be invoked
+* after the request_geolocation_permisson callback. If geolocation permission request will be set to EINA_TRUE
+* then geolocation position should be successfully obtained or if the current GPS position is unavailable then
+* geolocation position should be UNAVAILABLE.
+*/
+TEST_F(utc_blink_ewk_geolocation_permission_request_suspend, POS_TEST)
+{
+//TODO: this code should use ewk_geolocation_permission_request_suspend and check its behaviour.
+//Results should be reported using one of utc_ macros */
+  call_request_suspend = EINA_TRUE;
+
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+* @brief Negative test whether geolocation errorCallback is invoked when ewk_geolocation_permission_request_suspend is NOT called.
+* When call_request_suspend is equal EINA_FALSE then ewk_geolocation_permission_request_suspend is NOT invoked in request_geolocation_permisson
+* callback. Because geolocation permission request is NOT suspend, thus errorCallback with PERMISSION_DENIED error code should be invoked.
+*/
+TEST_F(utc_blink_ewk_geolocation_permission_request_suspend, NEG_TEST)
+{
+//TODO: this code should use ewk_geolocation_permission_request_suspend and check its behaviour.
+//Results should be reported using one of utc_ macros */
+
+  ewk_geolocation_permission_request_suspend(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_history_back_list_length_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_history_back_list_length_get_func.cpp
new file mode 100644 (file)
index 0000000..c905eae
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_history_back_list_length_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_history_back_list_length_get::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_history_back_list_length_get::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_history_back_list_length_get::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_history_back_list_length_get, EMPTY_TEST)
+{
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+  ASSERT_EQ(0, ewk_history_back_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_back_list_length_get, NOT_EMPTY_TEST)
+{
+  // load first page
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // get history
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+
+  ASSERT_EQ(0, ewk_history_back_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+
+  // load second page
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_EQ(1, ewk_history_back_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+
+  // load third page
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_EQ(2, ewk_history_back_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_EQ(1, ewk_history_back_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_back_list_length_get, NULL_HISTORY_TEST)
+{
+  ASSERT_EQ(0, ewk_history_back_list_length_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_history_forward_list_length_get.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_history_forward_list_length_get.cpp
new file mode 100644 (file)
index 0000000..f365f79
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_history_forward_list_length_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_history_forward_list_length_get::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_history_forward_list_length_get::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_history_forward_list_length_get::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_history_forward_list_length_get, EMPTY_TEST)
+{
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+  ASSERT_EQ(0, ewk_history_forward_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_forward_list_length_get, NOT_EMPTY_TEST)
+{
+  // load first page
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // load second page
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // load third page
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // get history
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_EQ(0, ewk_history_forward_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_EQ(1, ewk_history_forward_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_EQ(2, ewk_history_forward_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_forward_list_length_get, NULL_HISTORY_TEST)
+{
+  ASSERT_EQ(0, ewk_history_forward_list_length_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_history_free_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_history_free_func.cpp
new file mode 100644 (file)
index 0000000..3e402b1
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_history_free : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL;
+};
+
+const char* const utc_blink_ewk_history_free::TEST_URL = "ewk_history/page1.html";
+
+TEST_F(utc_blink_ewk_history_free, EXISTING_HISTORY)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_free, EXISTING_EMPTY_HISTORY)
+{
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_free, NULL_HISTORY)
+{
+  ewk_history_free(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_history_item_title_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_history_item_title_get_func.cpp
new file mode 100644 (file)
index 0000000..91cc8ea
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_history_item_title_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_history_item_title_get::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_history_item_title_get::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_history_item_title_get::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_history_item_title_get, EXISTING_HISTORY)
+{
+  // load 3 pages to get some interesting history
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle1(ewk_view_title_get(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle2(ewk_view_title_get(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle3(ewk_view_title_get(GetEwkWebView()));
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  // get current item
+  Ewk_History_Item *item = ewk_history_nth_item_get(history, 0);
+
+  ASSERT_TRUE(item);
+  ASSERT_STREQ(expectedTitle2.c_str(), ewk_history_item_title_get(item));
+
+  // get back item
+  item = ewk_history_nth_item_get(history, -1);
+
+  ASSERT_TRUE(item);
+  ASSERT_STREQ(expectedTitle1.c_str(), ewk_history_item_title_get(item));
+
+  // get forward item
+  item = ewk_history_nth_item_get(history, 1);
+
+  ASSERT_TRUE(item);
+  ASSERT_STREQ(expectedTitle3.c_str(), ewk_history_item_title_get(item));
+
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_item_title_get, NULL_ITEM)
+{
+  ASSERT_FALSE(ewk_history_item_title_get(NULL));
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_history_item_uri_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_history_item_uri_get_func.cpp
new file mode 100644 (file)
index 0000000..969f6a9
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_history_item_uri_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_history_item_uri_get::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_history_item_uri_get::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_history_item_uri_get::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_history_item_uri_get, EXISTING_HISTORY)
+{
+  // load 3 pages to get some interesting history
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  // get current item
+  Ewk_History_Item *item = ewk_history_nth_item_get(history, 0);
+
+  ASSERT_TRUE(item);
+  ASSERT_STREQ(GetResourceUrl(TEST_URL2).c_str(), ewk_history_item_uri_get(item));
+
+  // get back item
+  item = ewk_history_nth_item_get(history, -1);
+
+  ASSERT_TRUE(item);
+  ASSERT_STREQ(GetResourceUrl(TEST_URL1).c_str(), ewk_history_item_uri_get(item));
+
+  // get forward item
+  item = ewk_history_nth_item_get(history, 1);
+
+  ASSERT_TRUE(item);
+  ASSERT_STREQ(GetResourceUrl(TEST_URL3).c_str(), ewk_history_item_uri_get(item));
+
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_item_uri_get, NULL_ITEM)
+{
+  ASSERT_FALSE(ewk_history_item_uri_get(NULL));
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_history_nth_item_get.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_history_nth_item_get.cpp
new file mode 100644 (file)
index 0000000..7c571ba
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_history_nth_item_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_history_nth_item_get::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_history_nth_item_get::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_history_nth_item_get::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_history_nth_item_get, EXISTING_HISTORY)
+{
+  // load 3 pages to get some interesting history
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle1(ewk_view_title_get(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle2(ewk_view_title_get(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle3(ewk_view_title_get(GetEwkWebView()));
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  // get current item
+  Ewk_History_Item *item = ewk_history_nth_item_get(history, 0);
+
+  ASSERT_TRUE(item);
+
+  ASSERT_STREQ(expectedTitle2.c_str(), ewk_history_item_title_get(item));
+  ASSERT_STREQ(GetResourceUrl(TEST_URL2).c_str(), ewk_history_item_uri_get(item));
+
+  // get back item
+  item = ewk_history_nth_item_get(history, -1);
+
+  ASSERT_TRUE(item);
+
+  ASSERT_STREQ(expectedTitle1.c_str(), ewk_history_item_title_get(item));
+  ASSERT_STREQ(GetResourceUrl(TEST_URL1).c_str(), ewk_history_item_uri_get(item));
+
+  // get forward item
+  item = ewk_history_nth_item_get(history, 1);
+
+  ASSERT_TRUE(item);
+
+  ASSERT_STREQ(expectedTitle3.c_str(), ewk_history_item_title_get(item));
+  ASSERT_STREQ(GetResourceUrl(TEST_URL3).c_str(), ewk_history_item_uri_get(item));
+
+  // get out of bounds item (positive index)
+  item = ewk_history_nth_item_get(history, 10);
+  ASSERT_FALSE(item);
+
+  // get out of bounds item (negative index)
+  item = ewk_history_nth_item_get(history, -10);
+  ASSERT_FALSE(item);
+
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_nth_item_get, EMPTY_HISTORY)
+{
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  ASSERT_FALSE(ewk_history_nth_item_get(history, 0));
+
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_history_nth_item_get, NULL_HISTORY)
+{
+  ASSERT_FALSE(ewk_history_nth_item_get(NULL, 0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_attribute_hash_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_attribute_hash_get_func.cpp
new file mode 100755 (executable)
index 0000000..88d44f7
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_attribute_hash_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_attribute_hash_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the attribute data of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_attribute_hash_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_NODE_DATA);
+  if (ewk_hit_test_attribute_hash_get(hit_test))
+    result = true;
+  else
+    result = false;
+
+  ewk_hit_test_free(hit_test);
+  utc_check_true(result);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_attribute_hash_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_attribute_hash_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_free_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_free_func.cpp
new file mode 100755 (executable)
index 0000000..019f6e1
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_free : public utc_blink_ewk_base {
+protected:
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_url;
+};
+
+const char* const utc_blink_ewk_hit_test_free::test_url = "http://m.naver.com";
+
+/**
+ * @brief Checking whether the hit test instance is freed properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_free, POS_TEST1)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), test_url);
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  result = EINA_TRUE;
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_DEFAULT);
+  ewk_hit_test_free(hit_test);
+
+  hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_NODE_DATA);
+  ewk_hit_test_free(hit_test);
+
+  hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  ewk_hit_test_free(hit_test);
+
+  hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_ALL);
+  ewk_hit_test_free(hit_test);
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_free, NEG_TEST1)
+{
+  Eina_Bool result = EINA_TRUE;
+
+  ewk_hit_test_free(NULL);
+  utc_check_eq(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_buffer_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_buffer_get_func.cpp
new file mode 100755 (executable)
index 0000000..74753a0
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_image_buffer_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_image_buffer_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the image buffer of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_buffer_get, POS_TEST1)
+{
+
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  if (ewk_hit_test_image_buffer_get(hit_test))
+    result = true;
+  else
+    result = false;
+
+  utc_check_true(result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_buffer_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_image_buffer_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_buffer_length_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_buffer_length_get_func.cpp
new file mode 100755 (executable)
index 0000000..95c1a83
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_image_buffer_length_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_image_buffer_length_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether image buffer length of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_buffer_length_get, POS_TEST1)
+{
+
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  if (ewk_hit_test_image_buffer_length_get(hit_test) > 0)
+    result = true;
+  else
+    result = false;
+
+  ewk_hit_test_free(hit_test);
+  utc_check_true(result);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_buffer_length_get, NEG_TEST1)
+{
+    utc_check_eq(ewk_hit_test_image_buffer_length_get(NULL), 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_file_name_extension_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_file_name_extension_get_func.cpp
new file mode 100755 (executable)
index 0000000..4f84e37
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_image_file_name_extension_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_image_file_name_extension_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the image fiile name extension of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_file_name_extension_get, POS_TEST1)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  if (ewk_hit_test_image_file_name_extension_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  ewk_hit_test_free(hit_test);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_file_name_extension_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_image_file_name_extension_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_uri_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_image_uri_get_func.cpp
new file mode 100755 (executable)
index 0000000..8d671c4
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_image_uri_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_image_uri_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the image uri of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_uri_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart(10.0);
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_DEFAULT);
+  if (ewk_hit_test_image_uri_get(hit_test))
+    result = true;
+  else
+    result = false;
+
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_image_uri_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_image_uri_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_label_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_label_get_func.cpp
new file mode 100755 (executable)
index 0000000..17bb8d8
--- /dev/null
@@ -0,0 +1,66 @@
+ /*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_link_label_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_link_label_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the link label of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_link_label_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 80, 100, EWK_HIT_TEST_MODE_DEFAULT);
+  if (ewk_hit_test_link_label_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_link_label_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_link_label_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_title_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_title_get_func.cpp
new file mode 100755 (executable)
index 0000000..3153835
--- /dev/null
@@ -0,0 +1,66 @@
+ /*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_link_title_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_link_title_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the link title of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_link_title_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 80, 100, EWK_HIT_TEST_MODE_DEFAULT);
+  if (ewk_hit_test_link_title_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_link_title_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_link_title_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_uri_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_link_uri_get_func.cpp
new file mode 100755 (executable)
index 0000000..0027882
--- /dev/null
@@ -0,0 +1,68 @@
+ /*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_link_uri_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_link_uri_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the link uri of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_link_uri_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_message("[Requesting hit test] :: \n");
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 80, 100, EWK_HIT_TEST_MODE_DEFAULT);
+  utc_message("[Received hit test] :: \n");
+  if (ewk_hit_test_link_uri_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_link_uri_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_link_uri_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_media_uri_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_media_uri_get_func.cpp
new file mode 100755 (executable)
index 0000000..f33bb67
--- /dev/null
@@ -0,0 +1,67 @@
+ /*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_media_uri_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_media_uri_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the media uri of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_media_uri_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 100, 400, EWK_HIT_TEST_MODE_DEFAULT);
+
+  if (ewk_hit_test_media_uri_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_media_uri_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_media_uri_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_node_value_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_node_value_get_func.cpp
new file mode 100755 (executable)
index 0000000..bd7ba90
--- /dev/null
@@ -0,0 +1,66 @@
+ /*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_node_value_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_node_value_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the node value of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_node_value_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 80, 100, EWK_HIT_TEST_MODE_NODE_DATA);
+  if (ewk_hit_test_node_value_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_node_value_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_node_value_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_result_context_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_result_context_get_func.cpp
new file mode 100755 (executable)
index 0000000..a9f2700
--- /dev/null
@@ -0,0 +1,68 @@
+ /*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_result_context_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_result_context_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the context of the hit test is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_result_context_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_DEFAULT);
+  if (ewk_hit_test_result_context_get(hit_test) & EWK_HIT_TEST_RESULT_CONTEXT_LINK &&
+      ewk_hit_test_result_context_get(hit_test) & EWK_HIT_TEST_RESULT_CONTEXT_IMAGE) {
+    result = true;
+  } else {
+      result = false;
+  }
+
+  ewk_hit_test_free(hit_test);
+  utc_check_true(result);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_result_context_get, NEG_TEST1)
+{
+  utc_check_eq(ewk_hit_test_result_context_get(NULL), EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_tag_name_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_hit_test_tag_name_get_func.cpp
new file mode 100755 (executable)
index 0000000..eca4b2f
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_hit_test_tag_name_get : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static const char* const test_path;
+};
+
+const char* const utc_blink_ewk_hit_test_tag_name_get::test_path = "/ewk_hit_test/index.html";
+
+/**
+ * @brief Checking whether the tag name of hit element is returned properly.
+ */
+TEST_F(utc_blink_ewk_hit_test_tag_name_get, POS_TEST1)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(test_path).c_str());
+  if (!result)
+    utc_fail();
+  utc_blink_ewk_base::MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 80, 100, EWK_HIT_TEST_MODE_NODE_DATA);
+  if (ewk_hit_test_tag_name_get(hit_test))
+    result = EINA_TRUE;
+  else
+    result = EINA_FALSE;
+
+  utc_check_eq(EINA_TRUE, result);
+  ewk_hit_test_free(hit_test);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a hit test instance.
+ */
+TEST_F(utc_blink_ewk_hit_test_tag_name_get, NEG_TEST1)
+{
+  utc_check_eq(0, ewk_hit_test_tag_name_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_init_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_init_func.cpp
new file mode 100755 (executable)
index 0000000..e19ac1e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_init : public utc_blink_ewk_base
+{
+ protected:
+};
+
+TEST_F(utc_blink_ewk_init, POS_TEST)
+{
+  ewk_init();
+}
+
+TEST_F(utc_blink_ewk_init, NEG_TEST)
+{
+  int result = ewk_init();
+  fprintf(stderr,"ewk_init =%d\n",result);
+  if (result <= 0)
+    utc_fail();
+
+  result = ewk_init();
+  fprintf(stderr,"ewk_init =%d\n",result);
+  if ( result <= 0)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_body_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_body_get_func.cpp
new file mode 100755 (executable)
index 0000000..c53a998
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_body_get : public utc_blink_ewk_base {
+protected:
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: ");
+
+    if (!event_info)
+      utc_fail();
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: ");
+
+    if (!event_info) {
+      utc_fail();
+    }
+
+    if (!data) {
+      utc_fail();
+    }
+
+    utc_blink_ewk_notification_body_get* owner = static_cast<utc_blink_ewk_notification_body_get*>(data);
+
+    //call ewk_notification API
+    const char* body = ewk_notification_body_get((Ewk_Notification*)event_info);
+    if (strcmp(body, owner->notification_body_ref) == 0) {
+      owner->EventLoopStop(Success);
+    } else {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+protected:
+  static const char* const resource_relative_path;
+  static const char* const notification_body_ref;
+};
+
+const char* const utc_blink_ewk_notification_body_get::resource_relative_path = "/common/sample_notification_1.html";
+const char* const utc_blink_ewk_notification_body_get::notification_body_ref = "Notification body content";
+
+/**
+* @brief Positive test case for ewk_notification_body_get(). Text returned by api is compared against expected text and result is set in notificationShow()
+*/
+TEST_F(utc_blink_ewk_notification_body_get, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), resource_url.c_str());
+
+  MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != Success) {
+    FAIL();
+  }
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_notification_body_get, NEG_TEST)
+{
+  const char *bodyText = ewk_notification_body_get(NULL);
+  utc_check_eq(NULL, bodyText);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_clicked_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_clicked_func.cpp
new file mode 100644 (file)
index 0000000..b004bc9
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_clicked : public utc_blink_ewk_base
+{
+ protected:
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+    if (!event_info) {
+      FAIL();
+    }
+    //allow the notification
+    ewk_notification_permission_request_set(static_cast<Ewk_Notification_Permission_Request*>(event_info), EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: \n");
+
+    Ewk_Context* context = ewk_view_context_get(webview);
+    if (!event_info || !context) {
+      utc_message("event_info: %p\ncontext: %p", event_info, context);
+      FAIL();
+    }
+
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_clicked* owner = static_cast<utc_blink_ewk_notification_clicked*>(data);
+
+    uint64_t notification_id = ewk_notification_id_get(static_cast<Ewk_Notification*>(event_info));
+    ewk_notification_clicked(context, notification_id);
+    owner->EventLoopStop(Success);;
+  }
+
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+protected:
+  static const char* const resource_relative_path;
+};
+
+const char* const utc_blink_ewk_notification_clicked::resource_relative_path = "/common/sample_notification_1.html";
+
+/**
+* @brief Positive test case for ewk_notification_clicked()
+*/
+TEST_F(utc_blink_ewk_notification_clicked, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+
+  if (!ewk_view_url_set(GetEwkWebView(), resource_url.c_str())) {
+    FAIL();
+  }
+
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL value pass
+*/
+TEST_F(utc_blink_ewk_notification_clicked, NEG_TEST)
+{
+  ewk_notification_clicked(NULL, 0);
+  /* If NULL argument passing won't give segmentation fault negative test case will pass */
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_icon_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_icon_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..f55e28e
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_icon_url_get : public utc_blink_ewk_base {
+protected:
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: ");
+
+    if (!event_info)
+      utc_fail();
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: ");
+
+    if (!event_info) {
+      FAIL();
+    }
+
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_icon_url_get* owner = static_cast<utc_blink_ewk_notification_icon_url_get*>(data);
+    //call ewk_notification API
+    const char* iconURL = ewk_notification_icon_url_get((Ewk_Notification*)event_info);
+    if (iconURL)
+    {
+      char* getIconName = strrchr((char*)iconURL, '/');
+      getIconName++;
+      utc_message("[notificationShpw] :: icon name: %s", getIconName);
+      if (strcmp(getIconName, owner->notification_icon_ref) == 0) {
+        owner->EventLoopStop(Success);
+        return;
+      }
+
+    }
+
+    owner->EventLoopStop(Failure);
+  }
+
+protected:
+  static const char* const resource_relative_path;
+  static const char* const notification_icon_ref;
+};
+
+const char* const utc_blink_ewk_notification_icon_url_get::resource_relative_path = "/common/sample_notification_1.html";
+const char* const utc_blink_ewk_notification_icon_url_get::notification_icon_ref = "logo.png";
+
+/**
+* @brief Positive test case for ewk_notification_body_get(). Text returned by api is compared against expected text and result is set in notificationShow()
+*/
+TEST_F(utc_blink_ewk_notification_icon_url_get, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), resource_url.c_str());
+
+  MainLoopResult loop_result = EventLoopStart();
+
+  EXPECT_EQ(Success, loop_result);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_notification_icon_url_get, NEG_TEST)
+{
+  const char* iconURL = ewk_notification_icon_url_get(NULL);
+  EXPECT_EQ(NULL, iconURL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_id_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_id_get_func.cpp
new file mode 100755 (executable)
index 0000000..abdf345
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_id_get : public utc_blink_ewk_base {
+ protected:
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: ");
+    if (!event_info) {
+      FAIL();
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: ");
+    if (!event_info) {
+      FAIL();
+    }
+
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_id_get* owner = static_cast<utc_blink_ewk_notification_id_get*>(data);
+
+    //call ewk_notification API
+    int id = ewk_notification_id_get((Ewk_Notification*)event_info);
+    if (id) {
+      owner->EventLoopStop(Success);
+    } else {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+protected:
+  static const char* const resource_relative_path;
+};
+
+const char* const utc_blink_ewk_notification_id_get::resource_relative_path = "/common/sample_notification_1.html";
+
+/**
+* @brief Positive test case for ewk_notification_body_get(). Text returned by api is compared against expected text and result is set in notificationShow()
+*/
+TEST_F(utc_blink_ewk_notification_id_get, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+  if (!ewk_view_url_set(GetEwkWebView(), resource_url.c_str())) {
+    FAIL();
+  }
+
+  MainLoopResult loop_result = EventLoopStart();
+
+  utc_check_eq(Success, loop_result);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_notification_id_get, NEG_TEST)
+{
+  int id = ewk_notification_id_get(NULL);
+  utc_check_eq(id, 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_origin_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_origin_get_func.cpp
new file mode 100755 (executable)
index 0000000..637a5d5
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_permission_request_origin_get : public utc_blink_ewk_base {
+protected:
+  static void script_execute_callback(Evas_Object* webview, const char* result_value, void* user_data)
+  {
+    utc_message("execution result: %s", result_value);
+  }
+
+  /* Callback for "load,finished" */
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: ");
+    ewk_view_script_execute(webview, "noti();", script_execute_callback, this);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: ");
+    ASSERT_TRUE(data != NULL);
+    utc_blink_ewk_notification_permission_request_origin_get *owner = static_cast<utc_blink_ewk_notification_permission_request_origin_get *>(data);
+
+    MainLoopResult res = Failure;
+    Ewk_Notification_Permission_Request *request = (Ewk_Notification_Permission_Request*)event_info;
+    const Ewk_Security_Origin* origin = ewk_notification_permission_request_origin_get(request);
+
+    if (origin) {
+      const char* host = ewk_security_origin_host_get(origin);
+      const char* protocol = ewk_security_origin_protocol_get(origin);
+      uint16_t port = ewk_security_origin_port_get(origin);
+      utc_message("__actual__\nhost: %s\tprotocol: %s\tport: %d", host, protocol, port);
+      utc_message("__expected__\nhost: %s\tprotocol: %s\tport: %d", expected_origin_host, expected_origin_protocol, expected_origin_port);
+
+      if (!strcmp(protocol, expected_origin_protocol) && !strcmp(host, expected_origin_host) && port == expected_origin_port) {
+        res = Success;
+      }
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_set(request, EINA_TRUE);
+    owner->EventLoopStop(res);
+  }
+
+  /* Startup and cleanup functions */
+  virtual void PostSetUp()
+  {
+    ewk_view_mouse_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+  }
+
+protected:
+  static const char* const resource_file;
+  static const char* const expected_origin_protocol;
+  static const char* const expected_origin_host;
+  static const uint16_t expected_origin_port;
+};
+
+const char* const utc_blink_ewk_notification_permission_request_origin_get::resource_file = "common/sample_notification_3.html";
+const char* const utc_blink_ewk_notification_permission_request_origin_get::expected_origin_protocol = "";
+const char* const utc_blink_ewk_notification_permission_request_origin_get::expected_origin_host = "";
+const uint16_t utc_blink_ewk_notification_permission_request_origin_get::expected_origin_port = 65535;
+
+
+/**
+ * @brief Positive test case for ewk_notification_permission_request_set function
+ */
+TEST_F(utc_blink_ewk_notification_permission_request_origin_get, POS_TEST)
+{
+  /* TODO: this code should use ewk_notification_permission_request_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl(resource_file).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Tests whether function works properly in case of NULL value pass.
+ */
+TEST_F(utc_blink_ewk_notification_permission_request_origin_get, NEG_TEST)
+{
+  /* TODO: this code should use ewk_notification_cached_permissions_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  ewk_notification_permission_request_set(NULL,0);
+
+  // If  NULL argument passing wont give segmentation fault negative test case will pass
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_set_func.cpp
new file mode 100755 (executable)
index 0000000..4b4e63f
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_permission_request_set : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_notification_permission_request_set()
+  : utc_blink_ewk_base()
+  , notificationPermissionFirsttime(EINA_FALSE)
+  , notificationPermissionSecondtime(EINA_FALSE)
+  {
+  }
+
+  virtual ~utc_blink_ewk_notification_permission_request_set() {
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_permission_request_set* owner = static_cast<utc_blink_ewk_notification_permission_request_set*>(data);
+
+    Ewk_Context *context = ewk_view_context_get(webview);
+    if (!event_info || !context) {
+      FAIL();
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+
+    if (!owner->notificationPermissionFirsttime) {
+      owner->notificationPermissionFirsttime = EINA_TRUE;
+    } else {
+      owner->notificationPermissionSecondtime = EINA_TRUE;
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    if (!event_info) {
+      FAIL();
+    }
+
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_permission_request_set* owner = static_cast<utc_blink_ewk_notification_permission_request_set*>(data);
+
+    owner->EventLoopStop(Success);
+  }
+
+  /* Startup and cleanup functions */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+protected:
+  Eina_Bool notificationPermissionFirsttime;
+  Eina_Bool notificationPermissionSecondtime;
+  static const char* const resource_relative_path;
+};
+
+const char* const utc_blink_ewk_notification_permission_request_set::resource_relative_path = "/common/sample_notification_2.html";
+
+/**
+ * @brief Positive test case for ewk_notification_permission_request_set function
+ */
+TEST_F(utc_blink_ewk_notification_permission_request_set, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+
+  if (!ewk_view_url_set(GetEwkWebView(), resource_url.c_str())) {
+    FAIL();
+  }
+  /* TODO: this code should use ewk_notification_permission_request_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+
+  MainLoopResult loop_result = EventLoopStart();
+
+  if (loop_result != Success) {
+    FAIL();
+  }
+
+  EXPECT_EQ(notificationPermissionSecondtime, EINA_FALSE);
+}
+
+/**
+ * @brief Tests whether function works properly in case of NULL value pass.
+ */
+TEST_F(utc_blink_ewk_notification_permission_request_set, NEG_TEST)
+{
+  /* TODO: this code should use ewk_notification_cached_permissions_set and check its behaviour.
+  Results should be reported using one of utc_ macros */
+  ewk_notification_permission_request_set(NULL,0);
+
+  // If  NULL argument passing wont give segmentation fault negative test case will pass
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_permission_request_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..934c3f0
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_permission_request_suspend : public utc_blink_ewk_base {
+protected:
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    Ewk_Context *context = ewk_view_context_get(webview);
+    if(!event_info || !context) {
+      utc_message("event_info: %p\ncontext: %p", event_info, context);
+      FAIL();
+      return;
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_suspend((Ewk_Notification_Permission_Request*)event_info);
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    if (!data || !event_info) {
+      utc_message("data: %p\nevent_info: %p", data, event_info);
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_permission_request_suspend* owner = static_cast<utc_blink_ewk_notification_permission_request_suspend*>(data);
+    owner->EventLoopStop(Success);
+  }
+
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+protected:
+  static const char* const resource_relative_path;
+  static const char* const notification_title_ref;
+};
+
+const char* const utc_blink_ewk_notification_permission_request_suspend::resource_relative_path = "/common/sample_notification_1.html";
+const char* const utc_blink_ewk_notification_permission_request_suspend::notification_title_ref = "Notification Title";
+
+/**
+* @brief Positive test case for ewk_notification_permission_request_suspened()
+*/
+TEST_F(utc_blink_ewk_notification_permission_request_suspend, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+  if (!ewk_view_url_set(GetEwkWebView(), resource_url.c_str())) {
+    FAIL();
+  }
+
+  MainLoopResult result = EventLoopStart();
+  EXPECT_EQ(result, Success);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL value pass
+*/
+TEST_F(utc_blink_ewk_notification_permission_request_suspend, NEG_TEST)
+{
+  ewk_notification_permission_request_suspend(NULL);
+  // If  NULL argument passing wont give segmentation fault negative test case will pass
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_security_origin_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_security_origin_get_func.cpp
new file mode 100755 (executable)
index 0000000..34ff890
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_security_origin_get_func : public utc_blink_ewk_base
+{
+protected:
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* owner, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] ::");
+    ASSERT_TRUE(NULL != event_info);
+
+    //allow the notification
+    ewk_notification_permission_request_set(static_cast<Ewk_Notification_Permission_Request*>(event_info), EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* owner, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] ::");
+    ASSERT_TRUE(event_info != NULL);
+    ASSERT_TRUE(owner != NULL);
+
+    //call ewk_notification API
+    const Ewk_Security_Origin* origin = ewk_notification_security_origin_get(static_cast<Ewk_Notification*>(event_info));
+    ASSERT_TRUE(origin != NULL);
+
+    ASSERT_STREQ(ewk_security_origin_protocol_get(origin), "");
+    ASSERT_STREQ(ewk_security_origin_host_get(origin), "");
+    ASSERT_EQ(ewk_security_origin_port_get(origin), 0);
+    static_cast<utc_blink_ewk_notification_security_origin_get_func*>(owner)->EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+};
+
+/**
+* @brief Positive test case for ewk_notification_security_origin_get().
+*/
+TEST_F(utc_blink_ewk_notification_security_origin_get_func, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample_notification_1.html").c_str()));
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_notification_security_origin_get_func, InvalidArg)
+{
+  EXPECT_EQ(NULL, ewk_notification_security_origin_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_showed_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_showed_func.cpp
new file mode 100755 (executable)
index 0000000..26fee14
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_showed : public utc_blink_ewk_base {
+ protected:
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+    if (!event_info)
+        FAIL();
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: \n");
+
+    Ewk_Context* context = ewk_view_context_get(webview);
+    if (!event_info || !context) {
+      utc_message("event_info: %p\ncontext: %p", event_info, context);
+      FAIL();
+    }
+
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_showed* owner = static_cast<utc_blink_ewk_notification_showed*>(data);
+
+    uint64_t notification_id = ewk_notification_id_get((Ewk_Notification*)event_info);
+    ewk_notification_showed(context, notification_id);
+    owner->EventLoopStop(Success);;
+  }
+
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+protected:
+  static const char* const resource_relative_path;
+};
+
+const char* const utc_blink_ewk_notification_showed::resource_relative_path = "/common/sample_notification_1.html";
+
+/**
+* @brief Positive test case for ewk_notification_showed()
+*/
+TEST_F(utc_blink_ewk_notification_showed, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+
+  if (!ewk_view_url_set(GetEwkWebView(), resource_url.c_str())) {
+    FAIL();
+  }
+
+  MainLoopResult main_result = EventLoopStart();
+
+  utc_check_eq(Success, main_result);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL value pass
+*/
+TEST_F(utc_blink_ewk_notification_showed, NEG_TEST)
+{
+  ewk_notification_showed(NULL, 0);
+  /* If NULL argument passing won't give segmentation fault negative test case will pass */
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_notification_title_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_notification_title_get_func.cpp
new file mode 100755 (executable)
index 0000000..8386ae6
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_title_get : public utc_blink_ewk_base {
+protected:
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: ");
+
+    if (!event_info) {
+      FAIL();
+    }
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: ");
+
+    if (!event_info) {
+      FAIL();
+    }
+
+    if (!data) {
+      FAIL();
+    }
+
+    utc_blink_ewk_notification_title_get* owner = static_cast<utc_blink_ewk_notification_title_get*>(data);
+
+    //call ewk_notification API
+    const char* getTitle = ewk_notification_title_get((Ewk_Notification*)event_info);
+    if (strcmp(getTitle, notification_title_ref) == 0) {
+      owner->EventLoopStop(Success);
+    } else {
+      owner->EventLoopStop(Failure);
+    }
+  }
+
+  /* Startup function */
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+protected:
+  static const char* const resource_relative_path;
+  static const char* const notification_title_ref;
+};
+
+const char* const utc_blink_ewk_notification_title_get::resource_relative_path = "/common/sample_notification_1.html";
+const char* const utc_blink_ewk_notification_title_get::notification_title_ref = "Notification Title";
+
+/**
+* @brief Positive test case for ewk_notification_title_get(). Text returned by api is compared against expected text and result is set in notificationShow()
+*/
+TEST_F(utc_blink_ewk_notification_title_get, POS_TEST)
+{
+  std::string resource_url = GetResourceUrl(resource_relative_path);
+
+  if (!ewk_view_url_set(GetEwkWebView(), resource_url.c_str())) {
+    FAIL();
+  }
+
+  MainLoopResult loop_result = EventLoopStart();
+
+  utc_check_eq(Success, loop_result);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_notification_title_get, NEG_TEST)
+{
+  const char* getTitle = ewk_notification_title_get(NULL);
+  utc_check_eq(NULL, getTitle);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_cookie_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_cookie_get_func.cpp
new file mode 100755 (executable)
index 0000000..6f4c046
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_cookie_get : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,response,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,response,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+
+    utc_blink_ewk_policy_decision_cookie_get *owner = static_cast<utc_blink_ewk_policy_decision_cookie_get*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    // We let the page load completely, we should get at least one URL with cookie.
+    // Cookie could be set by any URL belonging to same top level domain.
+    if (policy_decision && ewk_policy_decision_cookie_get(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if the cookie for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_cookie_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_cookie_get, NEG_TEST)
+{
+  utc_check_eq(NULL, ewk_policy_decision_cookie_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_frame_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_frame_get_func.cpp
new file mode 100644 (file)
index 0000000..610e24b
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_frame_get: public utc_blink_ewk_base
+{
+protected:
+  static void frame_check(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("  [ %s ]", __PRETTY_FUNCTION__);
+
+    ASSERT_TRUE(data); // test will wait for timeout, nothing we can do here
+    utc_blink_ewk_policy_decision_frame_get* owner = NULL;
+    OwnerFromVoid(data, &owner);
+
+    if (!event_info) {
+      // stop event loop so we won't have to wait for timeout
+      owner->EventLoopStop(Failure);
+      ASSERT_TRUE(event_info);
+    }
+
+    Ewk_Policy_Decision* policy_decision = static_cast<Ewk_Policy_Decision*>(event_info);
+    EXPECT_TRUE(ewk_policy_decision_frame_get(policy_decision));
+    owner->EventLoopStop(Success);
+  }
+};
+
+TEST_F(utc_blink_ewk_policy_decision_frame_get, NAVIGATION_DECIDE)
+{
+  evas_object_smart_callback_auto scb(GetEwkWebView(), "policy,navigation,decide", frame_check, this);
+  std::string resurl = GetResourceUrl("ewk_policy_decision/iframe.html");
+  ASSERT_NE(0, resurl.length());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  // Wait for stop from main frame
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Wait for second stop from sub frame
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_policy_decision_frame_get, RESPONSE_DECIDE)
+{
+  evas_object_smart_callback_auto scb(GetEwkWebView(), "policy,response,decide", frame_check, this);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe"));
+  // Wait for stop from main frame
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Wait for second stop from sub frame
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_policy_decision_frame_get, NEWWINDOW_DECIDE)
+{
+  evas_object_smart_callback_auto scb(GetEwkWebView(), "policy,newwindow,decide", frame_check, this);
+
+  std::string resurl = GetResourceUrl("ewk_policy_decision/mainframe_newwindow.html");
+  ASSERT_NE(0, resurl.length());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), resurl.c_str()));
+  // Wait for stop from main frame
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // Wait for second stop from sub frame
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_policy_decision_frame_get, INVALID_ARGS)
+{
+  EXPECT_FALSE(ewk_policy_decision_frame_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_host_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_host_get_func.cpp
new file mode 100755 (executable)
index 0000000..60b6a2a
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_host_get : public utc_blink_ewk_base
+{
+ protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_host_get *owner = static_cast<utc_blink_ewk_policy_decision_host_get*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (policy_decision && ewk_policy_decision_host_get(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if the host for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_host_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_host_get, NEG_TEST)
+{
+  utc_check_eq(NULL, ewk_policy_decision_host_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_http_method_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_http_method_get_func.cpp
new file mode 100644 (file)
index 0000000..9ea4f62
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define baseURL "http://google.com"
+
+class utc_blink_ewk_policy_decision_http_method_get : public utc_blink_ewk_base
+{
+ protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", ToSmartCallback(policy_navigation_decide), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", ToSmartCallback(policy_navigation_decide));
+  }
+
+  static void policy_navigation_decide(utc_blink_ewk_policy_decision_http_method_get* owner,
+          Evas_Object* webview, Ewk_Policy_Decision* policy_decision)
+  {
+    ASSERT_TRUE(owner);
+    const char* method = ewk_policy_decision_http_method_get(policy_decision);
+    owner->receivedMethod = method ? method : "";
+    owner->EventLoopStop(Success);
+  }
+
+  std::string getDocumentForMethod(const std::string& method)
+  {
+    return std::string(
+          "<html>"
+          "<body>"
+            "<form id='theForm' method='" + method + "' action='" + baseURL + "'>"
+              "<input name='x' value='y'/>"
+            "</form>"
+          "</body>"
+          "<script>"
+            "document.getElementById('theForm').submit();"
+          "</script>"
+          "</html>");
+  }
+
+ protected:
+   std::string receivedMethod;
+   std::string currentMethod;
+};
+
+/**
+ * @brief Tests if the method for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_http_method_get, TEST_DEFALUT_METHOD)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), baseURL));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ("GET", receivedMethod);
+}
+
+TEST_F(utc_blink_ewk_policy_decision_http_method_get, TEST_METHOD_GET)
+{
+  currentMethod="GET";
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), getDocumentForMethod(currentMethod).c_str(), baseURL, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(currentMethod, receivedMethod);
+}
+
+TEST_F(utc_blink_ewk_policy_decision_http_method_get, TEST_METHOD_POST)
+{
+  currentMethod="POST";
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), getDocumentForMethod(currentMethod).c_str(), baseURL, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(currentMethod, receivedMethod);
+}
+
+TEST_F(utc_blink_ewk_policy_decision_http_method_get, TEST_INVALID_PARAM)
+{
+  ASSERT_EQ(NULL, ewk_policy_decision_http_method_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_ignore_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_ignore_func.cpp
new file mode 100755 (executable)
index 0000000..9c2d097
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_ignore : public utc_blink_ewk_base {
+
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_ignore *owner = static_cast<utc_blink_ewk_policy_decision_ignore*>(data);
+
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (policy_decision && ewk_policy_decision_ignore(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if ignore operation for policy decision is set properly
+ */
+TEST_F(utc_blink_ewk_policy_decision_ignore, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_ignore, NEG_TEST)
+{
+  utc_check_ne(ewk_policy_decision_ignore(0), EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_navigation_type_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_navigation_type_get_func.cpp
new file mode 100755 (executable)
index 0000000..7c145a9
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_navigation_type_get : public utc_blink_ewk_base {
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[Policy , Decision] :: \n");
+    utc_blink_ewk_policy_decision_navigation_type_get *owner = static_cast<utc_blink_ewk_policy_decision_navigation_type_get*>(data);
+
+    Ewk_Policy_Decision* policy = (Ewk_Policy_Decision*)event_info;
+
+    if(policy && (
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_RELOAD  ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_OTHER))
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Tests if ewk_policy_decision_navigation_type_get returns the correct navigation type
+ */
+TEST_F(utc_blink_ewk_policy_decision_navigation_type_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if ewk_policy_decision_navigation_type_get return EWK_POLICY_NAVIGATION_TYPE_OTHER incase policy decision is NULL
+ */
+TEST_F(utc_blink_ewk_policy_decision_navigation_type_get, NEG_TEST)
+{
+  utc_check_eq(ewk_policy_decision_navigation_type_get(NULL), EWK_POLICY_NAVIGATION_TYPE_OTHER);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_password_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_password_get_func.cpp
new file mode 100644 (file)
index 0000000..ab6a741
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SITE "@reference.vodafone.com/widgets/testcases.html"
+#define CORRECT_PASSWORD "early"
+#define CORRECT_URL "http://access:" CORRECT_PASSWORD SITE
+#define INCORRECT_PASSWORD ""
+#define INCORRECT_URL "http://incorrect:" INCORRECT_PASSWORD SITE
+
+class utc_blink_ewk_policy_decision_password_get : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_policy_decision_password_get()
+    : password(NULL)
+  {
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+    eina_stringshare_del(password);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* /*webview*/, void* event_info)
+  {
+    ASSERT_TRUE(NULL != data);
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_password_get* owner = NULL;
+    OwnerFromVoid(data, &owner);
+    Ewk_Policy_Decision* policy_decision = static_cast<Ewk_Policy_Decision*>(event_info);
+    owner->password = eina_stringshare_add(ewk_policy_decision_password_get(policy_decision));
+    owner->EventLoopStop(policy_decision ? utc_blink_ewk_base::Success : utc_blink_ewk_base::Failure);
+  }
+
+protected:
+  Eina_Stringshare* password;
+};
+
+/**
+ * @brief Tests if function works properly in case of
+ * correct Ewk_Policy_Decision and correct URL
+ */
+TEST_F(utc_blink_ewk_policy_decision_password_get, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), CORRECT_URL));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_STREQ(CORRECT_PASSWORD, password);
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL Ewk_Policy_Decision
+ */
+TEST_F(utc_blink_ewk_policy_decision_password_get, NEG_TEST)
+{
+  ASSERT_FALSE(ewk_policy_decision_password_get(0));
+}
+
+/**
+ * @brief Tests if function works properly in case of
+ * correct Ewk_Policy_Decision and incorrect URL
+ */
+TEST_F(utc_blink_ewk_policy_decision_password_get, NEG_TEST_2)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), INCORRECT_URL));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_STREQ(NULL, password);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_headers_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_headers_get_func.cpp
new file mode 100644 (file)
index 0000000..b88ee9d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_response_headers_get : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,response,decide", policy_response_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,response,decide", policy_response_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_response_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    ASSERT_TRUE(data != NULL);
+    ASSERT_TRUE(event_info != NULL);
+    utc_message("[policy_response_decide] ::");
+    utc_blink_ewk_policy_decision_response_headers_get* const owner = static_cast<utc_blink_ewk_policy_decision_response_headers_get*>(data);
+    Ewk_Policy_Decision* const policy_decision = static_cast<Ewk_Policy_Decision*>(event_info);
+    const Eina_Hash* const headers = ewk_policy_decision_response_headers_get(policy_decision);
+    owner->EventLoopStop((NULL != headers) ? Success : Failure);
+  }
+};
+
+/**
+ * @brief Tests if the headers for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_headers_get, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), "http://www.samsung.com"));
+
+  EXPECT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_headers_get, NEG_TEST)
+{
+  EXPECT_EQ(0, ewk_policy_decision_response_headers_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_mime_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_mime_get_func.cpp
new file mode 100755 (executable)
index 0000000..e9863ca
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_response_mime_get : public utc_blink_ewk_base {
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,response,decide", (void(*)(void*, Evas_Object*, void*))policy_response_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,response,decide", (void(*)(void*, Evas_Object*, void*))policy_response_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_response_decide(utc_blink_ewk_policy_decision_response_mime_get* owner, Evas_Object* webview, Ewk_Policy_Decision* policy_decision)
+  {
+    utc_message("[policy_response_decide] :: \n");
+    ASSERT_TRUE(NULL != owner);
+
+    if (policy_decision && ewk_policy_decision_response_mime_get(policy_decision)) {
+      owner->EventLoopStop(Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if the mimetype for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_mime_get, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), "http://www.google.com"));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_mime_get, NEG_TEST)
+{
+  ASSERT_EQ(0, ewk_policy_decision_response_mime_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_status_code_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_response_status_code_get_func.cpp
new file mode 100755 (executable)
index 0000000..72544b9
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_response_status_code_get : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_policy_decision_response_status_code_get()
+    : status_code(-1)
+  {
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_response_decide(utc_blink_ewk_policy_decision_response_status_code_get* owner, Evas_Object* webview, Ewk_Policy_Decision* policy_decision)
+  {
+    ASSERT_TRUE(owner);
+
+    if (policy_decision && webview) {
+      const char* webview_url = ewk_view_url_get(webview);
+      const char* policy_url = ewk_policy_decision_url_get(policy_decision);
+
+      if (webview_url && policy_url && strcmp(policy_url, webview_url) == 0) {
+        owner->status_code = ewk_policy_decision_response_status_code_get(policy_decision);
+        owner->EventLoopStop(Success);
+      }
+    }
+  }
+
+protected:
+  int status_code;
+};
+
+/**
+ * @brief Tests if response status code for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_status_code_get, response_status_code)
+{
+  {
+    // policy decision callback will be send for each element on the page, we're interested only in the first
+    // one as it is reponse for request url. Other responses may break TC logic
+    evas_object_smart_callback_auto cb(GetEwkWebView(), "policy,response,decide", ToSmartCallback(policy_response_decide), this);
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://www.enlightenment.org/")); // this url should not redirect
+    ASSERT_EQ(Success, EventLoopStart()) << "policy,response,decide callback not triggered with proper url";
+  }
+
+  ASSERT_EQ(200, status_code);
+  // Wait for load,finished
+  ASSERT_EQ(Failure, EventLoopStart());
+
+  {
+    // policy decision callback will be send for each element on the page, we're interested only in the first
+    // one as it is reponse for request url. Other responses may break TC logic
+    evas_object_smart_callback_auto cb(GetEwkWebView(), "policy,response,decide", ToSmartCallback(policy_response_decide), this);
+    // Load page that should produce 404 error
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://www.google.com/random_page_that_most_likely_does_not_exist"));
+    ASSERT_EQ(Success, EventLoopStart()) << "policy,response,decide callback not triggered with proper url";
+  }
+
+  ASSERT_EQ(404, status_code);
+  // Wait for load,finished
+  ASSERT_EQ(Failure, EventLoopStart());
+}
+
+/**
+ * @brief Tests if default value is returned for policy decision with navigation type
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_status_code_get, request_status_code)
+{
+  evas_object_smart_callback_auto cb(GetEwkWebView(), "policy,navigation,decide", ToSmartCallback(policy_response_decide), this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://www.google.com"));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(0, status_code);
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a policy decision
+ */
+TEST_F(utc_blink_ewk_policy_decision_response_status_code_get, invalid_args)
+{
+  ASSERT_EQ(0, ewk_policy_decision_response_status_code_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_scheme_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_scheme_get_func.cpp
new file mode 100755 (executable)
index 0000000..f8c7470
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_scheme_get : public utc_blink_ewk_base {
+
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_scheme_get *owner = static_cast<utc_blink_ewk_policy_decision_scheme_get*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (policy_decision && ewk_policy_decision_scheme_get(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if the scheme for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_scheme_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_scheme_get, NEG_TEST)
+{
+  utc_check_eq(0, ewk_policy_decision_scheme_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..94ce1e5
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_suspend : public utc_blink_ewk_base {
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Success); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_suspend *owner = static_cast<utc_blink_ewk_policy_decision_suspend*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (policy_decision && ewk_policy_decision_suspend(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if suspend operation for policy decision is set properly
+ */
+TEST_F(utc_blink_ewk_policy_decision_suspend, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_suspend, NEG_TEST)
+{
+  utc_check_ne(ewk_policy_decision_suspend(0), EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_type_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_type_get_func.cpp
new file mode 100755 (executable)
index 0000000..b35c17d
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_type_get : public utc_blink_ewk_base {
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_type_get *owner = static_cast<utc_blink_ewk_policy_decision_type_get*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if( policy_decision && (
+      ewk_policy_decision_type_get(policy_decision) == EWK_POLICY_DECISION_USE ||
+      ewk_policy_decision_type_get(policy_decision) == EWK_POLICY_DECISION_DOWNLOAD ||
+      ewk_policy_decision_type_get(policy_decision) == EWK_POLICY_DECISION_IGNORE))
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+};
+
+/**
+ * @brief Tests if the host for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_type_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_type_get, NEG_TEST)
+{
+  utc_check_eq(ewk_policy_decision_type_get(0), EWK_POLICY_DECISION_USE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..2081859
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_url_get : public utc_blink_ewk_base {
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_url_get *owner = static_cast<utc_blink_ewk_policy_decision_url_get*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (policy_decision && ewk_policy_decision_url_get(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if the url for policy decision is returned properly.
+ */
+TEST_F(utc_blink_ewk_policy_decision_url_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_url_get, NEG_TEST)
+{
+  utc_check_eq(0, ewk_policy_decision_url_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_use_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_use_func.cpp
new file mode 100755 (executable)
index 0000000..8f08a92
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_policy_decision_use : public utc_blink_ewk_base {
+
+protected:
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+  }
+
+  void LoadFinished(Evas_Object* webview) {
+
+    EventLoopStop(utc_blink_ewk_base::Success); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_use *owner = static_cast<utc_blink_ewk_policy_decision_use*>(data);
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (policy_decision && ewk_policy_decision_use(policy_decision)) {
+
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+};
+
+/**
+ * @brief Tests if use operation for policy decision is set properly
+ */
+TEST_F(utc_blink_ewk_policy_decision_use, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), "http://www.google.com");
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+TEST_F(utc_blink_ewk_policy_decision_use, NEG_TEST)
+{
+  utc_check_ne(ewk_policy_decision_use(0), EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_userid_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_policy_decision_userid_get_func.cpp
new file mode 100644 (file)
index 0000000..c3c5a19
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SITE "reference.vodafone.com/widgets/testcases.html"
+#define CORRECT_USER_NAME "access"
+#define CORRECT_URL "http://" CORRECT_USER_NAME ":early@" SITE
+#define INCORRECT_URL "http://" SITE
+
+class utc_blink_ewk_policy_decision_userid_get : public utc_blink_ewk_base
+{
+public:
+  Eina_Stringshare* user_name;
+
+protected:
+  utc_blink_ewk_policy_decision_userid_get()
+    : user_name(NULL)
+  {
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "policy,navigation,decide", policy_navigation_decide);
+    eina_stringshare_del(user_name);
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // will noop if EventLoopStop was alraedy called
+  }
+
+  static void policy_navigation_decide(void* data, Evas_Object* /*webview*/, void* event_info)
+  {
+    ASSERT_TRUE(NULL != data);
+    utc_message("[policy_navigation_decide] :: \n");
+    utc_blink_ewk_policy_decision_userid_get* owner = NULL;
+    OwnerFromVoid(data, &owner);
+    Ewk_Policy_Decision* policy_decision = static_cast<Ewk_Policy_Decision*>(event_info);
+    owner->user_name = eina_stringshare_add(ewk_policy_decision_userid_get(policy_decision));
+    owner->EventLoopStop(policy_decision ? utc_blink_ewk_base::Success : utc_blink_ewk_base::Failure);
+  }
+};
+
+/**
+ * @brief Tests if function works properly in case of
+ * correct Ewk_Policy_Decision and correct URL
+ */
+TEST_F(utc_blink_ewk_policy_decision_userid_get, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), CORRECT_URL));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_STREQ(CORRECT_USER_NAME, user_name);
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL Ewk_Policy_Decision
+ */
+TEST_F(utc_blink_ewk_policy_decision_userid_get, NEG_TEST)
+{
+    ASSERT_FALSE(ewk_policy_decision_userid_get(0));
+}
+
+/**
+ * @brief Tests if function works properly in case of
+ * correct Ewk_Policy_Decision and incorrect URL
+ */
+TEST_F(utc_blink_ewk_policy_decision_userid_get, NEG_TEST_2)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), INCORRECT_URL));
+  ASSERT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
+  ASSERT_STREQ(NULL, user_name);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_is_persistent_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_is_persistent_get_func.cpp
new file mode 100644 (file)
index 0000000..50087a9
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_quota_permission_request_is_persistent_get : public utc_blink_ewk_base
+{
+protected:
+
+  void PreSetUp()
+  {
+    persistent = EINA_FALSE;
+  }
+
+  static void quotaPermission(Evas_Object*,
+                              const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_quota_permission_request_is_persistent_get* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    EXPECT_TRUE(request);
+    owner->persistent = ewk_quota_permission_request_is_persistent_get(request);
+    ewk_view_quota_permission_request_cancel(request);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Eina_Bool persistent;
+};
+
+/**
+ * @brief Positive  test case of ewk_quota_permission_request_is_persistent_get()
+ */
+TEST_F(utc_blink_ewk_quota_permission_request_is_persistent_get, POS_TEST_TRUE)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, persistent);
+}
+
+/**
+  * Test case for ewk_quota_permission_request_is_persistent_get
+  * where return value is EINA_FALSE is not possible for file protocol.
+  * Temporary storage doesn't require quota permission for now.
+  */
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview and callback.
+*/
+TEST_F(utc_blink_ewk_quota_permission_request_is_persistent_get, NEG_TEST)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_quota_permission_request_is_persistent_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_host_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_host_get_func.cpp
new file mode 100644 (file)
index 0000000..de7d523
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_quota_permission_request_origin_host_get : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_quota_permission_request_origin_host_get()
+    : host(NULL)
+  {
+  }
+
+  void PreTearDown()
+  {
+    eina_stringshare_del(host);
+  }
+
+  static void quotaPermission(Evas_Object*,
+                              const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_quota_permission_request_origin_host_get* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    EXPECT_TRUE(request);
+    owner->host = eina_stringshare_add(ewk_quota_permission_request_origin_host_get(request));
+    ewk_view_quota_permission_request_cancel(request);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Eina_Stringshare* host;
+};
+
+
+/**
+ * @brief Positive  test case of ewk_quota_permission_request_origin_host_get()
+ */
+TEST_F(utc_blink_ewk_quota_permission_request_origin_host_get, POS_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // Host is "" when not origin
+  EXPECT_STREQ("", host);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL
+*/
+TEST_F(utc_blink_ewk_quota_permission_request_origin_host_get, NEG_TEST)
+{
+  EXPECT_STREQ(NULL, ewk_quota_permission_request_origin_host_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_port_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_port_get_func.cpp
new file mode 100644 (file)
index 0000000..c527597
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_quota_permission_request_origin_port_get : public utc_blink_ewk_base
+{
+protected:
+
+  void PreSetUp()
+  {
+      port = 0;
+  }
+
+  static void quotaPermission(Evas_Object*,
+                              const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_quota_permission_request_origin_port_get* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    if (!request)
+    {
+      owner->EventLoopStop(Failure);
+      return;
+    }
+    owner->port = ewk_quota_permission_request_origin_port_get(request);
+    ewk_view_quota_permission_request_cancel(request);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  uint16_t port;
+};
+
+/**
+ * @brief Positive  test case of ewk_quota_permission_request_origin_port_get()
+ */
+TEST_F(utc_blink_ewk_quota_permission_request_origin_port_get, POS_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // 65535 = invalid or unspecified port
+  EXPECT_EQ(65535, port);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL
+*/
+TEST_F(utc_blink_ewk_quota_permission_request_origin_port_get, NEG_TEST)
+{
+  EXPECT_EQ(0, ewk_quota_permission_request_origin_port_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_protocol_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_origin_protocol_get_func.cpp
new file mode 100644 (file)
index 0000000..5fb4f30
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_quota_permission_request_origin_protocol_get : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_quota_permission_request_origin_protocol_get()
+    : protocol(NULL)
+  {
+  }
+
+  void PreTearDown()
+  {
+    eina_stringshare_del(protocol);
+  }
+
+  static void quotaPermission(Evas_Object*,
+                              const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_quota_permission_request_origin_protocol_get* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    EXPECT_TRUE(request);
+    owner->protocol = eina_stringshare_add(ewk_quota_permission_request_origin_protocol_get(request));
+    ewk_view_quota_permission_request_cancel(request);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Eina_Stringshare* protocol;
+};
+
+/**
+ * @brief Positive  test case of ewk_quota_permission_request_origin_protocol_get()
+ */
+TEST_F(utc_blink_ewk_quota_permission_request_origin_protocol_get, POS_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // Protocol is "" when not origin
+  EXPECT_STREQ("", protocol);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL
+*/
+TEST_F(utc_blink_ewk_quota_permission_request_origin_protocol_get, NEG_TEST)
+{
+  EXPECT_STREQ(NULL, ewk_quota_permission_request_origin_protocol_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_quota_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_quota_permission_request_quota_get_func.cpp
new file mode 100644 (file)
index 0000000..e6d0518
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_quota_permission_request_quota_get : public utc_blink_ewk_base
+{
+protected:
+
+  void PreSetUp()
+  {
+    quota = 0;
+  }
+
+  static void quotaPermission(Evas_Object*,
+                              const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_quota_permission_request_quota_get* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    EXPECT_TRUE(request);
+    owner->quota = ewk_quota_permission_request_quota_get(request);
+    ewk_view_quota_permission_request_cancel(request);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  int64_t quota;
+};
+
+/**
+ * @brief Positive  test case of ewk_quota_permission_request_quota_get()
+ */
+TEST_F(utc_blink_ewk_quota_permission_request_quota_get, POS_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  // 10000 is requestet quota in quota_ask.html
+  EXPECT_EQ(10000, quota);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL
+*/
+TEST_F(utc_blink_ewk_quota_permission_request_quota_get, NEG_TEST)
+{
+  EXPECT_EQ(0, ewk_quota_permission_request_quota_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_security_origin_host_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_security_origin_host_get_func.cpp
new file mode 100755 (executable)
index 0000000..608aa5d
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_security_origin_host_get : public utc_blink_ewk_base
+{
+protected:
+  /* Startup and cleanup functions */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+
+    if (!event_info)
+      utc_fail();
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+   /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: [Check Origin Host Get]\n");
+
+    if (!event_info || !data)
+      utc_fail();
+
+    utc_blink_ewk_security_origin_host_get* owner = static_cast<utc_blink_ewk_security_origin_host_get*>( data );
+    MainLoopResult result=Failure;
+    Ewk_Notification* notification = static_cast<Ewk_Notification*>( event_info );
+    if (notification) {
+      const Ewk_Security_Origin *org = ewk_notification_security_origin_get((const Ewk_Notification*)notification);
+      if (org) {
+        const char* host = ewk_security_origin_host_get(org);
+        if (host && !strcmp(host, ""))
+          result = Success;
+      }
+    }
+    owner->EventLoopStop(result);
+  }
+};
+
+/**
+ * @brief Positive test case for ewk_security_origin_protocol_get().
+ */
+TEST_F(utc_blink_ewk_security_origin_host_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample_notification_1.html").c_str()))
+    utc_fail();
+
+  utc_check_eq(EventLoopStart(), Success);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL as origin.
+ */
+TEST_F(utc_blink_ewk_security_origin_host_get, NEG_TEST)
+{
+  const char* const host = ewk_security_origin_host_get(NULL);
+  utc_check_false(host);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_security_origin_port_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_security_origin_port_get_func.cpp
new file mode 100755 (executable)
index 0000000..a166f06
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_security_origin_port_get : public utc_blink_ewk_base
+{
+protected:
+  /* Startup and cleanup functions */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+
+    if (event_info)
+      utc_fail();
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+   /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: [Check Origin Port Get]\n");
+
+    if (!event_info || !data)
+      utc_fail();
+
+    utc_blink_ewk_security_origin_port_get* owner = static_cast<utc_blink_ewk_security_origin_port_get*>( data );
+    MainLoopResult result=Failure;
+    Ewk_Notification* notification = static_cast<Ewk_Notification*>( event_info );
+    if (notification) {
+      const Ewk_Security_Origin *org = ewk_notification_security_origin_get((const Ewk_Notification*)notification);
+      if (org) {
+        uint16_t port = ewk_security_origin_port_get(org);
+        if (port == 0)
+          result = Success;
+      }
+    }
+    owner->EventLoopStop(result);
+  }
+};
+
+/**
+ * @brief Positive test case for ewk_security_origin_protocol_get().
+ */
+TEST_F(utc_blink_ewk_security_origin_port_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample_notification_1.html").c_str()))
+    utc_fail();
+
+  utc_check_eq(EventLoopStart(), Success);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL as origin.
+ */
+TEST_F(utc_blink_ewk_security_origin_port_get, NEG_TEST)
+{
+  uint16_t port = ewk_security_origin_port_get(NULL);
+  utc_check_false(port);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_security_origin_protocol_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_security_origin_protocol_get_func.cpp
new file mode 100755 (executable)
index 0000000..5424c13
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_security_origin_protocol_get : public utc_blink_ewk_base
+{
+protected:
+  /* Startup and cleanup functions */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+
+    if (!event_info)
+      utc_fail();
+
+    //allow the notification
+    ewk_notification_permission_request_set((Ewk_Notification_Permission_Request*)event_info, EINA_TRUE);
+  }
+
+   /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: [Check Origin Protocal Get]\n");
+
+    if (!event_info || !data)
+      utc_fail();
+
+    utc_blink_ewk_security_origin_protocol_get* owner = static_cast<utc_blink_ewk_security_origin_protocol_get*>( data );
+    MainLoopResult result=Failure;
+    Ewk_Notification* notification = static_cast<Ewk_Notification*>( event_info );
+    if (notification) {
+      const Ewk_Security_Origin *org = ewk_notification_security_origin_get((const Ewk_Notification*)notification);
+      if (org) {
+        const char* protocol = ewk_security_origin_protocol_get(org);
+        if (protocol && !strcmp(protocol, ""))
+          result = Success;
+      }
+    }
+    owner->EventLoopStop(result);
+  }
+};
+
+/**
+ * @brief Positive test case for ewk_security_origin_protocol_get().
+ */
+TEST_F(utc_blink_ewk_security_origin_protocol_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample_notification_1.html").c_str()))
+    utc_fail();
+
+  utc_check_eq(EventLoopStart(), Success);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL as origin.
+ */
+TEST_F(utc_blink_ewk_security_origin_protocol_get, NEG_TEST)
+{
+  const char* const protocol = ewk_security_origin_protocol_get(NULL);
+  utc_check_false(protocol);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_set_arguments_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_set_arguments_func.cpp
new file mode 100755 (executable)
index 0000000..30404da
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+static char* urlstr = "http://www.google.com";
+
+class utc_blink_ewk_set_arguments : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_set_arguments, POS_TEST)
+{
+  ewk_set_arguments(1,&urlstr);
+}
+
+TEST_F(utc_blink_ewk_set_arguments, NEG_TEST)
+{
+  ewk_set_arguments(0,NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_auto_fitting_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_auto_fitting_get_func.cpp
new file mode 100755 (executable)
index 0000000..e0927eb
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_auto_fitting_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Positive test case of ewk_settings_auto_fitting_get()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_get, Change)
+{
+  Ewk_Settings* const settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  Eina_Bool const fitting = !ewk_settings_auto_fitting_get(settings);
+  ASSERT_EQ(EINA_TRUE, ewk_settings_auto_fitting_set(settings, fitting));
+  EXPECT_EQ(fitting, ewk_settings_auto_fitting_get(settings));
+}
+
+/**
+ * @brief Negative test case of ewk_settings_auto_fitting_get()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_get, NullArg)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_settings_auto_fitting_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_auto_fitting_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_auto_fitting_set_func.cpp
new file mode 100755 (executable)
index 0000000..b363377
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_auto_fitting_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Positive test case of ewk_settings_auto_fitting_set()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+  int resultCheck = ewk_settings_auto_fitting_set(settings, EINA_TRUE);
+  if (resultCheck == EINA_TRUE) {
+    EXPECT_EQ((int)ewk_settings_auto_fitting_get(settings), 1);
+  }
+  else {
+    EXPECT_EQ(resultCheck, 1);
+  }
+}
+
+/**
+ * @brief Positive test case of ewk_settings_auto_fitting_set()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+  int resultCheck = ewk_settings_auto_fitting_set(settings, EINA_FALSE);
+  if (resultCheck == EINA_TRUE) {
+    EXPECT_EQ((int)ewk_settings_auto_fitting_get(settings), 0);
+  }
+  else {
+    EXPECT_EQ(resultCheck, 1);
+  }
+}
+
+/**
+ * @brief Negative test case of ewk_settings_auto_fitting_set()
+ */
+TEST_F(utc_blink_ewk_settings_auto_fitting_set, NEG_TEST)
+{
+  int check = ewk_settings_auto_fitting_set(NULL, EINA_TRUE);
+  EXPECT_EQ(check, 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_autofill_password_form_enabled_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_autofill_password_form_enabled_get_func.cpp
new file mode 100644 (file)
index 0000000..93f83f5
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_autofill_password_form_enabled_get : public utc_blink_ewk_base
+{
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled autofill password form set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_autofill_password_form_enabled_get, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+  ASSERT_TRUE(ewk_settings_autofill_password_form_enabled_set(settings, EINA_TRUE));
+  ASSERT_TRUE(ewk_settings_autofill_password_form_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled autofill password form set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_autofill_password_form_enabled_get, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+  ASSERT_TRUE(ewk_settings_autofill_password_form_enabled_set(settings, EINA_FALSE));
+  ASSERT_FALSE(ewk_settings_autofill_password_form_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_autofill_password_form_enabled_get, NEG_TEST)
+{
+  ASSERT_FALSE(ewk_settings_autofill_password_form_enabled_get(0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_autofill_password_form_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_autofill_password_form_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..6530165
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_autofill_password_form_enabled_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled autofill password form set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_autofill_password_form_enabled_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_autofill_password_form_enabled_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled autofill password form set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_autofill_password_form_enabled_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_autofill_password_form_enabled_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_autofill_password_form_enabled_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_autofill_password_form_enabled_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_clear_text_selection_automatically_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_clear_text_selection_automatically_set_func.cpp
new file mode 100755 (executable)
index 0000000..10c847d
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+extern struct Ewk_Test_View test_view;
+class utc_blink_ewk_settings_clear_text_selection_automatically_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled clear text selection automatically set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_clear_text_selection_automatically_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_clear_text_selection_automatically_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled clear text selection automatically set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_clear_text_selection_automatically_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_clear_text_selection_automatically_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_clear_text_selection_automatically_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_clear_text_selection_automatically_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_current_legacy_font_size_mode_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_current_legacy_font_size_mode_set_func.cpp
new file mode 100755 (executable)
index 0000000..612b6d1
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+// #ifndef LegacyFontSizeModes
+// #define LegacyFontSizeModes
+// enum _Ewk_Legacy_Font_Size_Mode {
+//     EWK_LEGACY_FONT_SIZE_MODE_ALWAYS,
+//     EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH,
+//     EWK_LEGACY_FONT_SIZE_MODE_NEVER
+// };
+// #endif //LegacyFontSizeModes
+
+//typedef enum _Ewk_Legacy_Font_Size_Mode Ewk_Legacy_Font_Size_Mode;
+
+class utc_blink_ewk_settings_current_legacy_font_size_mode_set : public utc_blink_ewk_base {
+};
+
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* "Legacy Font Size Mode" is set to EWK_LEGACY_FONT_SIZE_MODE_ALWAYS.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_current_legacy_font_size_mode_set(settings, EWK_LEGACY_FONT_SIZE_MODE_ALWAYS);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* "Legacy Font Size Mode" is set to EWK_LEGACY_FONT_SIZE_MODE_NEVER.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_current_legacy_font_size_mode_set(settings, EWK_LEGACY_FONT_SIZE_MODE_NEVER);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* "Legacy Font Size Mode" is set to EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_set, POS_TEST3)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+  Eina_Bool result = ewk_settings_current_legacy_font_size_mode_set(settings, EWK_LEGACY_FONT_SIZE_MODE_ONLY_IF_PIXEL_VALUES_MATCH);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns EINA_FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_current_legacy_font_size_mode_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_current_legacy_font_size_mode_set(NULL, EWK_LEGACY_FONT_SIZE_MODE_ALWAYS);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_default_encoding_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_default_encoding_set_func.cpp
new file mode 100755 (executable)
index 0000000..6d2fdfe
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_default_encoding_set : public utc_blink_ewk_base {
+public:
+  static const char* SET_DEFAULT_ENCODING;
+};
+
+const char* utc_blink_ewk_settings_default_encoding_set::SET_DEFAULT_ENCODING = "utf-8";
+
+
+/**
+ * @brief Positive test case for ewk_settings_default_encoding_set(). Set the encoding, get the value and then compare.
+ */
+TEST_F(utc_blink_ewk_settings_default_encoding_set, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_default_encoding_set(settings, SET_DEFAULT_ENCODING);
+  if (!result) {
+    FAIL();
+  }
+  const char* defaultEncoding = ewk_settings_default_encoding_get(settings);
+  if (!defaultEncoding) {
+    FAIL();
+  }
+  EXPECT_STREQ(defaultEncoding, SET_DEFAULT_ENCODING);
+}
+
+/**
+ * @brief Negative test case for ewk_settings_default_encoding_set(). Check if it works fine with NULL as settings.
+ */
+TEST_F(utc_blink_ewk_settings_default_encoding_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_default_encoding_set(NULL, SET_DEFAULT_ENCODING);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_default_keypad_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_default_keypad_enabled_set_func.cpp
new file mode 100644 (file)
index 0000000..8399281
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_default_keypad_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * default keypad enabled.
+ */
+TEST_F(utc_blink_ewk_settings_default_keypad_enabled_set, Set)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(NULL != settings);
+
+  Eina_Bool set = !ewk_settings_default_keypad_enabled_get(settings);
+  ASSERT_EQ(EINA_TRUE, ewk_settings_default_keypad_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_default_keypad_enabled_get(settings));
+
+  set = !set;
+  ASSERT_EQ(EINA_TRUE, ewk_settings_default_keypad_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_default_keypad_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_default_keypad_enabled_set, NullArg)
+{
+  ASSERT_NE(EINA_TRUE, ewk_settings_default_keypad_enabled_set(NULL, EINA_FALSE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_detect_contents_automatically_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_detect_contents_automatically_set_func.cpp
new file mode 100755 (executable)
index 0000000..438abf5
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_detect_contents_automatically_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled select word automatically set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_detect_contents_automatically_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  ewk_settings_detect_contents_automatically_set(settings, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled detect content automatically set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_detect_contents_automatically_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  ewk_settings_detect_contents_automatically_set(settings, EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_detect_contents_automatically_set, NEG_TEST)
+{
+  ewk_settings_detect_contents_automatically_set(NULL, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_edge_effect_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_edge_effect_enabled_set_func.cpp
new file mode 100644 (file)
index 0000000..61cc1a4
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_edge_effect_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * edge effect enabled set to TRUE/FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_edge_effect_enabled_set, Set)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(NULL != settings);
+
+  Eina_Bool set = !ewk_settings_edge_effect_enabled_get(settings);
+  ASSERT_EQ(EINA_TRUE, ewk_settings_edge_effect_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_edge_effect_enabled_get(settings));
+
+  set = !set;
+  ASSERT_EQ(EINA_TRUE, ewk_settings_edge_effect_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_edge_effect_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_edge_effect_enabled_set, NullArg)
+{
+  ASSERT_NE(EINA_TRUE, ewk_settings_edge_effect_enabled_set(NULL, EINA_FALSE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_editable_link_behavior_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_editable_link_behavior_set_func.cpp
new file mode 100755 (executable)
index 0000000..5526fd6
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_editable_link_behavior_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and set to EWK_EDITABLE_LINK_BEHAVIOR_DEFAULT.
+ */
+TEST_F(utc_blink_ewk_settings_editable_link_behavior_set, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+  Eina_Bool result = ewk_settings_editable_link_behavior_set(settings, EWK_EDITABLE_LINK_BEHAVIOR_DEFAULT);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_editable_link_behavior_set(settings, EWK_EDITABLE_LINK_BEHAVIOR_ALWAYS_LIVE);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_editable_link_behavior_set(settings, EWK_EDITABLE_LINK_BEHAVIOR_ONLY_LIVE_WITH_SHIFTKEY);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_editable_link_behavior_set(settings, EWK_EDITABLE_LINK_BEHAVIOR_LIVE_WHEN_NOT_FOCUSED);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_editable_link_behavior_set(settings, EWK_EDITABLE_LINK_BEHAVIOR_NEVER_LIVE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_editable_link_behavior_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_editable_link_behavior_set(NULL, EWK_EDITABLE_LINK_BEHAVIOR_DEFAULT);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_extra_feature_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_extra_feature_set_func.cpp
new file mode 100644 (file)
index 0000000..147da4d
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_extra_feature_set : public utc_blink_ewk_base {
+protected:
+  utc_blink_ewk_settings_extra_feature_set():
+    settings(NULL)
+  {
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    // load file just to initialize everything
+    ewk_view_url_set(GetEwkWebView(), GetResourceUrl("/common/sample.html").c_str());
+    ASSERT_EQ(Success, EventLoopStart());
+    settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(settings);
+  }
+
+protected:
+  Ewk_Settings* settings;
+};
+
+TEST_F(utc_blink_ewk_settings_extra_feature_set, EXISTING_FEATURES)
+{
+  static const char* features[] = {
+    "longpress,enable",
+    "link,magnifier",
+    "detect,contents",
+    "web,login",
+    "doubletap,enable",
+    "zoom,enable",
+    "openpanel,enable",
+    "allow,restrictedurl",
+    "urlbar,hide",
+    NULL};
+
+  for (const char** feat = features; *feat; feat++) {
+    Eina_Bool defaultValue = ewk_settings_extra_feature_get(settings, *feat);
+    Eina_Bool newValue = defaultValue == EINA_TRUE ? EINA_FALSE : EINA_TRUE;
+    ewk_settings_extra_feature_set(settings, *feat, newValue);
+    ASSERT_EQ(newValue, ewk_settings_extra_feature_get(settings, *feat)) << *feat << " value did not change!";
+  }
+}
+
+TEST_F(utc_blink_ewk_settings_extra_feature_set, NON_EXISTING_FEATURE)
+{
+  static const char* feat = "nonexistent,feature";
+  ASSERT_EQ(EINA_FALSE, ewk_settings_extra_feature_get(settings, feat));
+  ewk_settings_extra_feature_set(settings, feat, EINA_TRUE);
+  ASSERT_EQ(EINA_FALSE, ewk_settings_extra_feature_get(settings, feat));
+}
+
+TEST_F(utc_blink_ewk_settings_extra_feature_set, INVALID_ARGS)
+{
+  // The only thing we can do is expect that it won't crash
+  ewk_settings_extra_feature_set(NULL, NULL, EINA_TRUE);
+  ewk_settings_extra_feature_set(settings, NULL, EINA_TRUE);
+  ewk_settings_extra_feature_set(NULL, "invalid", EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_font_default_size_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_font_default_size_get_func.cpp
new file mode 100755 (executable)
index 0000000..dff6670
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_font_default_size_get : public utc_blink_ewk_base
+{
+  void PostSetUp()
+  {
+    settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(settings) << "ewk_view_settings_get(GetEwkWebView())";
+  }
+
+protected:
+  Ewk_Settings* settings;
+};
+
+/**
+ * @brief Positive test case for ewk_settings_font_default_size_get().
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_get, Default)
+{
+  EXPECT_NE(0,ewk_settings_font_default_size_get(settings));
+}
+
+/**
+ * @brief Positive test case for ewk_settings_font_default_size_get().
+ *        Check new value
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_get, Change)
+{
+  int size = 1 ^ ewk_settings_font_default_size_get(settings);
+  ASSERT_EQ(EINA_TRUE, ewk_settings_font_default_size_set(settings, size));
+  EXPECT_EQ(size, ewk_settings_font_default_size_get(settings));
+}
+
+/**
+ * @brief Negative test case for ewk_settings_font_default_size_get().
+ *        Check if API works fine with NULL as settings.
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_get, NullArg)
+{
+  EXPECT_EQ(0, ewk_settings_font_default_size_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_font_default_size_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_font_default_size_set_func.cpp
new file mode 100755 (executable)
index 0000000..7bac587
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_font_default_size_set_func : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_settings_font_default_size_set_func() : settings(NULL){
+  }
+
+  void PostSetUp(){
+    settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(settings != NULL);
+  }
+
+protected:
+  Ewk_Settings* settings;
+};
+
+/**
+ * @brief Positive test case for ewk_settings_font_default_size_set(). Set new size of default font and verify new value.
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_set_func, POS_TEST)
+{
+  int defaultSize = ewk_settings_font_default_size_get(settings);
+  ASSERT_NE(defaultSize, 0);
+
+  int const size = defaultSize ^ 1;
+  ASSERT_TRUE(ewk_settings_font_default_size_set(settings, size));
+
+  defaultSize = ewk_settings_font_default_size_get(settings);
+  EXPECT_EQ(defaultSize, size);
+}
+
+/**
+ * @brief Negative test case for ewk_settings_font_default_size_set(). Check if API works fine with NULL as settings.
+ */
+TEST_F(utc_blink_ewk_settings_font_default_size_set_func, InvalidArg)
+{
+  int const defaultSize = ewk_settings_font_default_size_get(settings);
+  EXPECT_FALSE(ewk_settings_font_default_size_set(NULL, defaultSize ^ 1));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_force_zoom_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_force_zoom_set_func.cpp
new file mode 100644 (file)
index 0000000..92f6458
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_force_zoom_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled force zoom form set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_force_zoom_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  Eina_Bool result = ewk_settings_force_zoom_set(settings, EINA_TRUE);
+
+  ASSERT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled force zoom form set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_force_zoom_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  Eina_Bool result = ewk_settings_force_zoom_set(settings, EINA_FALSE);
+
+  ASSERT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_force_zoom_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_force_zoom_set(NULL, EINA_FALSE);
+  ASSERT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_form_candidate_data_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_form_candidate_data_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..2eb597e
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_form_candidate_data_enabled_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled form candidate data form set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_form_candidate_data_enabled_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_form_candidate_data_enabled_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled form candidate data set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_form_candidate_data_enabled_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_form_candidate_data_enabled_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_form_candidate_data_enabled_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_form_candidate_data_enabled_set(NULL, EINA_FALSE);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_form_profile_data_enabled_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_form_profile_data_enabled_get_func.cpp
new file mode 100644 (file)
index 0000000..63e0f1f
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_form_profile_data_enabled_get : public utc_blink_ewk_base
+{
+public:
+  Ewk_Settings* settings;
+
+protected:
+  void PostSetUp() {
+    settings = ewk_view_settings_get(GetEwkWebView());
+    EXPECT_TRUE(settings);
+  }
+};
+
+/**
+ * @brief Tests if sets correctly, when called with correct WebSettings object
+ */
+TEST_F(utc_blink_ewk_settings_form_profile_data_enabled_get, POS_TEST_EINA_TRUE)
+{
+    ASSERT_EQ(ewk_settings_form_profile_data_enabled_set(settings, EINA_TRUE), EINA_TRUE);
+    EXPECT_EQ(ewk_settings_form_profile_data_enabled_get(settings), EINA_TRUE);
+}
+
+/**
+ * @brief Tests if sets correctly, when called with correct WebSettings object
+ */
+TEST_F(utc_blink_ewk_settings_form_profile_data_enabled_get, POS_TEST_EINA_FALSE)
+{
+    ASSERT_EQ(ewk_settings_form_profile_data_enabled_set(settings, EINA_FALSE), EINA_TRUE);
+    EXPECT_EQ(ewk_settings_form_profile_data_enabled_get(settings), EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL WebSettings object
+ */
+TEST_F(utc_blink_ewk_settings_form_profile_data_enabled_get, NEG_TEST)
+{
+    EXPECT_FALSE(ewk_settings_form_profile_data_enabled_get(NULL));
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_form_profile_data_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_form_profile_data_enabled_set_func.cpp
new file mode 100644 (file)
index 0000000..21d38b1
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_form_profile_data_enabled_set : public utc_blink_ewk_base {
+public:
+  Ewk_Settings* settings;
+
+protected:
+  void PostSetUp() {
+    settings = ewk_view_settings_get(GetEwkWebView());
+    EXPECT_TRUE(settings);
+  }
+
+};
+
+/**
+ * @brief Tests if sets correctly, when called with correct WebSettings object
+ */
+TEST_F(utc_blink_ewk_settings_form_profile_data_enabled_set, POS_TEST_EINA_TRUE)
+{
+    ASSERT_EQ(ewk_settings_form_profile_data_enabled_set(settings, EINA_TRUE), EINA_TRUE);
+    EXPECT_EQ(ewk_settings_form_profile_data_enabled_get(settings), EINA_TRUE);
+}
+
+/**
+ * @brief Tests if sets correctly, when called with correct WebSettings object
+ */
+TEST_F(utc_blink_ewk_settings_form_profile_data_enabled_set, POS_TEST_EINA_FALSE)
+{
+    ASSERT_EQ(ewk_settings_form_profile_data_enabled_set(settings, EINA_FALSE), EINA_TRUE);
+    EXPECT_EQ(ewk_settings_form_profile_data_enabled_get(settings), EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL WebSettings object
+ */
+TEST_F(utc_blink_ewk_settings_form_profile_data_enabled_set, NEG_TEST)
+{
+    EXPECT_NE(ewk_settings_form_profile_data_enabled_set(NULL, EINA_FALSE), EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_initial_list_style_position_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_initial_list_style_position_get_func.cpp
new file mode 100755 (executable)
index 0000000..9043fbf
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_initial_list_style_position_get : public utc_blink_ewk_base {
+};
+
+
+/**
+* @brief checking if returns EWK_LIST_STYLE_POSITION_OUTSIDE when initiated with a correct webview and
+* initial list style position set to EWK_LIST_STYLE_POSITION_OUTSIDE.
+*/
+TEST_F(utc_blink_ewk_settings_initial_list_style_position_get, POS_TEST1)
+{
+  Ewk_Settings *settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_initial_list_style_position_set(settings, EWK_LIST_STYLE_POSITION_OUTSIDE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(ewk_settings_initial_list_style_position_get(settings), EWK_LIST_STYLE_POSITION_OUTSIDE);
+}
+
+/**
+* @brief checking if returns EWK_LIST_STYLE_POSITION_INSIDE when initiated with a correct webview and
+* initial list style position set to EWK_LIST_STYLE_POSITION_INSIDE.
+*/
+TEST_F(utc_blink_ewk_settings_initial_list_style_position_get, POS_TEST2)
+{
+  Ewk_Settings *settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_initial_list_style_position_set(settings, EWK_LIST_STYLE_POSITION_INSIDE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(ewk_settings_initial_list_style_position_get(settings), EWK_LIST_STYLE_POSITION_INSIDE);
+}
+
+/**
+* @brief checking if returns EWK_LIST_STYLE_POSITION_OUTSIDE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_initial_list_style_position_get, NEG_TEST)
+{
+  Ewk_List_Style_Position result = ewk_settings_initial_list_style_position_get(NULL);
+  EXPECT_EQ(result, EWK_LIST_STYLE_POSITION_OUTSIDE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_initial_list_style_position_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_initial_list_style_position_set_func.cpp
new file mode 100755 (executable)
index 0000000..01d3aba
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_initial_list_style_position_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief checking if returns EWK_LIST_STYLE_POSITION_OUTSIDE when initiated with a correct webview and
+* initial list style position set to EWK_LIST_STYLE_POSITION_OUTSIDE.
+*/
+TEST_F(utc_blink_ewk_settings_initial_list_style_position_set, POS_TEST1)
+{
+  Ewk_Settings *settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_initial_list_style_position_set(settings, EWK_LIST_STYLE_POSITION_OUTSIDE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(ewk_settings_initial_list_style_position_get(settings), EWK_LIST_STYLE_POSITION_OUTSIDE);
+}
+
+/**
+* @brief checking if returns EWK_LIST_STYLE_POSITION_INSIDE when initiated with a correct webview and
+* initial list style position set to EWK_LIST_STYLE_POSITION_INSIDE.
+*/
+TEST_F(utc_blink_ewk_settings_initial_list_style_position_set, POS_TEST2)
+{
+  Ewk_Settings *settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_initial_list_style_position_set(settings, EWK_LIST_STYLE_POSITION_INSIDE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(ewk_settings_initial_list_style_position_get(settings), EWK_LIST_STYLE_POSITION_INSIDE);
+}
+
+/**
+* @brief checking if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_initial_list_style_position_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_initial_list_style_position_set(NULL, EWK_LIST_STYLE_POSITION_INSIDE);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_is_encoding_valid_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_is_encoding_valid_func.cpp
new file mode 100755 (executable)
index 0000000..43b9a3c
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_is_encoding_valid : public utc_blink_ewk_base {
+public:
+  static const char* supportedEncodings[];
+  static const char* unSupportedEncodings[];
+};
+
+const char* utc_blink_ewk_settings_is_encoding_valid::supportedEncodings[] = { "UTF-8", "ISO-8859-1", "Windows-1250" };
+const char* utc_blink_ewk_settings_is_encoding_valid::unSupportedEncodings[] = { "Sample-Encoding-Name", "FooBar", "", NULL };
+
+/**
+* @brief Positive test case of ewk_settings_is_encoding_valid()
+*/
+TEST_F(utc_blink_ewk_settings_is_encoding_valid, POS_TEST)
+{
+  size_t numberOfSupportedEncodings = sizeof(supportedEncodings) / sizeof(supportedEncodings[0]);
+
+  for (unsigned i = 0; i < numberOfSupportedEncodings; ++i) {
+    ASSERT_EQ(ewk_settings_is_encoding_valid(supportedEncodings[i]), EINA_TRUE);
+  }
+  SUCCEED();
+}
+
+
+/**
+* @brief Negative test case of ewk_settings_is_encoding_valid()
+*/
+TEST_F(utc_blink_ewk_settings_is_encoding_valid, NEG_TEST)
+{
+  size_t numberOfUnSupportedEncodings = sizeof(unSupportedEncodings) / sizeof(unSupportedEncodings[0]);
+
+  for (unsigned i = 0; i < numberOfUnSupportedEncodings; ++i) {
+    ASSERT_EQ(ewk_settings_is_encoding_valid(unSupportedEncodings[i]), EINA_FALSE);
+  }
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_javascript_enabled_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_javascript_enabled_get_func.cpp
new file mode 100755 (executable)
index 0000000..2598605
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_javascript_enabled_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_get()
+ */
+TEST_F(utc_blink_ewk_settings_javascript_enabled_get, Change)
+{
+  Ewk_Settings* const settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings) << "ewk_view_settings_get(GetEwkWebView())";
+
+  Eina_Bool javascript = !ewk_settings_javascript_enabled_get(settings);
+  EXPECT_EQ(EINA_TRUE, ewk_settings_javascript_enabled_set(settings, javascript));
+  EXPECT_EQ(javascript, ewk_settings_javascript_enabled_get(settings));
+}
+
+/**
+ * @brief Negative test case of ewk_settings_javascript_enabled_get()
+ */
+TEST_F(utc_blink_ewk_settings_javascript_enabled_get, NullArg)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_settings_javascript_enabled_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_javascript_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_javascript_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..e53a45d
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_javascript_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_set()
+ */
+TEST_F(utc_blink_ewk_settings_javascript_enabled_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_javascript_enabled_set(settings, EINA_TRUE);
+  if (result == EINA_TRUE) {
+    EXPECT_EQ(ewk_settings_javascript_enabled_get(settings), EINA_TRUE);
+  }
+  else {
+    EXPECT_EQ(result, EINA_TRUE);
+  }
+}
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_set()
+ */
+TEST_F(utc_blink_ewk_settings_javascript_enabled_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_javascript_enabled_set(settings, EINA_FALSE);
+  if (result == EINA_TRUE) {
+    EXPECT_EQ(ewk_settings_javascript_enabled_get(settings), EINA_FALSE);
+  }
+  else {
+    EXPECT_EQ(result, EINA_TRUE);
+  }
+}
+
+/**
+ * @brief Negative test case of ewk_settings_javascript_enabled_set()
+ */
+TEST_F(utc_blink_ewk_settings_javascript_enabled_set, NEG_TEST)
+{
+  EXPECT_EQ(ewk_settings_javascript_enabled_set(NULL, EINA_FALSE), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_link_effect_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_link_effect_enabled_set_func.cpp
new file mode 100644 (file)
index 0000000..5e698b5
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_link_effect_enabled_set : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * link effect enabled set to TRUE/FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_link_effect_enabled_set, Set)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(NULL != settings);
+
+  Eina_Bool set = !ewk_settings_link_effect_enabled_get(settings);
+  ASSERT_EQ(EINA_TRUE, ewk_settings_link_effect_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_link_effect_enabled_get(settings));
+
+  set = !set;
+  ASSERT_EQ(EINA_TRUE, ewk_settings_link_effect_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_link_effect_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_link_effect_enabled_set, NullArg)
+{
+  ASSERT_NE(EINA_TRUE, ewk_settings_link_effect_enabled_set(NULL, EINA_FALSE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_link_magnifier_enabled_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_link_magnifier_enabled_get_func.cpp
new file mode 100755 (executable)
index 0000000..68eb1ed
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_link_magnifier_enabled_get_func : public utc_blink_ewk_base
+{
+};
+
+
+/**
+ * @brief Tests getting link magnifier enabled.
+ */
+TEST_F(utc_blink_ewk_settings_link_magnifier_enabled_get_func, POS_TEST_TRUE)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  ewk_settings_link_magnifier_enabled_set(settings, EINA_TRUE);
+  ASSERT_TRUE(ewk_settings_link_magnifier_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if getting link magnifier enabled with NULL settings fails.
+ */
+TEST_F(utc_blink_ewk_settings_link_magnifier_enabled_get_func, NEG_TEST)
+{
+
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+  ewk_settings_link_magnifier_enabled_set(settings, EINA_TRUE);
+  ASSERT_TRUE(ewk_settings_link_magnifier_enabled_get(settings));
+
+  ASSERT_FALSE(ewk_settings_link_magnifier_enabled_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_link_magnifier_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_link_magnifier_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..bd53de0
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_link_magnifier_enabled_set_func : public utc_blink_ewk_base
+{
+};
+
+
+/**
+ * @brief Tests setting link magnifier enabled to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_link_magnifier_enabled_set_func, POS_TEST_TRUE)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  ewk_settings_link_magnifier_enabled_set(settings, EINA_TRUE);
+  ASSERT_TRUE(ewk_settings_link_magnifier_enabled_get(settings));
+}
+
+/**
+ * @brief Tests setting link magnifier enabled to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_link_magnifier_enabled_set_func, POS_TEST_FALSE)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  ewk_settings_link_magnifier_enabled_set(settings, EINA_FALSE);
+  ASSERT_FALSE(ewk_settings_link_magnifier_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if setting link magnifier enabled with NULL settings fails.
+ */
+TEST_F(utc_blink_ewk_settings_link_magnifier_enabled_set_func, NEG_TEST)
+{
+
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+  ewk_settings_link_magnifier_enabled_set(settings, EINA_TRUE);
+  ASSERT_TRUE(ewk_settings_link_magnifier_enabled_get(settings));
+
+  ewk_settings_link_magnifier_enabled_set(NULL, EINA_FALSE);
+
+  ASSERT_TRUE(ewk_settings_link_magnifier_enabled_get(settings));;
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_load_remote_images_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_load_remote_images_set_func.cpp
new file mode 100755 (executable)
index 0000000..5439f71
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_load_remote_images_set : public utc_blink_ewk_base {
+};
+
+
+/**
+* @brief Tests if returns EINA_TRUE when initiated with a correct webview and
+* "Load Remote Images" is set to EINA_TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_load_remote_images_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_load_remote_images_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns EINA_TRUE when initiated with a correct webview and
+* "Load Remote Images" is set to EINA_FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_load_remote_images_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_load_remote_images_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns EINA_FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_load_remote_images_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_load_remote_images_set(NULL, EINA_TRUE);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_loads_images_automatically_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_loads_images_automatically_set_func.cpp
new file mode 100755 (executable)
index 0000000..03583c3
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_load_images_automatically_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_load_images_automatically_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_loads_images_automatically_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_loads_images_automatically_get(settings);
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with a correct webview and set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_load_images_automatically_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_loads_images_automatically_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_loads_images_automatically_get(settings);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_load_images_automatically_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_loads_images_automatically_set(NULL, EINA_TRUE);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_paste_image_uri_mode_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_paste_image_uri_mode_set_func.cpp
new file mode 100755 (executable)
index 0000000..6d4291c
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_paste_image_uri_mode_set : public utc_blink_ewk_base {
+};
+
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* "paste image as URI" is set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_paste_image_uri_mode_set, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_paste_image_uri_mode_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* "paste image as URI" is set to FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_paste_image_uri_mode_set, NEG_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_paste_image_uri_mode_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_paste_image_uri_mode_set, NEG_TEST2)
+{
+  Eina_Bool result = ewk_settings_paste_image_uri_mode_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_plugins_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_plugins_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..25c6eac
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_plugins_enabled_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_plugins_enabled_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_plugins_enabled_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_plugins_enabled_get(settings);
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with a correct webview and set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_plugins_enabled_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_plugins_enabled_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  result = ewk_settings_plugins_enabled_get(settings);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_plugins_enabled_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_plugins_enabled_set(NULL, EINA_TRUE);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_scripts_window_open_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_scripts_window_open_set_func.cpp
new file mode 100644 (file)
index 0000000..2d98419
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_scripts_window_open_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Positive test case of ewk_settings_scripts_window_open_set()
+ */
+TEST_F(utc_blink_ewk_settings_scripts_window_open_set, SetTrue)
+{
+  Ewk_Settings *const settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(NULL != settings);
+  ASSERT_TRUE(ewk_settings_scripts_window_open_set(settings, EINA_TRUE));
+  EXPECT_TRUE(ewk_settings_scripts_window_open_get(settings));
+}
+
+/**
+ * @brief Positive test case of ewk_settings_scripts_window_open_set()
+ */
+TEST_F(utc_blink_ewk_settings_scripts_window_open_set, SetFalse)
+{
+  Ewk_Settings *const settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(NULL != settings);
+  ASSERT_TRUE(ewk_settings_scripts_window_open_set(settings, EINA_FALSE));
+  EXPECT_FALSE(ewk_settings_scripts_window_open_get(settings));
+}
+
+/**
+ * @brief Test case of ewk_settings_scripts_window_open_set() when view is NULL
+ */
+TEST_F(utc_blink_ewk_settings_scripts_window_open_set, InvalidArg)
+{
+  EXPECT_FALSE(ewk_settings_scripts_window_open_set(NULL, EINA_TRUE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_select_word_automatically_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_select_word_automatically_set_func.cpp
new file mode 100755 (executable)
index 0000000..57d4d51
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_select_word_automatically_set : public utc_blink_ewk_base {
+};
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled select word automatically set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_select_word_automatically_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_select_word_automatically_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled select word automatically set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_select_word_automatically_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_select_word_automatically_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_select_word_automatically_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_select_word_automatically_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_spdy_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_spdy_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..50a40d7
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_spdy_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief Tests if returns TRUE when initiated with correct settings and
+* enabled spdy set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_spdy_enabled_set, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(settings);
+
+  Eina_Bool result = ewk_settings_spdy_enabled_set(settings, EINA_TRUE);
+  ASSERT_EQ(EINA_TRUE, result);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with NULL settings.
+*/
+TEST_F(utc_blink_ewk_settings_spdy_enabled_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_spdy_enabled_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_autosizing_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_autosizing_enabled_set_func.cpp
new file mode 100644 (file)
index 0000000..a901b7e
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_text_autosizing_enabled_set_func : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp(){
+    settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(settings != NULL);
+  }
+
+  utc_blink_ewk_settings_text_autosizing_enabled_set_func() : settings(NULL){
+  }
+
+protected:
+  Ewk_Settings* settings;
+};
+
+
+/**
+ * @brief Positive test case of ewk_settings_text_autosizing_enabled_set()
+ */
+TEST_F(utc_blink_ewk_settings_text_autosizing_enabled_set_func, SetTrue)
+{
+  ASSERT_TRUE(ewk_settings_text_autosizing_enabled_set(settings, EINA_TRUE));
+  EXPECT_TRUE(ewk_settings_text_autosizing_enabled_get(settings));
+}
+
+/**
+ * @brief Positive test case of ewk_settings_text_autosizing_enabled_set()
+ */
+TEST_F(utc_blink_ewk_settings_text_autosizing_enabled_set_func, SetFlase)
+{
+  ASSERT_TRUE(ewk_settings_text_autosizing_enabled_set(settings, EINA_FALSE));
+  EXPECT_FALSE(ewk_settings_text_autosizing_enabled_get(settings));
+}
+
+/**
+ * @brief Test case of ewk_settings_text_autosizing_enabled_set()
+ */
+TEST_F(utc_blink_ewk_settings_text_autosizing_enabled_set_func, InvalidArg)
+{
+  EXPECT_FALSE(ewk_settings_text_autosizing_enabled_set(NULL, EINA_TRUE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func.cpp
new file mode 100644 (file)
index 0000000..4f49250
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp(){
+    settings = ewk_view_settings_get(GetEwkWebView());
+    ASSERT_TRUE(settings != NULL);
+  }
+
+  utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func() : settings(NULL){
+  }
+
+protected:
+  Ewk_Settings* settings;
+};
+
+/**
+ * @brief Positive test case of ewk_settings_text_autosizing_font_scale_factor_set()
+ */
+TEST_F(utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func, SetTrue)
+{
+  ASSERT_TRUE(ewk_settings_text_autosizing_font_scale_factor_set(settings, EINA_TRUE));
+  EXPECT_TRUE(ewk_settings_text_autosizing_font_scale_factor_get(settings));
+}
+
+/**
+ * @brief Positive test case of ewk_settings_text_autosizing_font_scale_factor_set()
+ */
+TEST_F(utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func, SetFalse)
+{
+  ASSERT_TRUE(ewk_settings_text_autosizing_font_scale_factor_set(settings, EINA_FALSE));
+  EXPECT_FALSE(ewk_settings_text_autosizing_font_scale_factor_get(settings));
+}
+
+/**
+ * @brief Test case of ewk_settings_text_autosizing_font_scale_factor_set() with null
+ */
+TEST_F(utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func, InvalidArg)
+{
+  EXPECT_FALSE(ewk_settings_text_autosizing_font_scale_factor_set(NULL, EINA_TRUE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_selection_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_selection_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..3c0518e
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_text_selection_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled text selection set to TRUE/FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_text_selection_enabled_set, Set)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ASSERT_TRUE(NULL != settings);
+
+  Eina_Bool set = !ewk_settings_text_selection_enabled_get(settings);
+  ASSERT_EQ(EINA_TRUE, ewk_settings_text_selection_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_text_selection_enabled_get(settings));
+
+  set = !set;
+  ASSERT_EQ(EINA_TRUE, ewk_settings_text_selection_enabled_set(settings, set));
+  ASSERT_EQ(set, ewk_settings_text_selection_enabled_get(settings));
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_text_selection_enabled_set, NullArg)
+{
+  ASSERT_NE(EINA_TRUE, ewk_settings_text_selection_enabled_set(NULL, EINA_FALSE));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_style_state_enabled_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_style_state_enabled_func.cpp
new file mode 100755 (executable)
index 0000000..196768b
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_text_style_state_enabled : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled text selection set to TRUE.
+ */
+TEST_F(utc_blink_ewk_settings_text_style_state_enabled, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  Eina_Bool result = ewk_settings_text_style_state_enabled_get(settings);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and
+ * enabled text selection set to FALSE.
+ */
+TEST_F(utc_blink_ewk_settings_text_style_state_enabled, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  ewk_settings_text_style_state_enabled_set(settings, EINA_FALSE);
+  Eina_Bool result = ewk_settings_text_style_state_enabled_get(settings);
+  if (result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+TEST_F(utc_blink_ewk_settings_text_style_state_enabled, NEG_TEST)
+{
+  ewk_settings_text_style_state_enabled_set(NULL, EINA_FALSE);
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_zoom_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_text_zoom_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..f6ed58d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_text_zoom_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief Tests if returns TRUE when initiated with a correct webview and
+* enabled text zoom set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_text_zoom_enabled_set, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_text_zoom_enabled_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with a correct webview and
+* enabled text zoom set to FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_text_zoom_enabled_set, NEG_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_text_zoom_enabled_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief Tests if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_text_zoom_enabled_set, NEG_TEST2)
+{
+  Eina_Bool result = ewk_settings_text_zoom_enabled_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_uses_encoding_detector_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_uses_encoding_detector_set_func.cpp
new file mode 100755 (executable)
index 0000000..a5fb640
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_uses_encoding_detector_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief checking if returns TRUE when initiated with a correct webview and
+* enabled uses encoding detector set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_uses_encoding_detector_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_uses_encoding_detector_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief checking if returns TRUE when initiated with a correct webview and
+* enabled uses encoding detector set to FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_uses_encoding_detector_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_uses_encoding_detector_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief checking if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_uses_encoding_detector_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_uses_encoding_detector_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_settings_uses_keypad_without_user_action_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_settings_uses_keypad_without_user_action_set_func.cpp
new file mode 100755 (executable)
index 0000000..99c0fbd
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_settings_uses_keypad_without_user_action_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief checking if returns TRUE when initiated with a correct webview and
+* enabled uses keypad without user action set to TRUE.
+*/
+TEST_F(utc_blink_ewk_settings_uses_keypad_without_user_action_set, POS_TEST1)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_uses_keypad_without_user_action_set(settings, EINA_TRUE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief checking if returns TRUE when initiated with a correct webview and
+* enabled uses keypad without user action set to FALSE.
+*/
+TEST_F(utc_blink_ewk_settings_uses_keypad_without_user_action_set, POS_TEST2)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings) {
+    FAIL();
+  }
+
+  Eina_Bool result = ewk_settings_uses_keypad_without_user_action_set(settings, EINA_FALSE);
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+* @brief checking if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_settings_uses_keypad_without_user_action_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_settings_uses_keypad_without_user_action_set(NULL, EINA_FALSE);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_shutdown_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_shutdown_func.cpp
new file mode 100755 (executable)
index 0000000..c5f8c7e
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_shutdown : public utc_blink_ewk_base
+{
+  /*
+   * We need to overwrite the base method so this hiding is on purpose.
+   */
+  void SetUp()
+  {
+  // This test check ewk_init (normaly call in utc_blink_ewk_base::SetUp )
+  }
+
+  /*
+   * We need to overwrite the base method so this hiding is on purpose.
+   */
+  void TearDown()
+  {
+  // This test check ewk_init (normaly call in utc_blink_ewk_base::SetUp )
+  }
+};
+
+TEST_F(utc_blink_ewk_shutdown, POS_TEST)
+{
+  int result = ewk_init();
+  if (result <= 0)
+    utc_fail();
+
+  result = ewk_shutdown();
+  fprintf(stderr,"ewk_shutdown =%d\n",result);
+  if (result < 0)
+    utc_fail();
+}
+
+TEST_F(utc_blink_ewk_shutdown, NEG_TEST1)
+{
+  //shtdown without doing init
+  int result = ewk_shutdown();
+  while (result > 0) {
+    result = ewk_shutdown();
+  }
+  //do call after all cleanup to check behavior
+  result = ewk_shutdown();
+  fprintf(stderr,"ewk_shutdown=%d\n",result);
+  if (result > 0)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_center_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_center_get_func.cpp
new file mode 100755 (executable)
index 0000000..0656a0c
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_align_center_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: \n");
+    utc_blink_ewk_text_style_align_center_get* owner = NULL;
+
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_align_center_get*>(data);
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_align_center_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_align_center_get, POS_TEST1)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:center;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until get_text callback or timeout.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+TEST_F(utc_blink_ewk_text_style_align_center_get, POS_TEST2)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:none;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until get_text callback or timeout.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_align_center_get, NEG_TEST)
+{
+  utc_check_eq(EWK_TEXT_STYLE_STATE_FALSE, ewk_text_style_align_center_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_full_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_full_get_func.cpp
new file mode 100755 (executable)
index 0000000..3918be1
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_align_full_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+    utc_blink_ewk_text_style_align_full_get* owner = NULL;
+
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_align_full_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_align_full_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_align_full_get, POS_TEST1)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:justify;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until get text callback or timeout.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+TEST_F(utc_blink_ewk_text_style_align_full_get, POS_TEST2)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:none;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until get text callback or timeout.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_align_full_get, NEG_TEST)
+{
+  utc_check_eq(EWK_TEXT_STYLE_STATE_FALSE, ewk_text_style_align_full_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_left_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_left_get_func.cpp
new file mode 100755 (executable)
index 0000000..545dd11
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+
+class utc_blink_ewk_text_style_align_left_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_align_left_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_align_left_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_align_left_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_align_left_get, POS_TEST1)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:left;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until get_text callback or timeout.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+TEST_F(utc_blink_ewk_text_style_align_left_get, POS_TEST2)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:right;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until get_text callback or timeout.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_align_left_get, NEG_TEST)
+{
+  utc_check_eq(EWK_TEXT_STYLE_STATE_FALSE, ewk_text_style_align_left_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_right_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_align_right_get_func.cpp
new file mode 100755 (executable)
index 0000000..9f19ba6
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+
+class utc_blink_ewk_text_style_align_right_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_blink_ewk_text_style_align_right_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_align_right_get*>(data);
+
+    utc_message("[get_text_style callback] :: ");
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_align_right_get(style);
+    printf("State = %d\n", owner->state);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_align_right_get, POS_TEST1)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:right;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // wait until get_text callback or timeout
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+TEST_F(utc_blink_ewk_text_style_align_right_get, POS_TEST2)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:none;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // wait until get_text callback or timeout
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_align_right_get, NEG_TEST)
+{
+  utc_check_eq(EWK_TEXT_STYLE_STATE_FALSE, ewk_text_style_align_right_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_bg_color_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_bg_color_get_func.cpp
new file mode 100755 (executable)
index 0000000..316298c
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_bg_color_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_blink_ewk_text_style_bg_color_get* owner = NULL;
+    if(!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_bg_color_get*>(data);
+
+    utc_message("[get_text_style callback] :: ");
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    int r, g, b, a;
+    ewk_text_style_bg_color_get(style, &r, &g, &b, &a);
+    utc_blink_ewk_base::MainLoopResult result = utc_blink_ewk_base::Failure;
+    if (r == 0 && g == 255 && b == 0)
+      result = utc_blink_ewk_base::Success;
+
+    owner->EventLoopStop(result);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "text,style,state", get_text_style, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "text,style,state", get_text_style);
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_bg_color_get, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+
+  const char textStyleHTML[] =
+    "<!DOCTYPE html>"
+    "<html><head>"
+    "</head>"
+    "<body  onload='txtarea.focus(); txtarea.select()'>"
+    "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+    "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+    "</body></html>";
+
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until load finished.
+  utc_check_eq(EventLoopStart(), utc_blink_ewk_base::Success);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_bg_color_get, NEG_TEST)
+{
+  int r, g, b, a;
+  utc_check_eq(ewk_text_style_bg_color_get(NULL, &a, &r, &g, &b), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_bold_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_bold_get_func.cpp
new file mode 100755 (executable)
index 0000000..d807db1
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_bold_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_bold_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_bold_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_bold_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bold_get(),testing results to get font storke.
+ */
+TEST_F(utc_blink_ewk_text_style_bold_get, POS_TEST)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // wait until get_text callback or timeout
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_bold_get, NEG_TEST)
+{
+  utc_check_eq(ewk_text_style_bold_get(NULL), EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_color_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_color_get_func.cpp
new file mode 100755 (executable)
index 0000000..d1bc67b
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_color_get : public utc_blink_ewk_base {
+ protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_color_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_color_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+
+    Eina_Bool get_result = ewk_text_style_color_get(style, &owner->r, &owner->g, &owner->b, &owner->a);
+
+    if (get_result != EINA_TRUE) {
+      utc_fail();
+    }
+
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  int a, r, g, b;
+};
+
+
+/**
+ * @brief Positive test case of ewk_text_style_color_get(),testing results to get Color.
+ */
+TEST_F(utc_blink_ewk_text_style_color_get, POS_TEST)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+  EventLoopStart(10.0);
+
+  utc_check_eq(r, 255);
+  utc_check_eq(g, 0);
+  utc_check_eq(b, 0);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_color_get, NEG_TEST)
+{
+  utc_check_eq(ewk_text_style_color_get(NULL, &a, &r, &g, &b), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_font_size_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_font_size_get_func.cpp
new file mode 100755 (executable)
index 0000000..8975968
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_font_size_get : public utc_blink_ewk_base {
+ protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+    utc_blink_ewk_text_style_font_size_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_font_size_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+
+    owner->font_size = ewk_text_style_font_size_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "text,style,state", get_text_style);
+  }
+
+protected:
+  std::string font_size;
+};
+
+/**
+* @brief Positive test case of ewk_text_style_font_size_get(). To get the Font size.
+*/
+TEST_F(utc_blink_ewk_text_style_font_size_get, POS_TEST)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until load finished.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(std::string("5"), font_size);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of command.
+*/
+TEST_F(utc_blink_ewk_text_style_font_size_get, NEG_TEST)
+{
+  utc_check_eq(0, ewk_text_style_font_size_get(NULL));
+}
+
+
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_has_composition_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_has_composition_get_func.cpp
new file mode 100755 (executable)
index 0000000..c224e8a
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_has_composition_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: \n");
+    utc_blink_ewk_text_style_has_composition_get* owner = NULL;
+
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_has_composition_get*>(data);
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+
+    owner->state = ewk_text_style_has_composition_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Eina_Bool state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_has_composition_get(),testing results to get composition state.
+ */
+TEST_F(utc_blink_ewk_text_style_has_composition_get, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  // Wait until load finished.
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_has_composition_get, NEG_TEST)
+{
+  utc_check_eq(ewk_text_style_has_composition_get(NULL), EINA_FALSE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_italic_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_italic_get_func.cpp
new file mode 100755 (executable)
index 0000000..2a34369
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_italic_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_italic_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_italic_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_italic_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_italic_get(),testing results to get font Style.
+ */
+TEST_F(utc_blink_ewk_text_style_italic_get, POS_TEST)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_italic_get, NEG_TEST)
+{
+  utc_check_eq(ewk_text_style_italic_get(NULL), EWK_TEXT_STYLE_STATE_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_ordered_list_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_ordered_list_get_func.cpp
new file mode 100755 (executable)
index 0000000..87b9a88
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_ordered_list_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+    utc_blink_ewk_text_style_ordered_list_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_ordered_list_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_ordered_list_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_ordered_list_get, POS_TEST1)
+{
+  const char textStyleHTML[] =
+   "<html>"
+   "<head>"
+   "<script>"
+   "function selectText(element) {"
+    "var doc = document;"
+    "var text = doc.getElementById(element);"
+
+    "if (doc.body.createTextRange) {"
+        "var range = doc.body.createTextRange();"
+        "range.moveToElementText(text);"
+        "range.select();"
+    "} else if (window.getSelection) {"
+        "var selection = window.getSelection();"
+        "var range = doc.createRange();"
+        "range.selectNodeContents(text);"
+        "selection.removeAllRanges();"
+        "selection.addRange(range);"
+    "}"
+  "}"
+   "function funcselect() {"
+    "selectText('myText');"
+  "}"
+
+  "</script>"
+  "<style>"
+   "ul.a {list-style-type:circle;}"
+   "ul.b {list-style-type:square;}"
+   "ol.c {list-style-type:upper-roman;}"
+   "ol.d {list-style-type:lower-alpha;}"
+  "</style>"
+   "</head>"
+    "<body  onload='funcselect()'>"
+    "<div id=\"myText\">"
+      "<ol class=\"c\">"
+       "<li>Coffee</li>"
+       "<li>Tea</li>"
+       "<li>Coca Cola</li>"
+       "</ol>"
+    "</div>"
+    "</body>"
+  "</html>";
+
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+TEST_F(utc_blink_ewk_text_style_ordered_list_get, POS_TEST2)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:none;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_ordered_list_get, NEG_TEST)
+{
+  utc_check_eq(EWK_TEXT_STYLE_STATE_FALSE, ewk_text_style_ordered_list_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_position_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_position_get_func.cpp
new file mode 100755 (executable)
index 0000000..1fdb4b2
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_position_get : public utc_blink_ewk_base {
+ protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_position_get* owner = NULL;
+
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_position_get*>(data);
+
+    if (!event_info) {
+      utc_fail();
+    }
+
+    Ewk_Text_Style* gStyle = (Ewk_Text_Style*)event_info;
+
+    ewk_text_style_position_get(gStyle, &owner->leftpoint, &owner->rightpoint);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Evas_Point leftpoint, rightpoint;
+};
+
+
+/**
+ * @brief Positive test case of ewk_text_style_position_get(),testing results to get position.
+ */
+TEST_F(utc_blink_ewk_text_style_position_get, POS_TEST)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_ne(leftpoint.x, rightpoint.x);
+  utc_check_ne(leftpoint.y, rightpoint.y);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_position_get, NEG_TEST)
+{
+  utc_check_eq( ewk_text_style_position_get(NULL, &leftpoint, &rightpoint), EINA_FALSE);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_underline_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_underline_get_func.cpp
new file mode 100755 (executable)
index 0000000..6a5c949
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_underline_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_underline_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_underline_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_underline_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_underline_get(),testing results to get Underline property.
+ */
+TEST_F(utc_blink_ewk_text_style_underline_get, POS_TEST)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-decoration:underline;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_underline_get, NEG_TEST)
+{
+  utc_check_eq(ewk_text_style_underline_get(NULL), EWK_TEXT_STYLE_STATE_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_text_style_unordered_list_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_text_style_unordered_list_get_func.cpp
new file mode 100755 (executable)
index 0000000..d796733
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_text_style_unordered_list_get : public utc_blink_ewk_base {
+protected:
+  static void get_text_style(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[get_text_style callback] :: ");
+
+    utc_blink_ewk_text_style_unordered_list_get* owner = NULL;
+    if (!data) {
+      utc_fail();
+    }
+
+    owner = static_cast<utc_blink_ewk_text_style_unordered_list_get*>(data);
+
+    Ewk_Text_Style* style = (Ewk_Text_Style*)event_info;
+    owner->state = ewk_text_style_unordered_list_get(style);
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(),"text,style,state", get_text_style, this);
+
+    Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+    ewk_settings_text_style_state_enabled_set(settings, EINA_TRUE);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(),"text,style,state", get_text_style);
+  }
+
+protected:
+  Ewk_Text_Style_State state;
+};
+
+/**
+ * @brief Positive test case of ewk_text_style_bg_color_get(),testing results to get background Color.
+ */
+TEST_F(utc_blink_ewk_text_style_unordered_list_get, POS_TEST1)
+{
+  const char textStyleHTML[] =
+   "<html>"
+   "<head>"
+   "<script>"
+   "function selectText(element) {"
+    "var doc = document;"
+    "var text = doc.getElementById(element);"
+
+    "if (doc.body.createTextRange) {"
+        "var range = doc.body.createTextRange();"
+        "range.moveToElementText(text);"
+        "range.select();"
+    "} else if (window.getSelection) {"
+        "var selection = window.getSelection();"
+        "var range = doc.createRange();"
+        "range.selectNodeContents(text);"
+        "selection.removeAllRanges();"
+        "selection.addRange(range);"
+    "}"
+  "}"
+   "function funcselect() {"
+    "selectText('myText');"
+  "}"
+
+ "</script>"
+ "<style>"
+   "ul.a {list-style-type:circle;}"
+   "ul.b {list-style-type:square;}"
+   "ol.c {list-style-type:upper-roman;}"
+   "ol.d {list-style-type:lower-alpha;}"
+ "</style>"
+   "</head>"
+    "<body  onload='funcselect()'>"
+    "<div id=\"myText\">"
+      "<ul class=\"a\">"
+        "<li>Coffee</li>"
+        "<li>Tea</li>"
+        "<li>Coca Cola</li>"
+      "</ul>"
+    "</div>"
+    "</body>"
+"</html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_TRUE);
+}
+
+TEST_F(utc_blink_ewk_text_style_unordered_list_get, POS_TEST2)
+{
+  const char textStyleHTML[] =
+      "<!DOCTYPE html>"
+      "<html><head>"
+      "</head>"
+      "<body  onload='txtarea.focus(); txtarea.select()'>"
+      "<textarea id='txtarea' style='text-align:none;font-weight:bold;font-style:italic;background-color:rgb(0,255,0);"
+      "font-size:20px;color:rgb(255,0,0)'>select text</textarea>"
+      "</body></html>";
+  ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart(10.0);
+
+  if (result != utc_blink_ewk_base::Success) {
+    utc_fail();
+  }
+
+  utc_check_eq(state, EWK_TEXT_STYLE_STATE_FALSE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_text_style_unordered_list_get, NEG_TEST)
+{
+  utc_check_eq(EWK_TEXT_STYLE_STATE_FALSE, ewk_text_style_unordered_list_get(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_user_media_permission_request_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_user_media_permission_request_set_func.cpp
new file mode 100755 (executable)
index 0000000..63401ac
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_user_media_permission_set : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add( GetEwkWebView(), "usermedia,permission,request", media_permission_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del( GetEwkWebView(), "usermedia,permission,request", media_permission_handler);
+  }
+
+  static void media_permission_handler(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[media permission handler] ::");
+    if(data)
+    {
+      utc_blink_ewk_user_media_permission_set *owner= static_cast<utc_blink_ewk_user_media_permission_set*>(data);
+      Ewk_User_Media_Permission_Request* media_permission_request = static_cast<Ewk_User_Media_Permission_Request*>(event_info);
+      if (!media_permission_request) {
+        owner->EventLoopStop(Failure);
+        return;
+      }
+      ewk_user_media_permission_request_set(media_permission_request, EINA_TRUE);
+      owner->EventLoopStop(Success);
+    }
+  }
+};
+
+/**
+ * @brief Checking whether sending cancellation notification for authentication challenge works properly.
+ */
+TEST_F(utc_blink_ewk_user_media_permission_set, POS_TEST)
+{
+  if ( !ewk_view_url_set( GetEwkWebView(), "http://shinydemos.com/explode/"))
+    utc_fail();
+
+  if( Success != EventLoopStart())
+    utc_fail();
+
+  evas_object_show( GetEwkWebView());
+  evas_object_show( GetEwkWindow());
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_user_media_permission_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(NULL, "http://shinydemos.com/explode/");
+  if (result)
+    utc_fail();
+
+  evas_object_show( GetEwkWebView());
+  evas_object_show( GetEwkWindow());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_user_media_permission_request_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_user_media_permission_request_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..73c1c29
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_user_media_permission_suspend : public utc_blink_ewk_base
+{
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "usermedia,permission,request", media_permission_handler, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "usermedia,permission,request", media_permission_handler);
+  }
+
+  static void media_permission_handler(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[media permission handler] ::");
+    if(data)
+    {
+      utc_blink_ewk_user_media_permission_suspend *owner= static_cast<utc_blink_ewk_user_media_permission_suspend*>(data);
+      Ewk_User_Media_Permission_Request* media_permission_request = static_cast<Ewk_User_Media_Permission_Request*>(event_info);
+      if (!media_permission_request) {
+        owner->EventLoopStop(Failure);
+        return;
+      }
+      ewk_user_media_permission_request_suspend(media_permission_request);
+      owner->EventLoopStop(Success);
+    }
+  }
+};
+
+/**
+  * @brief Checking whether sending cancellation notification for authentication challenge works properly.
+  */
+TEST_F(utc_blink_ewk_user_media_permission_suspend, POS_TEST)
+{
+  if( !ewk_view_url_set(GetEwkWebView(), "http://shinydemos.com/explode/"))
+    utc_fail();
+
+  if( Success != EventLoopStart())
+    utc_fail();
+
+  evas_object_show( GetEwkWebView());
+  evas_object_show( GetEwkWindow());
+}
+
+/**
+  * @brief Checking whether function works properly in case of NULL of a webview.
+  */
+TEST_F(utc_blink_ewk_user_media_permission_suspend, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(NULL, "http://shinydemos.com/explode/");
+  if (result)
+    utc_fail();
+
+  evas_object_show( GetEwkWebView());
+  evas_object_show( GetEwkWindow());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_add_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_add_func.cpp
new file mode 100755 (executable)
index 0000000..bcc3603
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+class utc_blink_ewk_view_add : public utc_blink_ewk_base
+{
+protected:
+  Evas_Object *webview, *window;
+  /* Startup function */
+  void SetUp()
+  {
+    /* 2. Initialization of the EFL (and other) libraries */
+    g_type_init();
+    ewk_init();
+    elm_init(0, NULL);
+
+    elm_config_preferred_engine_set("opengl_x11");
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    /* 2. Freeing resources */
+    if (webview)
+      evas_object_del(webview);
+
+    if (window)
+      evas_object_del(window);
+  }
+};
+
+/**
+ * @brief Tests if returns valid webview when called with correct Evas object.
+ */
+TEST_F(utc_blink_ewk_view_add, POS_TEST)
+{
+  Eina_Bool result = EINA_FALSE;
+  window = elm_win_add(NULL, "TC Launcher", ELM_WIN_BASIC);
+  elm_win_title_set(window, "TC Launcher");
+  Evas *evas = evas_object_evas_get(window);
+
+  /* Initialization of webview */
+  webview = ewk_view_add(evas);
+
+  if( webview)
+    result = EINA_TRUE;
+
+  evas_object_show(webview);
+  evas_object_show(window);
+
+  evas_object_del(webview);
+  evas_object_del(window);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns NULL when not called with NULL Evas object.
+ */
+TEST_F(utc_blink_ewk_view_add, NEG_TEST)
+{
+  webview = ewk_view_add(NULL);
+  if( webview)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_add_with_context_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_add_with_context_func.cpp
new file mode 100755 (executable)
index 0000000..d2b698a
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+class utc_blink_ewk_view_add_with_context : public utc_blink_ewk_base
+{
+protected:
+  /* Startup function */
+  void SetUp()
+  {
+    /* 1. Standard TETware test initialization message */
+    utc_message("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+    /* 2. Initialization of the EFL (and other) libraries */
+    g_type_init();
+    elm_init(0, NULL);
+  }
+
+  /* Cleanup function */
+  void TearDown()
+  {
+    /* Standard TETware test end/cleanup messages */
+    utc_message("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+
+    /* Closing whole EWK */
+    ecore_evas_shutdown();
+    ecore_shutdown();
+    evas_shutdown();
+    // elm_shutdown();
+    // TODO
+    // *** ECORE ERROR: Ecore Magic Check Failed!!!
+    // *** IN FUNCTION: ecore_evas_free()
+  }
+};
+
+/**
+ * @brief Tests if returns valid webview when called with correct Evas object.
+ */
+TEST_F(utc_blink_ewk_view_add_with_context, POS_TEST)
+{
+  Eina_Bool result = EINA_FALSE;
+  Evas_Object* window = elm_win_add(NULL, "TC Launcher", ELM_WIN_BASIC);
+  elm_win_title_set(window, "TC Launcher");
+  Evas* evas = evas_object_evas_get(window);
+
+  /* Initialization of webview */
+  Evas_Object* webview = ewk_view_add_with_context(evas, ewk_context_default_get());
+
+  if( webview)
+    result = EINA_TRUE;
+
+  evas_object_show(webview);
+  evas_object_show(window);
+
+  evas_object_del(webview);
+  evas_object_del(window);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns NULL when not called with NULL Evas object.
+ */
+TEST_F(utc_blink_ewk_view_add_with_context, NEG_TEST1)
+{
+  Evas_Object* webview = ewk_view_add_with_context(NULL, ewk_context_default_get());
+  if( webview)
+    utc_fail();
+}
+
+/**
+ * @brief Tests if returns NULL when not called with NULL Evas object and NULL context.
+ */
+TEST_F(utc_blink_ewk_view_add_with_context, NEG_TEST2)
+{
+  Evas_Object* webview = ewk_view_add_with_context(NULL, NULL);
+  if( webview)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_add_with_session_data_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_add_with_session_data_func.cpp
new file mode 100755 (executable)
index 0000000..63734f7
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_add_with_session_data_func : public utc_blink_ewk_base
+{
+protected:
+  std::string firstPage;
+  std::string testUrl;
+  std::string lastPage;
+
+  const char *sessionData;
+  Evas_Object *otherWebview;
+
+  void PreSetUp()
+  {
+    firstPage = GetResourceUrl("common/sample.html");
+    testUrl   = GetResourceUrl("common/sample_1.html");
+    lastPage  = GetResourceUrl("common/sample_2.html");
+
+    otherWebview = NULL;
+    sessionData = NULL;
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(Success);
+  }
+
+  void PostTearDown()
+  {
+    if (otherWebview)
+      evas_object_del(otherWebview);
+    if (sessionData)
+    free(const_cast<char *>(sessionData));
+  }
+};
+
+
+/**
+ * @brief Tests if returns valid webview when called with correct Evas object.
+ */
+TEST_F(utc_blink_ewk_view_add_with_session_data_func, POS_TEST)
+{
+  ewk_view_url_set(GetEwkWebView(), firstPage.c_str());
+  ASSERT_EQ(EventLoopStart(), Success);
+  ewk_view_url_set(GetEwkWebView(), testUrl.c_str());
+  ASSERT_EQ(EventLoopStart(), Success);
+  ewk_view_url_set(GetEwkWebView(), lastPage.c_str());
+  ASSERT_EQ(EventLoopStart(), Success);
+  ewk_view_back(GetEwkWebView());
+  ASSERT_EQ(EventLoopStart(), Success);
+
+  ASSERT_TRUE(ewk_view_forward_possible(GetEwkWebView()) && "before");
+  ASSERT_TRUE(ewk_view_back_possible(GetEwkWebView()) && "before");
+
+  unsigned length = 0;
+  ewk_view_session_data_get(GetEwkWebView(), &sessionData, &length);
+
+  ASSERT_TRUE(sessionData);
+  ASSERT_NE(length, 0);
+
+  otherWebview = ewk_view_add_with_session_data(GetEwkEvas(), sessionData, length);
+  ASSERT_TRUE(otherWebview);
+
+  ASSERT_STREQ(testUrl.c_str(), ewk_view_url_get(otherWebview));
+  ASSERT_TRUE(ewk_view_forward_possible(otherWebview) && "after");
+  ASSERT_TRUE(ewk_view_back_possible(otherWebview) && "after");
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL Evas object.
+ */
+TEST_F(utc_blink_ewk_view_add_with_session_data_func, NEG_TEST_NULL_EVAS)
+{
+  ewk_view_url_set(GetEwkWebView(), firstPage.c_str());
+  ASSERT_EQ(EventLoopStart(), Success);
+
+  const char *data;
+  unsigned length;
+  ewk_view_session_data_get(GetEwkWebView(), &data, &length);
+
+  ewk_view_add_with_session_data(NULL, data, length);
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL data.
+ */
+TEST_F(utc_blink_ewk_view_add_with_session_data_func, NEG_TEST_NULL_DATA)
+{
+  const char *data = NULL;
+  unsigned length = 0;
+  ASSERT_FALSE(ewk_view_add_with_session_data(GetEwkEvas(), data, length));
+}
+
+/**
+ * @brief Tests if returns NULL when called with invalid data.
+ */
+TEST_F(utc_blink_ewk_view_add_with_session_data_func, NEG_TEST_INVALID_DATA)
+{
+  const char data[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  unsigned length = sizeof(data) / sizeof(data[0]);
+
+  ASSERT_FALSE(ewk_view_add_with_session_data(GetEwkEvas(), data, length));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_app_name_user_agent_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_app_name_user_agent_get_func.cpp
new file mode 100755 (executable)
index 0000000..a91781f
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_application_name_for_user_agent_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Positive test case of ewk_view_user_agent_get()
+ */
+TEST_F(utc_blink_ewk_view_application_name_for_user_agent_get, POS_TEST)
+{
+  const char* testString = "TEST_STRING";
+  ASSERT_EQ(EINA_TRUE, ewk_view_application_name_for_user_agent_set(GetEwkWebView(), testString));
+  const char* userAgent = ewk_view_application_name_for_user_agent_get(GetEwkWebView());
+  EXPECT_EQ(strcmp(userAgent, testString), 0);
+}
+
+/**
+ * @brief Negative test case of ewk_view_user_agent_get()
+ */
+TEST_F(utc_blink_ewk_view_application_name_for_user_agent_get, NEG_TEST)
+{
+  const char* userAgent =  ewk_view_application_name_for_user_agent_get(NULL);
+  ASSERT_TRUE(userAgent == NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_app_name_user_agent_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_app_name_user_agent_set_func.cpp
new file mode 100755 (executable)
index 0000000..a36845e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_application_name_for_user_agent_set : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Positive test case of ewk_view_user_agent_set()
+ */
+TEST_F(utc_blink_ewk_view_application_name_for_user_agent_set, POS_TEST)
+{
+  const char* testString = "TEST_STRING";
+  ASSERT_EQ(EINA_TRUE, ewk_view_application_name_for_user_agent_set(GetEwkWebView(), testString));
+  const char* userAgent = ewk_view_application_name_for_user_agent_get(GetEwkWebView());
+  EXPECT_EQ(strcmp(userAgent, testString), 0);
+}
+
+/**
+ * @brief Negative test case of ewk_view_user_agent_set()
+ */
+TEST_F(utc_blink_ewk_view_application_name_for_user_agent_set, NEG_TEST)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_view_application_name_for_user_agent_set(GetEwkWebView(), ""));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_back_forward_list_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_back_forward_list_clear_func.cpp
new file mode 100644 (file)
index 0000000..cefc575
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_back_forward_list_clear : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_view_back_forward_list_clear::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_view_back_forward_list_clear::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_view_back_forward_list_clear::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, POS_TES)
+{
+  // load 3 pages to get some interesting history
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // check if back forward possible
+  ASSERT_EQ(EINA_TRUE, ewk_view_back_possible(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_forward_possible(GetEwkWebView()));
+
+  // clear back-forward list
+  ewk_view_back_forward_list_clear(GetEwkWebView());
+
+  // check if back forward possible
+  ASSERT_EQ(EINA_FALSE, ewk_view_back_possible(GetEwkWebView()));
+  ASSERT_EQ(EINA_FALSE, ewk_view_forward_possible(GetEwkWebView()));
+}
+
+TEST_F(utc_blink_ewk_view_back_forward_list_clear, NEG_TEST)
+{
+  ewk_view_back_forward_list_clear(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_back_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_back_func.cpp
new file mode 100755 (executable)
index 0000000..71eb582
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_back : public utc_blink_ewk_base
+{
+protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Change whether it is possible to go back when two webpages have been loaded
+ */
+TEST_F(utc_blink_ewk_view_back, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample_1.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  Eina_Bool result = ewk_view_back(GetEwkWebView());
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_back, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_back(NULL);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_back_possible_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_back_possible_func.cpp
new file mode 100755 (executable)
index 0000000..9baeaad
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_back_possible : public utc_blink_ewk_base
+{
+protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Check whether it is possible to go back when no webpage is loaded
+ */
+TEST_F(utc_blink_ewk_view_back_possible, POS_TEST1)
+{
+  int result = ewk_view_back_possible( GetEwkWebView());
+  utc_check_eq(result, 0);
+}
+
+/**
+ * @brief Change whether it is possible to go back when only one webpage is loaded
+ */
+TEST_F(utc_blink_ewk_view_back_possible, POS_TEST2)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  int result = ewk_view_back_possible( GetEwkWebView());
+  utc_check_eq(result, 0);
+}
+
+/**
+ * @brief Change whether it is possible to go back when two webpages have been loaded
+ */
+TEST_F(utc_blink_ewk_view_back_possible, POS_TEST3)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl("common/sample_1.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  int result = ewk_view_back_possible( GetEwkWebView());
+  utc_check_eq(result, 1);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_back_possible, NEG_TEST)
+{
+  int result = ewk_view_back_possible(NULL);
+  utc_check_eq(result, 0);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_browser_font_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_browser_font_set_func.cpp
new file mode 100644 (file)
index 0000000..d659989
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_browser_font_set : public utc_blink_ewk_base
+{
+ protected:
+};
+
+/**
+* @brief Check whether function works well with correct webview as parameter
+*/
+TEST_F(utc_blink_ewk_view_browser_font_set, POS_TEST)
+{
+  ewk_view_browser_font_set(GetEwkWebView());
+  SUCCEED();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_browser_font_set, NEG_TEST)
+{
+  ewk_view_browser_font_set(NULL);
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_command_execute_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_command_execute_func.cpp
new file mode 100755 (executable)
index 0000000..5b5a1ab
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_command_execute : public utc_blink_ewk_base
+{
+protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop( Success );
+  }
+};
+
+/**
+* @brief Positive test case of ewk_view_command_execute(). Page is loaded and command "SelectAll" is executed.
+*/
+TEST_F(utc_blink_ewk_view_command_execute, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  Eina_Bool result = ewk_view_command_execute(GetEwkWebView(), "SelectAll", NULL);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_command_execute, NEG_TEST1)
+{
+  Eina_Bool result = ewk_view_command_execute(NULL, "SelectAll", NULL);
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of command.
+*/
+TEST_F(utc_blink_ewk_view_command_execute, NEG_TEST2)
+{
+  Eina_Bool result = ewk_view_command_execute(GetEwkWebView(), NULL, NULL);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_content_security_policy_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_content_security_policy_set_func.cpp
new file mode 100755 (executable)
index 0000000..10ac354
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#define SAMPLE_CONTENT_SECURITY_POLICY "ewk_view/sample_content_security_policy.html"
+
+#include "utc_blink_ewk_base.h"
+
+const char* policy = "default-src 'self';";
+
+class utc_blink_ewk_view_content_security_policy_set : public utc_blink_ewk_base {
+protected:
+  std::string title;
+
+  void LoadFinished(Evas_Object* webview) {
+
+     ecore_timer_add(2, getTitle, this);
+  }
+
+  static Eina_Bool getTitle(void *data)
+  {
+
+    utc_blink_ewk_view_content_security_policy_set* owner = static_cast<utc_blink_ewk_view_content_security_policy_set*>(data);
+
+    owner->title = ewk_view_title_get(owner->GetEwkWebView());
+
+    owner->EventLoopStop(utc_blink_ewk_base::Success);
+
+    return EINA_FALSE;
+  }
+};
+
+/**
+ * @brief Tests if it isn't possible to eval inline script when content security policy is set
+ * and enforce policy header is set.
+ */
+TEST_F(utc_blink_ewk_view_content_security_policy_set, POS_TEST)
+{
+  ewk_view_content_security_policy_set(GetEwkWebView(), policy, EWK_ENFORCE_POLICY);
+
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_CONTENT_SECURITY_POLICY).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_str_eq((const char*)title.c_str(), "PASS");
+}
+
+/**
+ * @brief Tests if there is possibility to eval inline script when content security policy
+ * and report only policy header is set.
+ */
+TEST_F(utc_blink_ewk_view_content_security_policy_set, POS_TEST2)
+{
+  ewk_view_content_security_policy_set(GetEwkWebView(), policy, EWK_REPORT_ONLY);
+
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_CONTENT_SECURITY_POLICY).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_str_eq((const char*)title.c_str(), "FAIL");
+}
+
+/**
+ * @brief Tests if there is possibility to eval inline script when content security policy is disabled.
+ */
+TEST_F(utc_blink_ewk_view_content_security_policy_set, NEG_TEST)
+{
+  ewk_view_content_security_policy_set(NULL, NULL, EWK_ENFORCE_POLICY);
+
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_CONTENT_SECURITY_POLICY).c_str());
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  utc_check_str_ne((const char*)title.c_str(), "PASS");
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_contents_pdf_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_contents_pdf_get_func.cpp
new file mode 100755 (executable)
index 0000000..3336709
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_contents_pdf_get : public utc_blink_ewk_base
+{
+ protected:
+  bool file_exists;
+  void PreSetUp()
+  {
+    file_exists=false;
+    evas_object_smart_callback_add(GetEwkWebView(), "frame,rendered", FrameRendered, this);
+  }
+
+  void PostTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "frame,rendered", FrameRendered);
+  }
+
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop( Success );
+  }
+
+  static void FrameRendered(void* data, Evas_Object* obj, void* event_info)
+  {
+    utc_blink_ewk_view_contents_pdf_get*owner=static_cast<utc_blink_ewk_view_contents_pdf_get*>(data);
+    utc_message("[Frame rendered] ::");
+    if(owner)
+      owner->EventLoopStop( Success );
+  }
+
+  static Eina_Bool VerifyFile(void* data)
+  {
+    if(data)
+    {
+      utc_blink_ewk_view_contents_pdf_get*owner=static_cast<utc_blink_ewk_view_contents_pdf_get*>(data);
+      owner->file_exists = ecore_file_exists("/tmp/sample.pdf");
+      owner->EventLoopStop( Success );
+    }
+    return ECORE_CALLBACK_CANCEL;
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_contents_pdf_get().
+ * Page is loaded and API is called to save pdf file.
+ * Then existence of file is verified by 3 second timer.
+ */
+TEST_F(utc_blink_ewk_view_contents_pdf_get, POS_TEST)
+{
+  bool result = ewk_view_url_set(GetEwkWebView(),"http://www.google.com");
+  if (!result)
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  Evas_Coord width = 0;
+  Evas_Coord height = 0;
+  result = ewk_view_contents_size_get(GetEwkWebView(), &width, &height);
+  if(!result || !width || !height)
+    utc_fail();
+
+  result = ewk_view_contents_pdf_get(GetEwkWebView(), width, height, "/tmp/sample.pdf");
+  if (!result)
+    utc_fail();
+ // waiting for 3 seconds to pdf printer to work.
+  ecore_timer_add(3, VerifyFile, this);
+  EventLoopStart();
+
+  utc_check_true(file_exists);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_contents_pdf_get, NEG_TEST)
+{
+  bool result = ewk_view_contents_pdf_get(NULL, 200, 200, "/tmp/sample.pdf");
+  utc_check_false(result);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_contents_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_contents_set_func.cpp
new file mode 100755 (executable)
index 0000000..ece958e
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_contents_set : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Positive test case of ewk_view_contents_set(),testing results whether contents are set or not.
+ */
+TEST_F(utc_blink_ewk_view_contents_set, POS_TEST)
+{
+  Eina_Bool results = ewk_view_contents_set(GetEwkWebView(), "This is Plain Text", 20, 0, 0, 0);
+  utc_check_eq(results, EINA_TRUE);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_view_contents_set, NEG_TEST)
+{
+  utc_check_eq(ewk_view_contents_set(NULL, "This is Plain Text", 0, 0, 0, 0), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_contents_size_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_contents_size_get_func.cpp
new file mode 100755 (executable)
index 0000000..ec8f017
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_contents_size_get : public utc_blink_ewk_base
+{
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    utc_message("[loadFinished] :: \n");
+    EventLoopStop( Success );
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_contents_size_get(). Page is loaded and API is called to get content size.
+ */
+TEST_F(utc_blink_ewk_view_contents_size_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  Evas_Coord width = 0;
+  Evas_Coord height = 0;
+
+  Eina_Bool result = ewk_view_contents_size_get(GetEwkWebView(), &width, &height);
+
+  if (width == 0 || height == 0)
+    result = EINA_FALSE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_contents_size_get, NEG_TEST)
+{
+  Evas_Coord width = 0;
+  Evas_Coord height = 0;
+
+  Eina_Bool result = ewk_view_contents_size_get(NULL, &width, &height);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_context_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_context_get_func.cpp
new file mode 100755 (executable)
index 0000000..ada3ec1
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_context_get : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Tests if returns correct context when initiated with a valid webview.
+ */
+TEST_F(utc_blink_ewk_view_context_get, POS_TEST)
+{
+  Ewk_Context* context = ewk_view_context_get(GetEwkWebView());
+  if (!context)
+    utc_fail();
+}
+
+/**
+ * @brief Tests if returns NULL context when initiated with a NULL webview.
+ */
+TEST_F(utc_blink_ewk_view_context_get, NEG_TEST)
+{
+  Ewk_Context* context = ewk_view_context_get(NULL);
+  if (context)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_custom_header_add_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_custom_header_add_func.cpp
new file mode 100755 (executable)
index 0000000..17e9fd0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_custom_header_add : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checking whether the custom header is added properly.
+ */
+TEST_F(utc_blink_ewk_view_custom_header_add, POS_TEST)
+{
+  EXPECT_EQ(EINA_TRUE, ewk_view_custom_header_add(GetEwkWebView(), "Test-Name", "Test-Value"));
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_custom_header_add, NEG_TEST)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_view_custom_header_add(NULL, "Test-Name", "Test-Value"));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_custom_header_remove_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_custom_header_remove_func.cpp
new file mode 100644 (file)
index 0000000..42926ce
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_custom_header_remove : public utc_blink_ewk_base {
+protected:
+  static const char* test_name;
+  static const char* test_value;
+  static const char* testnull_name;
+  static const char* testnull_value;
+  static const char* testnotexisting_name;
+};
+
+const char* utc_blink_ewk_view_custom_header_remove::test_name = "TestRemove-Name";
+const char* utc_blink_ewk_view_custom_header_remove::test_value = "TestRemove-Value";
+const char* utc_blink_ewk_view_custom_header_remove::testnull_name = "TestRemoveNull-Name";
+const char* utc_blink_ewk_view_custom_header_remove::testnull_value = "TestRemoveNull-Value";
+const char* utc_blink_ewk_view_custom_header_remove::testnotexisting_name = "TestRemoveNotExisting-Name";
+
+
+/**
+ * @brief Checking whether the custom header is removed properly.
+ */
+TEST_F(utc_blink_ewk_view_custom_header_remove, POS_TEST)
+{
+  ewk_view_custom_header_add(GetEwkWebView(), test_name, test_value);
+  Eina_Bool result = ewk_view_custom_header_remove(GetEwkWebView(), test_name);
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_custom_header_remove, NEG_TEST1)
+{
+  ewk_view_custom_header_add(GetEwkWebView(), testnull_name, testnull_value);
+  Eina_Bool result = ewk_view_custom_header_remove(NULL, testnull_name);
+  EXPECT_NE(result, EINA_TRUE);
+}
+
+TEST_F(utc_blink_ewk_view_custom_header_remove, NEG_TEST2)
+{
+  Eina_Bool result = ewk_view_custom_header_remove(GetEwkWebView(), testnotexisting_name);
+  EXPECT_NE(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_draws_transparent_background_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_draws_transparent_background_set_func.cpp
new file mode 100755 (executable)
index 0000000..86a61e0
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_draws_transparent_background_set : public utc_blink_ewk_base
+{
+};
+
+/**
+* @brief checking if returns TRUE when initiated with a correct webview and
+* enabled draws transparent background set to TRUE.
+*/
+TEST_F(utc_blink_ewk_view_draws_transparent_background_set, POS_TEST1)
+{
+  Eina_Bool result = ewk_view_draws_transparent_background_set(GetEwkWebView(), EINA_TRUE);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief checking if returns TRUE when initiated with a correct webview and
+* enabled draws transparent background set to FALSE.
+*/
+TEST_F(utc_blink_ewk_view_draws_transparent_background_set, POS_TEST2)
+{
+  Eina_Bool result = ewk_view_draws_transparent_background_set(GetEwkWebView(), EINA_FALSE);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief checking if returns FALSE when initiated with NULL webview.
+*/
+TEST_F(utc_blink_ewk_view_draws_transparent_background_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_draws_transparent_background_set(NULL, EINA_FALSE);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_encoding_custom_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_encoding_custom_set_func.cpp
new file mode 100755 (executable)
index 0000000..1fc2823
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_encoding_custom_set : public utc_blink_ewk_base
+{
+public:
+  static const char* encoding_;
+};
+
+const char* utc_blink_ewk_view_encoding_custom_set::encoding_ = "utf-8";
+
+/**
+* @brief Check whether function works well with correct webview as parameter
+*/
+TEST_F(utc_blink_ewk_view_encoding_custom_set, POS_TEST)
+{
+  ewk_view_encoding_custom_set(GetEwkWebView(), encoding_);
+  SUCCEED();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_encoding_custom_set, NEG_TEST)
+{
+  ewk_view_encoding_custom_set(NULL, encoding_);
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_forward_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_forward_func.cpp
new file mode 100644 (file)
index 0000000..72edf69
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+
+class utc_blink_ewk_view_forward : public utc_blink_ewk_base {
+protected:
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  static const char * const SAMPLE_HTML_FILE;
+  static const char * const SAMPLE_1_HTML_FILE;
+};
+
+const char * const utc_blink_ewk_view_forward::SAMPLE_HTML_FILE = "/common/sample.html";
+const char * const utc_blink_ewk_view_forward::SAMPLE_1_HTML_FILE = "/common/sample_1.html";
+
+/**
+* @brief Check whether it is possible to go forward when two pages are loaded and back is done
+*/
+TEST_F(utc_blink_ewk_view_forward, POS_TEST)
+{
+  if (!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str())) {
+    FAIL();
+  }
+  if (utc_blink_ewk_base::Success != EventLoopStart()) {
+    FAIL();
+  }
+
+  if (!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_1_HTML_FILE).c_str())) {
+    FAIL();
+  }
+  if (utc_blink_ewk_base::Success != EventLoopStart()) {
+    FAIL();
+  }
+
+  Eina_Bool backResult = ewk_view_back(GetEwkWebView());
+  if (utc_blink_ewk_base::Success != EventLoopStart()) {
+    FAIL();
+  }
+
+  const char* currentUrl = ewk_view_url_get(GetEwkWebView());
+  EXPECT_STREQ(currentUrl, GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+
+  Eina_Bool forwardResult = ewk_view_forward(GetEwkWebView());
+  if (utc_blink_ewk_base::Success != EventLoopStart()) {
+    FAIL();
+  }
+
+  EXPECT_EQ(forwardResult, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_forward, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_forward(NULL);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_forward_possible_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_forward_possible_func.cpp
new file mode 100755 (executable)
index 0000000..a57004f
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_forward_possible_func : public utc_blink_ewk_base
+{
+protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Check whether it is possible to go forward when no webpage is loaded
+ */
+TEST_F(utc_blink_ewk_view_forward_possible_func, WithoutLoad)
+{
+  EXPECT_FALSE(ewk_view_forward_possible(GetEwkWebView()));
+}
+
+/**
+ * @brief Change whether it is possible to go forward without go back
+ */
+TEST_F(utc_blink_ewk_view_forward_possible_func, WithoutBack)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  EXPECT_FALSE(ewk_view_forward_possible(GetEwkWebView()));
+}
+
+/**
+ * @brief Change whether it is possible to go forward after go back
+ */
+TEST_F(utc_blink_ewk_view_forward_possible_func, AfterBack)
+{
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample_1.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ASSERT_TRUE(ewk_view_back(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  EXPECT_TRUE(ewk_view_forward_possible(GetEwkWebView()));
+}
+
+/**
+ * @brief Checking return value in case invalid argument.
+ */
+TEST_F(utc_blink_ewk_view_forward_possible_func, InvalidArg)
+{
+  EXPECT_FALSE(ewk_view_forward_possible(NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_fullscreen_exit_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_fullscreen_exit_func.cpp
new file mode 100755 (executable)
index 0000000..e52848d
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_fullscreen_exit : public utc_blink_ewk_base
+{
+};
+
+/**
+ * @brief Checking whether the custom header is added properly.
+ */
+TEST_F(utc_blink_ewk_view_fullscreen_exit, POS_TEST)
+{
+  ewk_view_fullscreen_exit(GetEwkWebView());
+  utc_check_true(true);
+}
+
+TEST_F(utc_blink_ewk_view_fullscreen_exit, NEG_TEST)
+{
+  ewk_view_fullscreen_exit(NULL);
+  utc_check_true(true);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_get_cookies_for_url_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_get_cookies_for_url_func.cpp
new file mode 100644 (file)
index 0000000..df995a1
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include <regex.h>
+
+class utc_blink_ewk_view_get_cookies_for_url : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object* webview) {
+    EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Checking cookie after load page witch cookies
+ */
+TEST_F(utc_blink_ewk_view_get_cookies_for_url, POS_TEST)
+{
+  // http://wp.pl set cookie for each new request with out prompt user
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://wp.pl/"));
+  ASSERT_EQ(Success, EventLoopStart());
+  const char* const url = ewk_view_url_get(GetEwkWebView());
+  ASSERT_TRUE(url);
+  utc_message("url=%s", url);
+  char* cookies = ewk_view_get_cookies_for_url(GetEwkWebView(), url);
+  ASSERT_TRUE(cookies);
+  utc_message("cookies=%s", cookies);
+  regex_t scope;
+  ASSERT_TRUE(0 == regcomp(&scope, "^.*=*.(;.*=*.)*$",1 ));
+  ASSERT_TRUE(0 == regexec(&scope, cookies, 0, 0, 0));
+  regfree(&scope);
+  free(cookies);
+}
+
+/**
+ * @brief Checking cookie after load page without cookies
+ */
+TEST_F(utc_blink_ewk_view_get_cookies_for_url, NEG_TEST1)
+{
+  // Normaly resource have not cookie.
+  // See http://wolfslittlestore.be/2012/08/cookies-on-local-files-in-chrome/
+  // or http://stackoverflow.com/questions/12992494/how-to-read-write-cookies-for-local-file-html-document
+  ASSERT_TRUE(ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  const char* const url = ewk_view_url_get(GetEwkWebView());
+  ASSERT_TRUE(url);
+  utc_message("url=%s", url);
+  ASSERT_TRUE(NULL == ewk_view_get_cookies_for_url(GetEwkWebView(), url));
+}
+
+/**
+ * @brief Checking function works properly in case of invalid parameters.
+ */
+
+TEST_F(utc_blink_ewk_view_get_cookies_for_url, NEG_TEST2)
+{
+  ASSERT_TRUE(NULL == ewk_view_get_cookies_for_url(GetEwkWebView(),NULL));
+  ASSERT_TRUE(NULL == ewk_view_get_cookies_for_url(NULL,"http://samsung.com/"));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_history_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_history_get_func.cpp
new file mode 100644 (file)
index 0000000..2d205d8
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_history_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *) {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const TEST_URL1;
+  static const char* const TEST_URL2;
+  static const char* const TEST_URL3;
+};
+
+const char* const utc_blink_ewk_view_history_get::TEST_URL1 = "ewk_history/page1.html";
+const char* const utc_blink_ewk_view_history_get::TEST_URL2 = "ewk_history/page2.html";
+const char* const utc_blink_ewk_view_history_get::TEST_URL3 = "ewk_history/page3.html";
+
+TEST_F(utc_blink_ewk_view_history_get, POS_TEST)
+{
+  // load 3 pages to get some interesting history
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL1).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle1(ewk_view_title_get(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL2).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle2(ewk_view_title_get(GetEwkWebView()));
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL3).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  std::string expectedTitle3(ewk_view_title_get(GetEwkWebView()));
+
+  // get history
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  // check back & forward count
+  ASSERT_EQ(2, ewk_history_back_list_length_get(history));
+  ASSERT_EQ(0, ewk_history_forward_list_length_get(history));
+
+  // get current item and chack URL and title
+  Ewk_History_Item *item = ewk_history_nth_item_get(history, 0);
+
+  ASSERT_STREQ(GetResourceUrl(TEST_URL3).c_str(), ewk_history_item_uri_get(item));
+  ASSERT_STREQ(expectedTitle3.c_str(), ewk_history_item_title_get(item));
+
+  // free history
+  ewk_history_free(history);
+
+  // go back
+  ASSERT_EQ(EINA_TRUE, ewk_view_back(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  // check back & forward count
+  ASSERT_EQ(1, ewk_history_back_list_length_get(history));
+  ASSERT_EQ(1, ewk_history_forward_list_length_get(history));
+
+  // get current item and chack URL and title
+  item = ewk_history_nth_item_get(history, 0);
+
+  ASSERT_STREQ(GetResourceUrl(TEST_URL2).c_str(), ewk_history_item_uri_get(item));
+  ASSERT_STREQ(expectedTitle2.c_str(), ewk_history_item_title_get(item));
+
+  // get forward item and check URL and title
+  item = ewk_history_nth_item_get(history, 1);
+
+  ASSERT_STREQ(GetResourceUrl(TEST_URL3).c_str(), ewk_history_item_uri_get(item));
+  ASSERT_STREQ(expectedTitle3.c_str(), ewk_history_item_title_get(item));
+
+  // get back item and check URL and title
+  item = ewk_history_nth_item_get(history, -1);
+
+  ASSERT_STREQ(GetResourceUrl(TEST_URL1).c_str(), ewk_history_item_uri_get(item));
+  ASSERT_STREQ(expectedTitle1.c_str(), ewk_history_item_title_get(item));
+
+  // free history
+  ewk_history_free(history);
+
+  // go back
+  ewk_view_back(GetEwkWebView());
+  ASSERT_EQ(Success, EventLoopStart());
+
+  // get history
+  history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+
+  // check back & forward count
+  ASSERT_EQ(0, ewk_history_back_list_length_get(history));
+  ASSERT_EQ(2, ewk_history_forward_list_length_get(history));
+
+  // get current item and chack URL and title
+  item = ewk_history_nth_item_get(history, 0);
+
+  ASSERT_STREQ(GetResourceUrl(TEST_URL1).c_str(), ewk_history_item_uri_get(item));
+  ASSERT_STREQ(expectedTitle1.c_str(), ewk_history_item_title_get(item));
+
+  // free history
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_view_history_get, EMPTY_TEST)
+{
+  Ewk_History *history = ewk_view_history_get(GetEwkWebView());
+  ASSERT_TRUE(history);
+  ASSERT_EQ(0, ewk_history_back_list_length_get(history));
+  ASSERT_EQ(0, ewk_history_forward_list_length_get(history));
+
+  // free history
+  ewk_history_free(history);
+}
+
+TEST_F(utc_blink_ewk_view_history_get, NULL_TEST)
+{
+  Ewk_History *history = ewk_view_history_get(NULL);
+  ASSERT_FALSE(history);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_hit_test_new_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_hit_test_new_func.cpp
new file mode 100755 (executable)
index 0000000..e846fdc
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_hit_test_new: public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+      EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  static const char*const url;
+};
+
+const char*const utc_blink_ewk_view_hit_test_new::url="http://m.naver.com";
+
+/**
+ * @brief Checking whether hit test instance is created properly by hit test mode.
+ */
+TEST_F(utc_blink_ewk_view_hit_test_new, POS_TEST1)
+{
+  if (!ewk_view_url_set(GetEwkWebView(), url))
+    utc_fail();
+
+  if (utc_blink_ewk_base::Success != EventLoopStart())
+    utc_fail();
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_DEFAULT);
+  if (!hit_test)
+    utc_fail();
+  ewk_hit_test_free(hit_test);
+
+  hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_NODE_DATA);
+  if (!hit_test)
+    utc_fail();
+  ewk_hit_test_free(hit_test);
+
+  hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  if (!hit_test)
+    utc_fail();
+  ewk_hit_test_free(hit_test);
+
+  hit_test = ewk_view_hit_test_new(GetEwkWebView(), 200, 200, EWK_HIT_TEST_MODE_ALL);
+  if (!hit_test)
+    utc_fail();
+  ewk_hit_test_free(hit_test);
+
+  utc_pass();
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_hit_test_new, NEG_TEST1)
+{
+  Eina_Bool result = EINA_TRUE;
+
+  Ewk_Hit_Test* hit_test = ewk_view_hit_test_new(NULL, 200, 200, EWK_HIT_TEST_MODE_DEFAULT);
+  if (hit_test) {
+    ewk_hit_test_free(hit_test);
+    utc_fail();
+  }
+
+  hit_test = ewk_view_hit_test_new(NULL, 200, 200, EWK_HIT_TEST_MODE_NODE_DATA);
+  if (hit_test) {
+    ewk_hit_test_free(hit_test);
+    utc_fail();
+  }
+
+  hit_test = ewk_view_hit_test_new(NULL, 200, 200, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  if (hit_test) {
+    ewk_hit_test_free(hit_test);
+    utc_fail();
+  }
+
+  hit_test = ewk_view_hit_test_new(NULL, 200, 200, EWK_HIT_TEST_MODE_ALL);
+  if (hit_test) {
+    ewk_hit_test_free(hit_test);
+    utc_fail();
+  }
+
+  utc_check_eq(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_hit_test_request_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_hit_test_request_func.cpp
new file mode 100755 (executable)
index 0000000..f94961b
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_hit_test_request: public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_view_hit_test_request()
+    : req_x(-1)
+    , req_y(-1)
+    , req_mode(-1)
+  {
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+      EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static void hit_test_result(Evas_Object* o, int x, int y, int mode, Ewk_Hit_Test* hit_test, void* user_data)
+  {
+    utc_message("I'm here");
+    utc_blink_ewk_view_hit_test_request* owner = NULL;
+    OwnerFromVoid(user_data, &owner);
+    ASSERT_TRUE(owner);
+
+    EXPECT_EQ(owner->req_x, x);
+    EXPECT_EQ(owner->req_y, y);
+    EXPECT_EQ(owner->req_mode, mode);
+    EXPECT_TRUE(hit_test);
+    owner->EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), url));
+    ASSERT_EQ(Success, EventLoopStart());
+  }
+
+  void StartHitTest(int x, int y, int mode)
+  {
+    req_x = x;
+    req_y = y;
+    req_mode = mode;
+
+    ASSERT_EQ(EINA_TRUE, ewk_view_hit_test_request(GetEwkWebView(), req_x, req_y, req_mode, hit_test_result, this));
+    ASSERT_EQ(Success, EventLoopStart());
+  }
+
+protected:
+  static const char*const url;
+  int req_x;
+  int req_y;
+  int req_mode;
+};
+
+const char*const utc_blink_ewk_view_hit_test_request::url="http://m.naver.com";
+
+/**
+ * @brief Checking whether hit test instance is created properly by hit test mode.
+ */
+TEST_F(utc_blink_ewk_view_hit_test_request, POS_TEST1)
+{
+  StartHitTest(100, 150, EWK_HIT_TEST_MODE_DEFAULT);
+  StartHitTest(120, 170, EWK_HIT_TEST_MODE_NODE_DATA);
+  StartHitTest(140, 190, EWK_HIT_TEST_MODE_IMAGE_DATA);
+  StartHitTest(160, 210, EWK_HIT_TEST_MODE_ALL);
+  StartHitTest(180, 230, EWK_HIT_TEST_MODE_IMAGE_DATA|EWK_HIT_TEST_MODE_NODE_DATA);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_hit_test_request, NEG_TEST1)
+{
+  EXPECT_EQ(EINA_FALSE, ewk_view_hit_test_request(NULL, 100, 150, EWK_HIT_TEST_MODE_DEFAULT, hit_test_result, this));
+  EXPECT_EQ(EINA_FALSE, ewk_view_hit_test_request(NULL, 120, 170, EWK_HIT_TEST_MODE_NODE_DATA, hit_test_result, this));
+  EXPECT_EQ(EINA_FALSE, ewk_view_hit_test_request(NULL, 140, 190, EWK_HIT_TEST_MODE_IMAGE_DATA, hit_test_result, this));
+  EXPECT_EQ(EINA_FALSE, ewk_view_hit_test_request(NULL, 160, 210, EWK_HIT_TEST_MODE_ALL, hit_test_result, this));
+  EXPECT_EQ(EINA_FALSE, ewk_view_hit_test_request(NULL, 180, 230, EWK_HIT_TEST_MODE_IMAGE_DATA|EWK_HIT_TEST_MODE_NODE_DATA, hit_test_result, this));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_html_contents_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_html_contents_set_func.cpp
new file mode 100755 (executable)
index 0000000..e9c8b6e
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+
+class utc_blink_ewk_view_html_contents_set : public utc_blink_ewk_base
+{
+protected:
+  static const char* const htmlstr;
+  static const char* const urlstr;
+};
+
+const char* const utc_blink_ewk_view_html_contents_set::htmlstr = "<html><body><div style=\"color:#ff0000\"> this is a test message.</div></body</html>";
+const char* const utc_blink_ewk_view_html_contents_set::urlstr = "http://www.google.com";
+
+/**
+ * @brief Positive test case of ewk_view_html_contents_set()
+ */
+TEST_F(utc_blink_ewk_view_html_contents_set, POS_TEST1)
+{
+  Eina_Bool result = ewk_view_html_contents_set(GetEwkWebView(),htmlstr,urlstr);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Positive test case of ewk_view_html_contents_set()
+ */
+TEST_F(utc_blink_ewk_view_html_contents_set, POS_TEST2)
+{
+  Eina_Bool result = ewk_view_html_contents_set(GetEwkWebView(),NULL,urlstr);
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+ * @brief Positive test case of ewk_view_html_contents_set()
+ */
+TEST_F(utc_blink_ewk_view_html_contents_set, POS_TEST3)
+{
+  Eina_Bool result = ewk_view_html_contents_set(GetEwkWebView(),htmlstr,NULL);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+
+/**
+ * @brief Negative test case of ewk_view_html_contents_set()
+ */
+
+TEST_F(utc_blink_ewk_view_html_contents_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_html_contents_set(NULL,htmlstr,urlstr);
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_inspector_server_stop_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_inspector_server_stop_func.cpp
new file mode 100644 (file)
index 0000000..4922cad
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_inspector_server_stop : public utc_blink_ewk_base
+{
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+};
+
+/* @brief Positive test case of ewk_view_inspector_server_stop */
+TEST_F(utc_blink_ewk_view_inspector_server_stop, StartStop)
+{
+  ASSERT_EQ(11111, ewk_view_inspector_server_start(GetEwkWebView(), 11111));
+  EventLoopWait(1);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://localhost:11111"));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_inspector_server_stop(GetEwkWebView()));
+  EventLoopWait(1);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), "http://localhost:11111"));
+  ASSERT_EQ(Failure, EventLoopStart());
+
+  /* Checking if server can be started, to make sure that was stopped successfully. */
+  ASSERT_NE(0, ewk_view_inspector_server_start(GetEwkWebView(), 0));
+  EventLoopWait(1);
+  EXPECT_EQ(EINA_TRUE, ewk_view_inspector_server_stop(GetEwkWebView()));
+}
+
+/* @brief Negative test case of ewk_view_inspector_server_stop */
+TEST_F(utc_blink_ewk_view_inspector_server_stop, StopWithoutStart)
+{
+  EXPECT_NE(EINA_TRUE, ewk_view_inspector_server_stop(GetEwkWebView()));
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_javascript_confirm_reply_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_javascript_confirm_reply_func.cpp
new file mode 100755 (executable)
index 0000000..1630cd7
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_javascript_confirm_reply : public utc_blink_ewk_base
+{
+ protected:
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  /* Callback for script confirm */
+  static Eina_Bool confirmCallback(Evas_Object* webview, const char* message, void* data)
+  {
+    Eina_Bool result = EINA_TRUE;
+    ewk_view_javascript_confirm_reply(webview, result);
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_javascript_confirm_reply()
+ * ewk_view_javascript_confirm_reply() should be performed without any problem.
+ */
+TEST_F(utc_blink_ewk_view_javascript_confirm_reply, POS_TEST)
+{
+  ewk_view_javascript_confirm_callback_set(GetEwkWebView(), confirmCallback, this);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl("ewk_view/confirm_test.html").c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  const char* title = ewk_view_title_get(GetEwkWebView());
+  const char* expected = "You pressed OK!";
+
+  EXPECT_STREQ(expected, title);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_javascript_confirm_reply, NEG_TEST)
+{
+  ewk_view_javascript_confirm_reply(NULL, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_load_progress_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_load_progress_get_func.cpp
new file mode 100644 (file)
index 0000000..aea49a1
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_load_progress_get : public utc_blink_ewk_base {
+protected:
+
+  void LoadProgress(Evas_Object* webview, double progress)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+protected:
+  static const char * const SAMPLE_HTML_FILE;
+  static const double cProgressComplete;
+  static const double cInvlaidLoad;
+};
+
+const char * const utc_blink_ewk_view_load_progress_get::SAMPLE_HTML_FILE = "/common/sample.html";
+const double utc_blink_ewk_view_load_progress_get::cProgressComplete = 1.0;
+const double utc_blink_ewk_view_load_progress_get::cInvlaidLoad = -1.0;
+
+/**
+  * @brief Tests if returns TRUE when initiated with a correct context without a page load.
+  */
+TEST_F(utc_blink_ewk_view_load_progress_get, POS_TEST1)
+{
+  Eina_Bool result = EINA_FALSE;
+  double value = ewk_view_load_progress_get(GetEwkWebView());
+  if (value == 0) {
+    result = EINA_TRUE;
+  }
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWebView());
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+  * @brief Tests if returns TRUE when not initiated with correct context with a valid page load.
+  */
+TEST_F(utc_blink_ewk_view_load_progress_get, POS_TEST2)
+{
+  ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success) {
+    FAIL();
+  }
+
+  Eina_Bool result = EINA_FALSE;
+  double value = ewk_view_load_progress_get(GetEwkWebView());
+  if (value <= cProgressComplete) {
+    result = EINA_TRUE;
+  }
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWebView());
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+  * @brief Tests if returns FALSE when not initiated with NULL context.
+  */
+TEST_F(utc_blink_ewk_view_load_progress_get, NEG_TEST)
+{
+  Eina_Bool result = EINA_FALSE;
+  double value = ewk_view_load_progress_get(NULL);
+  if (value == cInvlaidLoad) {
+     result = EINA_TRUE;
+  }
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWebView());
+  EXPECT_EQ(result, EINA_TRUE);
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_mhtml_data_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_mhtml_data_get_func.cpp
new file mode 100755 (executable)
index 0000000..7bd524b
--- /dev/null
@@ -0,0 +1,50 @@
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_mhtml_data_get : public utc_blink_ewk_base
+{
+protected:
+
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void mhtmlDataGetCallback(Evas_Object *o, const char *data, void *user_data)
+  {
+    ASSERT_TRUE(user_data != NULL);
+    ASSERT_TRUE(data != NULL);
+    utc_blink_ewk_view_mhtml_data_get*const owner = static_cast<utc_blink_ewk_view_mhtml_data_get*>(user_data);
+    bool const notEmpty = strlen(data);
+    owner->EventLoopStop(notEmpty ? Success : Failure);
+    if (notEmpty)
+      utc_message("MHTML:\t\"%s\"", data);
+  }
+};
+
+/**
+ * @brief Tests if returns true when the mhtml data obtained properly.
+ */
+TEST_F(utc_blink_ewk_view_mhtml_data_get, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_html_string_load(GetEwkWebView(), "<p>Simple HTML</p>", 0, 0));
+  // Wait until load finished.
+  ASSERT_EQ(EventLoopStart(), Success);
+
+  ASSERT_TRUE(ewk_view_mhtml_data_get(GetEwkWebView(), mhtmlDataGetCallback, this));
+  // Wait until convert data.
+  EXPECT_EQ(EventLoopStart(), Success);
+}
+
+/**
+ * @brief Tests if returns false when the callback function is NULL or view is NULL.
+ */
+TEST_F(utc_blink_ewk_view_mhtml_data_get, NEG_TEST)
+{
+  ASSERT_TRUE(ewk_view_html_string_load(GetEwkWebView(), "<p>Simple HTML</p>", 0, 0));
+  // Wait until load finished.
+  ASSERT_EQ(EventLoopStart(), Success);
+
+  EXPECT_FALSE(ewk_view_mhtml_data_get(GetEwkWebView(), NULL, this));
+  EXPECT_FALSE(ewk_view_mhtml_data_get(NULL, mhtmlDataGetCallback, this));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_notification_closed_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_notification_closed_func.cpp
new file mode 100755 (executable)
index 0000000..0bf7898
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_notification_closed : public utc_blink_ewk_base
+{
+ protected:
+  /* Callback for "notification,permission,request" */
+  static void notificationPermissionRequest(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationPermissionRequest] :: \n");
+    if (!event_info)
+        utc_fail();
+    //allow the notification
+    ewk_notification_permission_request_set(static_cast<Ewk_Notification_Permission_Request*>(event_info), EINA_TRUE);
+  }
+
+  /* Callback for "notification,show" */
+  static void notificationShow(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[notificationShow] :: \n");
+    if(!data)
+      utc_fail();
+    utc_blink_ewk_notification_closed* owner=static_cast<utc_blink_ewk_notification_closed*>(data);
+
+    Ewk_Context* context = ewk_view_context_get(webview);
+    if (!event_info || !context)
+      utc_fail();
+
+    owner->old_notification = static_cast<Ewk_Notification*>(event_info);
+    uint64_t notification_id = ewk_notification_id_get(owner->old_notification);
+    ewk_notification_showed(context, notification_id);
+    owner->EventLoopStop(Success);
+  }
+
+  /* Startup function */
+  void PostSetUp()
+  {
+    old_notification=0;
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest, this);
+    evas_object_smart_callback_add(GetEwkWebView(), "notification,show", notificationShow, this);
+  }
+
+  /* Cleanup function */
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,permission,request", notificationPermissionRequest);
+    evas_object_smart_callback_del(GetEwkWebView(), "notification,show", notificationShow);
+  }
+
+protected:
+  static const char*const sample;
+  Ewk_Notification* old_notification;
+};
+
+const char*const utc_blink_ewk_notification_closed::sample="common/sample_notification_1.html";
+
+/**
+* @brief Positive test case for ewk_notification_showed()
+*/
+TEST_F(utc_blink_ewk_notification_closed, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(sample).c_str()))
+    utc_fail();
+
+  if(!EventLoopStart())
+     utc_fail();
+
+  Eina_List *list = NULL;
+  list =  eina_list_append(list, old_notification);
+  ewk_view_notification_closed(GetEwkWebView(), list);
+  utc_pass();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL value pass
+*/
+TEST_F(utc_blink_ewk_notification_closed, NEG_TEST)
+{
+  ewk_notification_showed(NULL, 0);
+  /* If NULL argument passing won't give segmentation fault negative test case will pass */
+  utc_pass();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_orientation_lock_callback_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_orientation_lock_callback_set_func.cpp
new file mode 100755 (executable)
index 0000000..6177dce
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_orientation_lock_callback_set : public utc_blink_ewk_base
+{
+protected:
+  //This function will be invoked when orientation has to be locked or unlocked
+  //The API for orientation lock and unlock has not been implemented yet.
+  static Eina_Bool lockCallback(Evas_Object* o, Eina_Bool need_lock, int orientation, void* user_data)
+  {
+  }
+};
+
+/**
+* @brief Tests if EINA_SAFETY check fails if view object is NULL
+*/
+TEST_F(utc_blink_ewk_view_orientation_lock_callback_set, NEG_TEST1)
+{
+  ewk_view_orientation_lock_callback_set(NULL, lockCallback, this);
+}
+
+/**
+* @brief Tests if EINA_SAFETY check fails if callback is NULL
+*/
+TEST_F(utc_blink_ewk_view_orientation_lock_callback_set, NEG_TEST2)
+{
+  ewk_view_orientation_lock_callback_set(GetEwkWebView(), NULL, this);
+}
+
+/**
+* @brief Tests if ewk_view_orientation_lock_callback_set is called without any error
+*/
+TEST_F(utc_blink_ewk_view_orientation_lock_callback_set, POS_TEST)
+{
+  ewk_view_orientation_lock_callback_set(GetEwkWebView(), lockCallback, this);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_orientation_send_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_orientation_send_func.cpp
new file mode 100755 (executable)
index 0000000..01a9506
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_orientation_send : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_view_orientation_send()
+    : utc_blink_ewk_base()
+    , g_orientation(-1)
+  {
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success);
+  }
+
+  static Eina_Bool alert_callback(Evas_Object* webview ,const char* alert_text, void* user_data)
+  {
+    if (user_data) {
+      utc_blink_ewk_view_orientation_send* owner = NULL;
+      OwnerFromVoid(user_data, &owner);
+
+      long int orientation = strtol(alert_text, NULL, 10);
+      // TODO: check errno
+
+      fprintf(stderr,"[alert_callback] :: %ld\n", orientation);
+      switch (orientation) {
+      case -90:
+      case 0:
+      case 90:
+      case 180:
+        owner->g_orientation = orientation;
+        break;
+      }
+
+      owner->EventLoopStop(Success);
+      utc_message("[alert_callback] :: going out");
+    }
+
+    // behave like dialog was closed
+    return EINA_FALSE;
+  }
+
+  /* Startup function */
+  void PostSetUp()
+  {
+    ewk_view_javascript_alert_callback_set(GetEwkWebView(), alert_callback, this);
+
+    // All TCs require same page to load
+    std::string full_path = GetResourceUrl("ewk_view/orientation_test.html");
+    ASSERT_FALSE(full_path.empty());
+    ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), full_path.c_str()));
+    ASSERT_EQ(Success, EventLoopStart());
+  }
+
+protected:
+  long int g_orientation;
+};
+
+/**
+ * @brief Checking whether orientation is set to 90 properly.
+ */
+TEST_F(utc_blink_ewk_view_orientation_send, TEST_90DG)
+{
+  utc_message("[utc_blink_ewk_view_orientation_send TEST_90DG] :: ewk_view_orientation_send");
+  ewk_view_orientation_send(GetEwkWebView(), 90);
+
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(g_orientation, 90);
+}
+
+/**
+ * @brief Checking whether orientation is set to 180 properly.
+ */
+TEST_F(utc_blink_ewk_view_orientation_send, TEST_180DG)
+{
+  utc_message("[utc_blink_ewk_view_orientation_send TEST_180DG] :: ewk_view_orientation_send");
+  ewk_view_orientation_send(GetEwkWebView(), 180);
+
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(g_orientation, 180);
+}
+
+/**
+ * @brief Checking whether orientation is set to 0 properly.
+ */
+TEST_F(utc_blink_ewk_view_orientation_send, TEST_0DG)
+{
+  utc_message("[utc_blink_ewk_view_orientation_send TEST_0DG] :: ewk_view_orientation_send");
+  ewk_view_orientation_send(GetEwkWebView(), 0);
+
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(g_orientation, 0);
+}
+
+/**
+ * @brief Checking whether orientation is set to -90 properly.
+ */
+TEST_F(utc_blink_ewk_view_orientation_send, TEST_MINUS90DG)
+{
+  utc_message("[utc_blink_ewk_view_orientation_send TEST_MINUS90DG] :: ewk_view_orientation_send");
+  ewk_view_orientation_send(GetEwkWebView(), -90);
+
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(g_orientation, -90);
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_orientation_send, INVALID_ARGS)
+{
+  ewk_view_orientation_send(NULL, EWK_SCREEN_ORIENTATION_PORTRAIT_PRIMARY);
+  EXPECT_EQ(Failure, EventLoopStart(5.0));
+
+  ewk_view_orientation_send(GetEwkWebView(), 22);
+  EXPECT_EQ(Failure, EventLoopStart(5.0));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_page_visibility_state_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_page_visibility_state_set_func.cpp
new file mode 100755 (executable)
index 0000000..e092dfa
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_page_visibility_state_set : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_view_page_visibility_state_set, POS_TEST1)
+{
+  Ewk_Page_Visibility_State test_state = EWK_PAGE_VISIBILITY_STATE_HIDDEN;
+  Eina_Bool result = ewk_view_page_visibility_state_set(GetEwkWebView(), test_state, EINA_TRUE);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+TEST_F(utc_blink_ewk_view_page_visibility_state_set, POS_TEST2)
+{
+  Ewk_Page_Visibility_State test_state = EWK_PAGE_VISIBILITY_STATE_VISIBLE;
+  Eina_Bool result = ewk_view_page_visibility_state_set(GetEwkWebView(), test_state, EINA_FALSE);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+TEST_F(utc_blink_ewk_view_page_visibility_state_set, NEG_TEST)
+{
+  Ewk_Page_Visibility_State test_state = EWK_PAGE_VISIBILITY_STATE_HIDDEN;
+  Eina_Bool result = ewk_view_page_visibility_state_set(NULL, test_state, EINA_FALSE);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_plain_text_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_plain_text_get_func.cpp
new file mode 100755 (executable)
index 0000000..8749ebf
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_plain_text_get : public utc_blink_ewk_base
+{
+ protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  /* Ewk_View_Plain_Text_Get_Callback to get the text */
+  static void getPlainTextFinished(Evas_Object* webview, const char* plain_text, void* data)
+  {
+    if(!data)
+      utc_fail();
+    utc_blink_ewk_view_plain_text_get*owner=static_cast<utc_blink_ewk_view_plain_text_get*>(data);
+    utc_message("[getPlainTextFinished] ::");
+    owner->EventLoopStop(Success);
+    if(!plain_text)
+      utc_fail();
+  }
+
+protected:
+  static const char*const sample;
+};
+
+const char*const utc_blink_ewk_view_plain_text_get::sample="common/sample.html";
+
+/**
+* @brief Positive test case of ewk_view_plain_text_get(). Page is loaded, API is called and text is returned in corresponding callback.
+*/
+TEST_F(utc_blink_ewk_view_plain_text_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(sample).c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+  Eina_Bool result = ewk_view_plain_text_get(GetEwkWebView(), getPlainTextFinished, this);
+  if(Success!=EventLoopStart())
+    utc_fail();
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_plain_text_get, NEG_TEST1)
+{
+  Eina_Bool result = ewk_view_plain_text_get(NULL, getPlainTextFinished, NULL);
+  utc_check_eq(result, EINA_FALSE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a callback.
+*/
+TEST_F(utc_blink_ewk_view_plain_text_get, NEG_TEST2)
+{
+  Eina_Bool result = ewk_view_plain_text_get(GetEwkWebView(), NULL, NULL);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_callback_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_callback_set_func.cpp
new file mode 100644 (file)
index 0000000..a489991
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_view_quota_permission_request_callback_set : public utc_blink_ewk_base
+{
+protected:
+
+  static void quotaPermission(Evas_Object*,
+                              const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_view_quota_permission_request_callback_set* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    EXPECT_TRUE(request);
+    ewk_view_quota_permission_request_cancel(request);
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Positive  test case of ewk_view_quota_permission_request_callback_set()
+ * ewk_view_quota_permission_request_callback should be set if the page content triggers a request callback
+ */
+TEST_F(utc_blink_ewk_view_quota_permission_request_callback_set, POS_TEST)
+{
+  /*
+   * Because we cannot predict when quota permission callback is called
+   * (can be called after LoadFinish event!) a timeout is required.
+   * Callback is pure asynchronous.
+   */
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart(10));
+
+  ewk_view_quota_permission_request_callback_set(GetEwkWebView(), NULL, NULL);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Failure, EventLoopStart(10));
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview and callback.
+*/
+TEST_F(utc_blink_ewk_view_quota_permission_request_callback_set, NEG_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(NULL, NULL, NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_cancel_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_cancel_func.cpp
new file mode 100644 (file)
index 0000000..e5c2e18
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_view_quota_permission_request_cancel : public utc_blink_ewk_base
+{
+protected:
+
+  void PostSetUp()
+  {
+    isTitleNull = true;
+    title = "";
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed",
+                                   ToSmartCallback(title_changed), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed",
+                                   ToSmartCallback(title_changed));
+  }
+
+  static void quotaPermission(Evas_Object*, const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_view_quota_permission_request_cancel* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    if (!request) {
+      ASSERT_TRUE(owner);
+      owner->EventLoopStop(Failure);
+      return;
+    }
+    ewk_view_quota_permission_request_cancel(request);
+  }
+
+  static void title_changed(utc_blink_ewk_view_quota_permission_request_cancel* owner,
+                            Evas_Object*, const char* title){
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    if (!title) {
+      owner->isTitleNull = true;
+      owner->title = "";
+      owner->EventLoopStop(Failure);
+      return;
+    }
+    owner->isTitleNull = false;
+    owner->title = title;
+    // Ignore initial title
+    if (owner->title != "No reply yet")
+      owner->EventLoopStop(Success);
+  }
+
+protected:
+  bool isTitleNull;
+  std::string title;
+};
+
+/**
+ * @brief Positive  test case of ewk_view_quota_permission_request_cancel()
+ * ewk_view_quota_permission_request_callback should be set if the page content triggers a request callback
+ */
+TEST_F(utc_blink_ewk_view_quota_permission_request_cancel, POS_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_FALSE(isTitleNull);
+  ASSERT_STREQ("0", title.c_str());
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview and callback.
+*/
+TEST_F(utc_blink_ewk_view_quota_permission_request_cancel, NEG_TEST)
+{
+  ewk_view_quota_permission_request_cancel(NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_reply_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_quota_permission_request_reply_func.cpp
new file mode 100644 (file)
index 0000000..d5c4a61
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE        ("/ewk_view/quota_ask.html")
+
+
+class utc_blink_ewk_view_quota_permission_request_reply : public utc_blink_ewk_base
+{
+protected:
+
+  void PreSetUp()
+  {
+    isTitleNull = true;
+    title = "";
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed",
+                                   ToSmartCallback(title_changed), this);
+  }
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed",
+                                   ToSmartCallback(title_changed));
+  }
+
+  static void quotaPermission(Evas_Object*, const Ewk_Quota_Permission_Request* request,
+                              utc_blink_ewk_view_quota_permission_request_reply* owner)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    if (!request)
+    {
+      ASSERT_TRUE(owner);
+      owner->EventLoopStop(Failure);
+      return;
+    }
+    ewk_view_quota_permission_request_reply(request, EINA_FALSE);
+  }
+
+  static void title_changed(utc_blink_ewk_view_quota_permission_request_reply* owner,
+                            Evas_Object*, const char* title)
+  {
+    utc_message("[ %s ]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    if (!title)
+    {
+      owner->isTitleNull = true;
+      owner->title = "";
+      owner->EventLoopStop(Failure);
+      return;
+    }
+    owner->isTitleNull = false;
+    owner->title = title;
+    // Ignore initial title
+    if (owner->title != "No reply yet")
+      owner->EventLoopStop(Success);
+  }
+
+protected:
+  bool isTitleNull;
+  std::string title;
+};
+
+/**
+ * @brief Positive  test case of ewk_view_quota_permission_request_reply()
+ * ewk_view_quota_permission_request_callback should be set if the page content triggers a request callback
+ */
+TEST_F(utc_blink_ewk_view_quota_permission_request_reply, POS_TEST)
+{
+  ewk_view_quota_permission_request_callback_set(
+                           GetEwkWebView(),
+                           reinterpret_cast<Ewk_Quota_Permission_Request_Callback>(quotaPermission),
+                           this);
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),
+                                        GetResourceUrl(SAMPLE_HTML_FILE).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_STREQ("0", title.c_str());
+}
+
+/**
+  * Test case with ewk_view_quota_permission_request_reply(request, EINA_TRUE)
+  * is not possible because file protocol doesn't support quota for storage.
+  * However engine asks for quota permission in case of file protocol
+  * but in case of EINA_TRUE engine responds in HTML page with error callback.
+  * We cannot determine if error was due to file protocol or internal error.
+  */
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview and callback.
+*/
+TEST_F(utc_blink_ewk_view_quota_permission_request_reply, NEG_TEST)
+{
+  ewk_view_quota_permission_request_reply(NULL, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_reload_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_reload_func.cpp
new file mode 100755 (executable)
index 0000000..3c2a1e8
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_reload : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char*const sample;
+};
+
+const char*const utc_blink_ewk_view_reload::sample="common/sample.html";
+
+/**
+ * @brief Tests if returns TRUE when not initiated with correct context with a valid page load.
+ */
+TEST_F(utc_blink_ewk_view_reload, POS_TEST)
+{
+  Eina_Bool loadResult = EINA_FALSE;
+  Eina_Bool result= EINA_FALSE;
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(sample).c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  loadResult= ewk_view_reload(GetEwkWebView());
+
+  if (loadResult == EINA_TRUE)
+    result = EINA_TRUE;
+
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Tests if returns FALSE when not initiated with NULL context.
+ */
+TEST_F(utc_blink_ewk_view_reload, NEG_TEST)
+{
+  Eina_Bool loadResult = EINA_FALSE;
+  Eina_Bool result= EINA_FALSE;
+  loadResult= ewk_view_reload(NULL);
+  if (loadResult == EINA_TRUE)
+    result = EINA_TRUE;
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+  utc_check_ne(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_resume_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_resume_func.cpp
new file mode 100755 (executable)
index 0000000..58f9919
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_resume : public utc_blink_ewk_base
+{
+protected:
+  enum RunPhase {
+    PageLoadStart,
+    PageSuspended,
+    PageResumed
+  };
+
+protected:
+  utc_blink_ewk_view_resume()
+    : phase(PageLoadStart)
+  {
+  }
+
+  /* Callback for quitting main loop */
+  void LoadProgress(Evas_Object* webview, double pr)
+  {
+    // Page started to load, after that we want to suspend right after
+    if (phase == PageLoadStart) {
+      phase = PageSuspended;
+      EventLoopStop(Success);
+    }
+  }
+
+  bool TimeOut()
+  {
+    if (phase == PageSuspended) {
+      phase = PageResumed;
+      EventLoopStop(Success);
+      return true;
+    }
+
+    return false;
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    if (phase == PageResumed) {
+      EventLoopStop(Success);
+    } else {
+      EventLoopStop(Failure);
+    }
+  }
+
+protected:
+  RunPhase phase;
+};
+
+/**
+ * @brief Positive test case of ewk_view_resume()
+ */
+TEST_F(utc_blink_ewk_view_resume, POS_TEST)
+{
+  if (!ewk_view_url_set(GetEwkWebView(), "http://www.google.pl"))
+    FAIL();
+
+  if (Success != EventLoopStart())
+    FAIL();
+
+  utc_message("Suspend");
+  ewk_view_suspend(GetEwkWebView());
+
+  if (Success != EventLoopStart(5.0)) // Wait few seconds to see if it realy was suspended
+    FAIL();
+
+  utc_message("Resume");
+  ewk_view_resume(GetEwkWebView());
+
+  if (Success != EventLoopStart())
+    FAIL();
+
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
+
+/**
+ * @brief Negative test case of ewk_view_resume()
+ */
+TEST_F(utc_blink_ewk_view_resume, NEG_TEST)
+{
+  // This test is pointless. ewk_view_resume has no return value so we have nothing to test here.
+  ewk_view_resume(NULL);
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scale_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scale_get_func.cpp
new file mode 100755 (executable)
index 0000000..b1602c0
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scale_get : public utc_blink_ewk_base
+{
+ protected:
+
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  /* Function called when timer expires */
+  static Eina_Bool mainLoopQuit(void* data)
+  {
+    if(data)
+      static_cast<utc_blink_ewk_view_scale_get*>(data)->EventLoopStop(Success);
+    return ECORE_CALLBACK_DONE;
+  }
+
+protected:
+  static const char*const sample;
+};
+
+const char*const utc_blink_ewk_view_scale_get::sample="/common/sample.html";
+
+/**
+  * @brief Positive test case of ewk_view_scale_get(). Page is loaded, APIs for setting scale and retrieving its value are called.
+  */
+TEST_F(utc_blink_ewk_view_scale_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(sample).c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  const double scaleFactor = 1.0;
+  const Evas_Coord centerX = 5;
+  const Evas_Coord centerY = 5;
+
+  Eina_Bool result = ewk_view_scale_set(GetEwkWebView(), scaleFactor, centerX, centerY);
+  ecore_timer_add(0.5f, mainLoopQuit, this);
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  const double getScaleFactor = ewk_view_scale_get(GetEwkWebView());
+
+  if (scaleFactor != getScaleFactor)
+    result = EINA_FALSE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+  * @brief Checking whether function works properly in case of NULL of a webview.
+  */
+TEST_F(utc_blink_ewk_view_scale_get, NEG_TEST)
+{
+  const double getScaleFactor = ewk_view_scale_get(NULL);
+  utc_check_eq(getScaleFactor, -1);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scale_range_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scale_range_get_func.cpp
new file mode 100755 (executable)
index 0000000..37c9937
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scale_range_get : public utc_blink_ewk_base
+{
+};
+
+/**
+  * @brief Positive test case of ewk_view_scale_range_get().
+  */
+TEST_F(utc_blink_ewk_view_scale_range_get, POS_TEST)
+{
+  double minimumScale = 0;
+  double maximumScale = 0;
+  Eina_Bool result = EINA_TRUE;
+
+  ewk_view_scale_range_get(GetEwkWebView(), &minimumScale, &maximumScale);
+
+  if ((minimumScale == 0) || (maximumScale == 0))
+    result = EINA_FALSE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+  * @brief Checking whether function works properly in case of NULL of a webview.
+  */
+TEST_F(utc_blink_ewk_view_scale_range_get, NEG_TEST)
+{
+  double minimumScale = -1;
+  double maximumScale = -1;
+  Eina_Bool result = EINA_FALSE;
+
+  ewk_view_scale_range_get(NULL, &minimumScale, &maximumScale);
+
+  if ((minimumScale == -1) && (maximumScale == -1))
+    result = EINA_TRUE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scale_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scale_set_func.cpp
new file mode 100755 (executable)
index 0000000..82ed413
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scale_set : public utc_blink_ewk_base
+{
+ protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  /* Function called when timer expires */
+  static Eina_Bool mainLoopQuit(void* data)
+  {
+    if(data)
+      static_cast<utc_blink_ewk_view_scale_set*>(data)->EventLoopStop(Success);
+    return ECORE_CALLBACK_DONE;
+  }
+
+protected:
+  static const char*const sample;
+};
+
+const char*const utc_blink_ewk_view_scale_set::sample="/common/sample.html";
+
+/**
+  * @brief Positive test case of ewk_view_scale_set(). Page is loaded, APIs for setting scale and retrieving its value are called.
+  */
+  TEST_F(utc_blink_ewk_view_scale_set, POS_TEST)
+  {
+    if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(sample).c_str()))
+      utc_fail();
+    if(Success!=EventLoopStart())
+      utc_fail();
+
+    const double scaleFactor = 1.0;
+    const Evas_Coord centerX = 5;
+    const Evas_Coord centerY = 5;
+
+    Eina_Bool result = ewk_view_scale_set(GetEwkWebView(), scaleFactor, centerX, centerY);
+    ecore_timer_add(0.5f, mainLoopQuit, this);
+    if(Success!=EventLoopStart())
+      utc_fail();
+
+    const double getScaleFactor = ewk_view_scale_get(GetEwkWebView());
+
+    if (scaleFactor != getScaleFactor)
+      result = EINA_FALSE;
+
+    utc_check_eq(result, EINA_TRUE);
+  }
+
+  /**
+  * @brief Checking whether function works properly in case of NULL of a webview.
+  */
+  TEST_F(utc_blink_ewk_view_scale_set, NEG_TEST)
+  {
+    const Eina_Bool result = ewk_view_scale_set(NULL, 1, 0, 0);
+    utc_check_eq(result, EINA_FALSE);
+  }
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_screenshot_contents_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_screenshot_contents_get_func.cpp
new file mode 100755 (executable)
index 0000000..a999d7b
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_screenshot_contents_get : public utc_blink_ewk_base
+{
+ protected:
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char*const url;
+};
+
+const char*const utc_blink_ewk_view_screenshot_contents_get::url="http://www.google.com";
+
+/**
+ * @brief Checking whether the evas image object of the specified viewArea of page is returned.
+ */
+
+TEST_F(utc_blink_ewk_view_screenshot_contents_get, POS_TEST)
+{
+  Eina_Bool url_result = ewk_view_url_set(GetEwkWebView(), url);
+  Eina_Bool result = EINA_FALSE;
+
+  if (!url_result)
+    utc_fail();
+
+  if (Success!=EventLoopStart())
+    utc_fail();
+
+  Eina_Rectangle snapshot_rect;
+  snapshot_rect.x = snapshot_rect.y = 0;
+  evas_object_geometry_get(GetEwkWebView(), NULL, NULL, &snapshot_rect.w, &snapshot_rect.h);
+
+  Evas_Object *webview = ewk_view_screenshot_contents_get(GetEwkWebView(), snapshot_rect, 1.0f, evas_object_evas_get(GetEwkWebView()));
+
+  if (webview)
+    result = EINA_TRUE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Checking whether function works properly in case that webview and canvas object are NULL.
+ */
+TEST_F(utc_blink_ewk_view_screenshot_contents_get, NEG_TEST)
+{
+  Eina_Rectangle snapshot_rect;
+  snapshot_rect.x = snapshot_rect.y = 0;
+  evas_object_geometry_get(GetEwkWebView(), NULL, NULL, &snapshot_rect.w, &snapshot_rect.h);
+
+  utc_check_eq(NULL, ewk_view_screenshot_contents_get(NULL, snapshot_rect, 1.0f, NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_script_execute_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_script_execute_func.cpp
new file mode 100755 (executable)
index 0000000..33f70eb
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_script_execute : public utc_blink_ewk_base
+{
+ protected:
+
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+  /* Callback for script execution */
+  static void scriptExecutionFinished(Evas_Object* webview, const char* result_value, void* data)
+  {
+    utc_message("[scriptExecutionFinished] ::");
+    if(data)
+      static_cast<utc_blink_ewk_view_script_execute*>(data)->EventLoopStop(Success);
+
+    if(strcmp(result_value, "test content"))
+      utc_fail();
+  }
+
+protected:
+  static const char*const sample;
+  static const char*const javaScript;
+};
+
+const char*const utc_blink_ewk_view_script_execute::sample="common/sample.html";
+const char*const utc_blink_ewk_view_script_execute::javaScript="document.getElementById('getParaContent').innerHTML";
+
+/**
+* @brief Positive test case of ewk_view_script_execute(). Script is executed and its corresponding callback should get called.
+*/
+TEST_F(utc_blink_ewk_view_script_execute, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(sample).c_str()))
+     utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  Eina_Bool result = ewk_view_script_execute(GetEwkWebView(), javaScript, scriptExecutionFinished, this);
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_script_execute, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_script_execute(NULL, javaScript, scriptExecutionFinished, this);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_by_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_by_func.cpp
new file mode 100755 (executable)
index 0000000..c38943e
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scroll_by : public utc_blink_ewk_base
+{
+protected:
+  static void scroll_cb(utc_blink_ewk_view_scroll_by* owner, Evas_Object* eObject, void*)
+  {
+    utc_message("[%s]", __PRETTY_FUNCTION__);
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+
+   /* Startup function */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "scroll,right", ToSmartCallback(scroll_cb), this);
+    evas_object_smart_callback_add(GetEwkWebView(), "scroll,left", ToSmartCallback(scroll_cb), this);
+    evas_object_smart_callback_add(GetEwkWebView(), "scroll,up", ToSmartCallback(scroll_cb), this);
+    evas_object_smart_callback_add(GetEwkWebView(), "scroll,down", ToSmartCallback(scroll_cb), this);
+  }
+
+  /* Cleanup function */
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "scroll,right", ToSmartCallback(scroll_cb));
+    evas_object_smart_callback_del(GetEwkWebView(), "scroll,left", ToSmartCallback(scroll_cb));
+    evas_object_smart_callback_del(GetEwkWebView(), "scroll,up", ToSmartCallback(scroll_cb));
+    evas_object_smart_callback_del(GetEwkWebView(), "scroll,down", ToSmartCallback(scroll_cb));
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(Success);
+  }
+
+protected:
+  static const char* const resource;
+};
+
+const char* const utc_blink_ewk_view_scroll_by::resource="/ewk_view/index_big_red_square.html";
+
+/**
+ * @brief Positive test case of ewk_view_scroll_by(),tseting scroll postion against after set, and scroll
+ */
+
+TEST_F(utc_blink_ewk_view_scroll_by, scroll_by_x)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(),GetResourceUrl(resource).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  int offset = 10;
+  int currentX, currentY;
+  ASSERT_EQ(EINA_TRUE, ewk_view_scroll_pos_get(GetEwkWebView(), &currentX, &currentY));
+  ASSERT_EQ(0, currentX);
+  ASSERT_EQ(0, currentY);
+
+  ewk_view_scroll_by(GetEwkWebView(), offset, 0);
+  ASSERT_EQ(Success, EventLoopStart()); // scroll,down smart callback should stop event loop
+  int newX, newY;
+  ASSERT_EQ(EINA_TRUE, ewk_view_scroll_pos_get(GetEwkWebView(), &newX, &newY));
+  ASSERT_EQ(currentY, newY); // shouldn't change
+  ASSERT_EQ(currentX + offset, newX);
+  currentX = newX;
+
+  ewk_view_scroll_by(GetEwkWebView(), 0, offset);
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_scroll_pos_get(GetEwkWebView(), &newX, &newY));
+  ASSERT_EQ(currentX, newX);
+  ASSERT_EQ(currentY + offset, newY);
+  currentY = newY;
+
+  ewk_view_scroll_by(GetEwkWebView(), offset, offset);
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_scroll_pos_get(GetEwkWebView(), &newX, &newY));
+  ASSERT_EQ(currentX + offset, newX);
+  ASSERT_EQ(currentY + offset, newY);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_pos_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_pos_get_func.cpp
new file mode 100755 (executable)
index 0000000..aedf464
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scroll_pos_get : public utc_blink_ewk_base
+{
+ protected:
+  static void frameRendered(void* data, Evas_Object* eObject, void* dataFinished)
+  {
+    utc_message("[frameRendered] :: \n");
+    if(data)
+      static_cast<utc_blink_ewk_view_scroll_pos_get*>(data)->EventLoopStop(Success);
+  }
+
+  /* Startup function */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "frame,rendered", frameRendered, this);
+  }
+
+  /* Cleanup function */
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "frame,rendered", frameRendered);
+  }
+
+protected:
+  static const char*const resource;
+};
+
+const char*const utc_blink_ewk_view_scroll_pos_get::resource="/ewk_view/index_big_red_square.html";
+
+/**
+ * @brief Positive test case of ewk_view_scroll_pos_get(),tseting scroll postion against after set, and scroll
+ */
+TEST_F(utc_blink_ewk_view_scroll_pos_get, POS_TEST1)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(resource).c_str()))
+     utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+  int x = 0, y = 0;
+  const int valScrollSet = 2;
+
+  ewk_view_scroll_set(GetEwkWebView(), valScrollSet, valScrollSet);
+
+  ewk_view_scroll_pos_get(GetEwkWebView(), &x, &y);
+
+  Eina_Bool result = EINA_FALSE;
+  if (x == valScrollSet && y == valScrollSet)
+    result = EINA_TRUE;
+}
+
+/**
+ * @brief Positive test case of ewk_view_scroll_pos_get(),tseting scroll postion against after set, and scroll
+ */
+TEST_F(utc_blink_ewk_view_scroll_pos_get, POS_TEST2)
+{
+  int x = 0, y = 0;
+  const int valScrollSet = -12 ;
+
+  ewk_view_scroll_set(GetEwkWebView(), valScrollSet, valScrollSet);
+
+  ewk_view_scroll_pos_get(GetEwkWebView(), &x, &y);
+
+  Eina_Bool result = EINA_FALSE;
+  if (x == 0 && y == 0)
+    result = EINA_TRUE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Negative test case of ewk_view_scroll_pos_get(), testing for null
+ */
+TEST_F(utc_blink_ewk_view_scroll_pos_get, NEG_TEST)
+{
+  int x,y;
+  Eina_Bool result = ewk_view_scroll_pos_get(NULL, &x, &y);
+  utc_check_eq(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_set_func.cpp
new file mode 100755 (executable)
index 0000000..cffa92b
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scroll_set : public utc_blink_ewk_base
+{
+ protected:
+  static void frameRendered(void* data, Evas_Object* eObject, void* dataFinished)
+  {
+    utc_message("[frameRendered] :: \n");
+    if(data)
+      static_cast<utc_blink_ewk_view_scroll_set*>(data)->EventLoopStop(Success);
+  }
+
+   /* Startup function */
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "frame,rendered", frameRendered, this);
+  }
+
+  /* Cleanup function */
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "frame,rendered", frameRendered);
+  }
+
+protected:
+  static const char*const resource;
+};
+
+const char*const utc_blink_ewk_view_scroll_set::resource="/ewk_view/index_big_red_square.html";
+
+/**
+ * @brief Positive test case of ewk_view_scroll_set(),tseting scroll postion against after set, and scroll
+ */
+
+TEST_F(utc_blink_ewk_view_scroll_set, POS_TEST1)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(resource).c_str()))
+     utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  const int valScrollSet = 2;
+  Eina_Bool result = EINA_FALSE;
+
+  result = ewk_view_scroll_set(GetEwkWebView(), valScrollSet, valScrollSet);
+  utc_check_eq(result, EINA_TRUE);
+}
+
+/**
+ * @brief Positive test case of ewk_view_scroll_set(),tseting scroll postion against after set, and scroll
+ */
+
+TEST_F(utc_blink_ewk_view_scroll_set, POS_TEST2)
+{
+  const int valScrollSet = 2;
+  int x = 0, y = 0;
+  Eina_Bool result = EINA_FALSE;
+  Eina_Bool getCheck = EINA_FALSE;
+  Eina_Bool finalCheck = EINA_FALSE;
+
+  int w=0, h=0;
+  ewk_view_scroll_size_get(GetEwkWebView(), &w, &h);
+
+  result = ewk_view_scroll_set(GetEwkWebView(), valScrollSet, valScrollSet);
+
+  if (result == EINA_TRUE) {
+    getCheck = ewk_view_scroll_pos_get(GetEwkWebView(), &x, &y);
+    utc_check_eq(getCheck, EINA_TRUE);
+  } else {
+    utc_check_eq(result, EINA_TRUE);
+  }
+}
+
+/**
+ * @brief Positive test case of ewk_view_scroll_set(),tseting scroll postion against after set, and scroll
+ */
+
+TEST_F(utc_blink_ewk_view_scroll_set, POS_TEST3)
+{
+  int x = 0, y = 0;
+  const int valScrollSet = -12;
+
+  ewk_view_scroll_set(GetEwkWebView(), valScrollSet, valScrollSet);
+
+  ewk_view_scroll_pos_get(GetEwkWebView(), &x, &y);
+
+  Eina_Bool result = EINA_FALSE;
+  if (x == 0 && y == 0)
+    result = EINA_TRUE;
+
+  utc_check_eq(result, EINA_TRUE);
+}
+
+
+/**
+ * @brief Negative test case of ewk_view_scroll_set(), testing for null
+ */
+TEST_F(utc_blink_ewk_view_scroll_set, NEG_TEST)
+{
+  utc_check_eq(ewk_view_scroll_set(NULL, 1916, 1993), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_size_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_scroll_size_get_func.cpp
new file mode 100755 (executable)
index 0000000..ccfb9b8
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_scroll_size_get : public utc_blink_ewk_base
+{
+ protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "frame,rendered", frameRendered, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "frame,rendered", frameRendered);
+  }
+
+  static void frameRendered(void* data, Evas_Object* eObject, void* dataFinished)
+  {
+    utc_message("[frameRendered] :: \n");
+    if(data)
+      static_cast<utc_blink_ewk_view_scroll_size_get*>(data)->EventLoopStop(Success);
+  }
+
+protected:
+  static const char*const resource;
+};
+
+const char*const utc_blink_ewk_view_scroll_size_get::resource="/ewk_view/index_big_red_square.html";
+
+/**
+ * @brief Positive test case of ewk_view_scroll_size_get(), API should return with true when passing correct arguments.
+ */
+TEST_F(utc_blink_ewk_view_scroll_size_get, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(),GetResourceUrl(resource).c_str()))
+    utc_fail();
+  if(Success!=EventLoopStart())
+    utc_fail();
+
+  int xPossibleScrollArea, yPossibleScrollArea;
+  utc_check_eq(ewk_view_scroll_size_get(GetEwkWebView(), &xPossibleScrollArea, &yPossibleScrollArea), EINA_TRUE);
+}
+
+/**
+  * @brief Negative test case of ewk_view_scroll_size_get(), testing for null.
+  */
+TEST_F(utc_blink_ewk_view_scroll_size_get, NEG_TEST)
+{
+  int xPossibleScrollArea, yPossibleScrollArea;
+  utc_check_eq(ewk_view_scroll_size_get(NULL, &xPossibleScrollArea,&yPossibleScrollArea), EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_session_data_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_session_data_get_func.cpp
new file mode 100755 (executable)
index 0000000..dc7d87c
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_session_data_get_func : public utc_blink_ewk_base
+{
+protected:
+  std::string firstPage;
+  const char *sessionData;
+
+  void PreSetUp()
+  {
+    firstPage = GetResourceUrl("common/sample.html");
+    sessionData = NULL;
+  }
+
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(Success);
+  }
+
+  void PostTearDown()
+  {
+    if (sessionData)
+      free(const_cast<char *>(sessionData));
+  }
+};
+
+
+/**
+ * @brief Tests if returns valid webview when called with correct Evas object.
+ */
+TEST_F(utc_blink_ewk_view_session_data_get_func, POS_TEST)
+{
+  ewk_view_url_set(GetEwkWebView(), firstPage.c_str());
+  EventLoopStart();
+
+  unsigned length = 0;
+  ewk_view_session_data_get(GetEwkWebView(), &sessionData, &length);
+
+  ASSERT_TRUE(sessionData);
+  ASSERT_NE(length, 0);
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL webview object.
+ */
+TEST_F(utc_blink_ewk_view_session_data_get_func, NEG_TEST_NULL_WEBVIEW)
+{
+  ewk_view_url_set(GetEwkWebView(), firstPage.c_str());
+  EventLoopStart();
+
+  const char *data;
+  unsigned length;
+  ewk_view_session_data_get(NULL, &data, &length);
+
+  ASSERT_FALSE(data);
+  ASSERT_EQ(length, 0);
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL data.
+ */
+TEST_F(utc_blink_ewk_view_session_data_get_func, NEG_TEST_NULL_DATA)
+{
+  ewk_view_url_set(GetEwkWebView(), firstPage.c_str());
+  EventLoopStart();
+
+  unsigned length;
+  // Should not crash
+  ewk_view_session_data_get(GetEwkWebView(), NULL, &length);
+}
+
+/**
+ * @brief Tests if returns NULL when called with NULL length.
+ */
+TEST_F(utc_blink_ewk_view_session_data_get_func, NEG_TEST_NULL_LENGTH)
+{
+  ewk_view_url_set(GetEwkWebView(), firstPage.c_str());
+  EventLoopStart();
+
+  const char *data;
+  // Should not crash
+  ewk_view_session_data_get(GetEwkWebView(), &data, NULL);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_settings_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_settings_get_func.cpp
new file mode 100755 (executable)
index 0000000..33c2e02
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_settings_get : public utc_blink_ewk_base {
+
+};
+
+/**
+ * @brief Positive test case of ewk_view_settings_get().
+ */
+TEST_F(utc_blink_ewk_view_settings_get, POS_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(GetEwkWebView());
+  if (!settings)
+    FAIL();
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_view_settings_get, NEG_TEST)
+{
+  Ewk_Settings* settings = ewk_view_settings_get(NULL);
+  if (settings)
+    FAIL();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_stop_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_stop_func.cpp
new file mode 100755 (executable)
index 0000000..ca7baf0
--- /dev/null
@@ -0,0 +1,55 @@
+
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_stop : public utc_blink_ewk_base
+{
+protected:
+
+  static const char* const sample_html_file;
+};
+
+const char* const utc_blink_ewk_view_stop::sample_html_file = "/common/sample.html";
+
+/**
+ * @brief Positive  test case of ewk_view_stop()
+ * ewk_view_stop should return TRUE  as we are stopping the load with a valid url
+ */
+TEST_F(utc_blink_ewk_view_stop, POS_TEST)
+{
+  if (!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(sample_html_file).c_str()))
+    FAIL();
+
+  Eina_Bool result = ewk_view_stop(GetEwkWebView());
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief Negative  test case of ewk_view_stop()
+ * ewk_view_stop should return FALSE as we are stopping the load with NULL
+ */
+TEST_F(utc_blink_ewk_view_stop, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_stop(NULL);
+  EXPECT_EQ(result, EINA_FALSE);
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_suspend_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_suspend_func.cpp
new file mode 100755 (executable)
index 0000000..65d41bf
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_suspend : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_view_suspend(): after_progress(false)
+  {
+  }
+
+  void LoadProgress(Evas_Object* webview, double progress)
+  {
+    if (!after_progress) {
+      // Page started to load, after that we want to suspend it
+      after_progress = true;
+      EventLoopStop(utc_blink_ewk_base::Success);
+    }
+  }
+
+  bool TimeOut()
+  {
+    // If we reached timeout then load,finished (and load,error) was not called
+    // we expect that - this indicates that suspend did work
+    EventLoopStop(utc_blink_ewk_base::Success);
+    return true;
+  }
+
+  void LoadFinished(Evas_Object* webview)
+  {
+    // Load finished should never be called after suspend
+    EventLoopStop(utc_blink_ewk_base::Failure);
+  }
+
+protected:
+  bool after_progress;
+};
+
+/**
+ * @brief Positive test case of ewk_view_suspend()
+ */
+TEST_F(utc_blink_ewk_view_suspend, POS_TEST)
+{
+  if(!ewk_view_url_set(GetEwkWebView(), "http://www.google.pl"))
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  ewk_view_suspend(GetEwkWebView());
+
+  main_result = EventLoopStart(5.0);
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
+
+/**
+ * @brief Negative test case of ewk_view_suspend()
+ */
+TEST_F(utc_blink_ewk_view_suspend, NEG_TEST)
+{
+  ewk_view_suspend(NULL);
+  evas_object_show(GetEwkWebView());
+  evas_object_show(GetEwkWindow());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_text_find_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_text_find_func.cpp
new file mode 100755 (executable)
index 0000000..48582ee
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_text_find : public utc_blink_ewk_base {
+protected:
+  static const char* SAMPLE_HTML_FILE;
+  static const char* SEARCH_STRING;
+  static const int MAX_MATCH_COUNT;
+
+protected:
+  /* Callback for find string operation */
+  static void findStringCallback(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[findStringCallback] :: ");
+    utc_blink_ewk_view_text_find *owner = static_cast<utc_blink_ewk_view_text_find*>(data);
+    owner->EventLoopStop(utc_blink_ewk_base::Success); // will noop if EventLoopStop was alraedy called
+
+    int count = *(unsigned int*)event_info;
+    if (/*(strcmp(searchString, SEARCH_STRING)) ||*/ count == 0) {
+        FAIL();
+    }
+  }
+
+  /* Callback for load finished */
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success); // will noop if EventLoopStop was alraedy called
+  }
+
+  virtual void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "text,found", findStringCallback, this);
+  }
+
+  virtual void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "text,found", findStringCallback);
+  }
+
+};
+
+const char* utc_blink_ewk_view_text_find::SAMPLE_HTML_FILE = "/common/sample.html";
+const char* utc_blink_ewk_view_text_find::SEARCH_STRING = "test";
+const int utc_blink_ewk_view_text_find::MAX_MATCH_COUNT = 2;
+
+/**
+* @brief Positive test case of ewk_view_string_find(). Search string and find options are set, and the result is returned in callback.
+*/
+TEST_F(utc_blink_ewk_view_text_find, POS_TEST)
+{
+  Eina_Bool resultBool = ewk_view_url_set(GetEwkWebView(), GetResourceUrl(SAMPLE_HTML_FILE).c_str());
+  if (!resultBool) {
+    FAIL();
+  }
+
+  utc_blink_ewk_base::MainLoopResult result = EventLoopStart();
+  if (result != utc_blink_ewk_base::Success) {
+    FAIL();
+  }
+
+  resultBool = ewk_view_text_find(GetEwkWebView(), SEARCH_STRING, EWK_FIND_OPTIONS_CASE_INSENSITIVE, MAX_MATCH_COUNT);
+  EXPECT_EQ(resultBool, EINA_TRUE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_text_find, NEG_TEST1)
+{
+  Eina_Bool result = ewk_view_text_find(NULL, SEARCH_STRING, EWK_FIND_OPTIONS_CASE_INSENSITIVE, MAX_MATCH_COUNT);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of search string.
+*/
+TEST_F(utc_blink_ewk_view_text_find, NEG_TEST2)
+{
+  Eina_Bool result = ewk_view_text_find(GetEwkWebView(), NULL, EWK_FIND_OPTIONS_CASE_INSENSITIVE, MAX_MATCH_COUNT);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_text_find_highlight_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_text_find_highlight_clear_func.cpp
new file mode 100755 (executable)
index 0000000..871013a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_text_find_highlight_clear : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief checking if returns EINA_TRUE when initiated with a correct webview
+ */
+TEST_F(utc_blink_ewk_view_text_find_highlight_clear, POS_TEST)
+{
+  Eina_Bool result = ewk_view_text_find_highlight_clear(GetEwkWebView());
+  if (!result) {
+    FAIL();
+  }
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+/**
+ * @brief checking if returns EINA_FALSE when initiated with a NULL webview
+ */
+TEST_F(utc_blink_ewk_view_text_find_highlight_clear, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_text_find_highlight_clear(NULL);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_text_selection_clear_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_text_selection_clear_func.cpp
new file mode 100755 (executable)
index 0000000..3a7aa4d
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_text_selection_clear : public utc_blink_ewk_base {
+protected:
+  void LoadFinished(Evas_Object* /*webview*/)
+  {
+    EventLoopStop(Success);
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "textselection,mode", ToSmartCallback(textselection_mode_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "textselection,mode", ToSmartCallback(textselection_mode_cb));
+  }
+
+  static void textselection_mode_cb(utc_blink_ewk_view_text_selection_clear* owner, Evas_Object* webview, bool* data)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_text_selection_range_clear(),testing results whether range is cleared or not.
+ */
+TEST_F(utc_blink_ewk_view_text_selection_clear, POS_TEST)
+{
+  // In case of no error and no selection, ewk_view_text_selection_text_get should return EMPTY string, not NULL ptr
+  const char* selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+
+  char htmlBuffer[] = "<!DOCTYPE html>"
+                      "<html>"
+                      "<body>"
+                      "Some text"
+                      "</body></html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_command_execute(GetEwkWebView(), "SelectAll", NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("Some text", selected_text);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_text_selection_clear(GetEwkWebView()));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_view_text_selection_clear, NEG_TEST)
+{
+  // In case of no error and no selection, ewk_view_text_selection_text_get should return EMPTY string, not NULL ptr
+  const char* selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+
+  ASSERT_EQ(EINA_FALSE, ewk_view_text_selection_clear(NULL));
+}
+
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_text_selection_text_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_text_selection_text_get_func.cpp
new file mode 100755 (executable)
index 0000000..ec8d140
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_text_selection_text_get : public utc_blink_ewk_base {
+protected:
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "textselection,mode", ToSmartCallback(textselection_mode_cb), this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "textselection,mode", ToSmartCallback(textselection_mode_cb));
+  }
+
+  static void textselection_mode_cb(utc_blink_ewk_view_text_selection_text_get* owner, Evas_Object* webview, bool* data)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+
+  static void load_finished_cb(utc_blink_ewk_view_text_selection_text_get* owner, Evas_Object* webview, bool* data)
+  {
+    ASSERT_TRUE(owner);
+    owner->EventLoopStop(Success);
+  }
+};
+
+/**
+ * @brief Checks if API returns proper value if selection event occured from JavaScript
+ */
+TEST_F(utc_blink_ewk_view_text_selection_text_get, textarea_js_select)
+{
+  // In case of no error and no selection, ewk_view_text_selection_text_get should return EMPTY string, not NULL ptr
+  const char* selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+
+  char htmlBuffer[] = "<!DOCTYPE html>"
+                      "<html><head>"
+                      "<script>"
+                      "window.onload = function()"
+                      "{ var text_area = document.getElementById('txtarea'); text_area.focus(); text_area.select();}"
+                      "</script></head>"
+                      "<body>"
+                      "<textarea id='txtarea'>select text</textarea>"
+                      "</body></html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("select text", selected_text);
+  fprintf(stderr,"[text_selection_text_get]=%s\n",selected_text);
+}
+
+/**
+ * @brief Checks if API returns proper value if selection event occured by executing edit command "SelectAll"
+ */
+TEST_F(utc_blink_ewk_view_text_selection_text_get, execute_select_all)
+{
+  evas_object_smart_callback_auto autocb(GetEwkWebView(), "load,finished", ToSmartCallback(load_finished_cb), this);
+
+  // In case of no error and no selection, ewk_view_text_selection_text_get should return EMPTY string, not NULL ptr
+  const char* selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+
+  char htmlBuffer[] = "<!DOCTYPE html>"
+                      "<html>"
+                      "<body>"
+                      "Some text"
+                      "</body></html>";
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("", selected_text);
+
+  ASSERT_EQ(EINA_TRUE, ewk_view_command_execute(GetEwkWebView(), "SelectAll", NULL));
+  ASSERT_EQ(Success, EventLoopStart());
+
+  selected_text = ewk_view_text_selection_text_get(GetEwkWebView());
+  ASSERT_TRUE(selected_text);
+  ASSERT_STREQ("Some text", selected_text);
+  fprintf(stderr,"[text_selection_text_get]=%s\n",selected_text);
+}
+
+/**
+ * @brief  checking whether function is working when providing NULL value.
+ */
+TEST_F(utc_blink_ewk_view_text_selection_text_get, invalid_args)
+{
+  EXPECT_EQ(0, ewk_view_text_selection_text_get(NULL));
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_text_zoom_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_text_zoom_get_func.cpp
new file mode 100755 (executable)
index 0000000..da030a6
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_text_zoom_get : public utc_blink_ewk_base {
+};
+
+/**
+* @brief Positive test case of ewk_view_text_zoom_get(). Set the value, get it and then compare.
+*/
+TEST_F(utc_blink_ewk_view_text_zoom_get, POS_TEST1)
+{
+  double setTextZoomFactor = 3;
+  Eina_Bool result = ewk_view_text_zoom_set( GetEwkWebView(), setTextZoomFactor);
+  if (!result) {
+    FAIL();
+  }
+
+  double getTextZoomFactor = ewk_view_text_zoom_get(GetEwkWebView());
+  EXPECT_EQ(getTextZoomFactor, setTextZoomFactor);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_text_zoom_get, NEG_TEST)
+{
+  double textZoomFactor = ewk_view_text_zoom_get(NULL);
+  EXPECT_EQ(textZoomFactor, -1.0);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_text_zoom_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_text_zoom_set_func.cpp
new file mode 100755 (executable)
index 0000000..398d7f4
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_text_zoom_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief Positive test case of ewk_view_text_zoom_set(). Set the value, get it and then compare.
+*/
+TEST_F(utc_blink_ewk_view_text_zoom_set, POS_TEST1)
+{
+  double setTextZoomFactor = 4;
+  Eina_Bool result = ewk_view_text_zoom_set(GetEwkWebView(), setTextZoomFactor);
+  if (!result) {
+    FAIL();
+  }
+
+  double getTextZoomFactor = ewk_view_text_zoom_get(GetEwkWebView());
+  EXPECT_EQ( getTextZoomFactor, setTextZoomFactor);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_text_zoom_set, NEG_TEST)
+{
+  double setTextZoomFactor = 2;
+  Eina_Bool result = ewk_view_text_zoom_set(NULL, setTextZoomFactor);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_title_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_title_get_func.cpp
new file mode 100644 (file)
index 0000000..f346fac
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+#define SAMPLE_HTML_FILE ("/common/sample.html")
+#define TITLE0 "Test file"
+
+class utc_blink_ewk_view_title_get_func : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object*)
+  {
+    EventLoopStop(utc_blink_ewk_base::Success); // won't fail the test if EventLoopStop was already called
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_title_get
+ */
+TEST_F(utc_blink_ewk_view_title_get_func, POS_TEST)
+{
+    Eina_Bool result = ewk_view_url_set(GetEwkWebView(), GetResourceUrl("common/sample.html").c_str());
+    if (!result)
+        utc_fail();
+    if (EventLoopStart() != utc_blink_ewk_base::Success)
+        utc_fail();
+    char* title = strdup(ewk_view_title_get(GetEwkWebView()));
+    utc_message("Current title: %s", title);
+    utc_check_str_eq(title, TITLE0);
+    free(title);
+}
+
+/**
+ * @brief Negative test case of ewk_view_title_get
+ */
+TEST_F(utc_blink_ewk_view_title_get_func, NEG_TEST)
+{
+  const char* title = ewk_view_title_get(0);
+  if (title)
+    utc_fail();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_touch_events_enabled_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_touch_events_enabled_set_func.cpp
new file mode 100755 (executable)
index 0000000..fd06a8c
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_touch_events_enabled_set : public utc_blink_ewk_base {
+};
+
+/**
+ * @brief Checking whether the state of mouse events behavior is set properly.
+ */
+TEST_F(utc_blink_ewk_view_touch_events_enabled_set, POS_TEST)
+{
+  ewk_view_touch_events_enabled_set(GetEwkWebView(), EINA_TRUE);
+  Eina_Bool enable_get = ewk_view_touch_events_enabled_get(GetEwkWebView());
+  if (enable_get != EINA_TRUE) {
+    FAIL();
+  }
+
+  ewk_view_touch_events_enabled_set(GetEwkWebView(), EINA_FALSE);
+  enable_get = ewk_view_touch_events_enabled_get(GetEwkWebView());
+  if (enable_get != EINA_FALSE) {
+    FAIL();
+  }
+}
+
+/**
+ * @brief There is no negative case for ewk_view_mouse_events_enabled_set function.
+ */
+TEST_F(utc_blink_ewk_view_touch_events_enabled_set, NEG_TEST)
+{
+  ewk_view_touch_events_enabled_set(NULL, EINA_FALSE);
+  ewk_view_touch_events_enabled_set(NULL, EINA_TRUE);
+
+  SUCCEED();
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_url_get_func.cpp
new file mode 100755 (executable)
index 0000000..0ec1494
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+static const char* TEST_URL = "http://www.google.com/";
+
+class utc_blink_ewk_view_url_get : public utc_blink_ewk_base {
+};
+
+/**
+* @brief Checking whether url is properly set.
+ */
+TEST_F(utc_blink_ewk_view_url_get, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), TEST_URL);
+  if (!result) {
+    FAIL();
+  }
+
+  const char* currentUrl = ewk_view_url_get(GetEwkWebView());
+  EXPECT_STREQ(currentUrl, TEST_URL);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_url_get, NEG_TEST)
+{
+  const char* currentUrl = ewk_view_url_get(NULL);
+  EXPECT_EQ(currentUrl ? EINA_TRUE : EINA_FALSE, EINA_FALSE);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_url_request_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_url_request_set_func.cpp
new file mode 100644 (file)
index 0000000..fdb375f
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <Eina.h>
+#include "utc_blink_ewk_base.h"
+#define URL "http://google.com"
+
+class utc_blink_ewk_view_url_request_set : public utc_blink_ewk_base
+{
+protected:
+  utc_blink_ewk_view_url_request_set()
+    : header(eina_hash_string_small_new(NULL))
+  {
+    eina_hash_add(header, "Accept", "text/plain");
+    eina_hash_add(header, "Referer", "http://samsung.com");
+  }
+
+  ~utc_blink_ewk_view_url_request_set() {
+    eina_hash_free(header);
+  }
+
+protected:
+  Eina_Hash *const header;
+};
+
+/**
+ * @brief Check if set values with correct WebView, Http Method and URL
+ */
+TEST_F(utc_blink_ewk_view_url_request_set, POS_TEST)
+{
+  ASSERT_TRUE(ewk_view_url_request_set(GetEwkWebView(), URL, EWK_HTTP_METHOD_GET, header, NULL));
+}
+
+/**
+ * @brief Check if return false if use correct WebView and Http Method and NULL url
+ */
+TEST_F(utc_blink_ewk_view_url_request_set, NEG_TEST)
+{
+  ASSERT_FALSE(ewk_view_url_request_set(GetEwkWebView(), NULL, EWK_HTTP_METHOD_GET, NULL, NULL));
+}
+
+/**
+ * @brief Check if return false if use NULL url and correct WebView and Http Method
+ */
+TEST_F(utc_blink_ewk_view_url_request_set, NEG_TEST2)
+{
+  ASSERT_FALSE(ewk_view_url_request_set(NULL, URL, EWK_HTTP_METHOD_GET, NULL, NULL));
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_url_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_url_set_func.cpp
new file mode 100755 (executable)
index 0000000..b8bfb4e
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+static const char* TEST_URL = "http://www.google.com/";
+
+class utc_blink_ewk_view_url_set : public utc_blink_ewk_base {
+};
+
+/**
+* @brief Checking whether url is properly set.
+ */
+TEST_F(utc_blink_ewk_view_url_set, POS_TEST)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), TEST_URL);
+  if (!result) {
+    FAIL();
+  }
+
+  const char* currentUrl = ewk_view_url_get(GetEwkWebView());
+  EXPECT_STREQ(currentUrl, TEST_URL);
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+ */
+TEST_F(utc_blink_ewk_view_url_set, NEG_TEST1)
+{
+  Eina_Bool result = ewk_view_url_set(NULL, TEST_URL);
+  if (result) {
+    FAIL();
+  }
+}
+
+TEST_F(utc_blink_ewk_view_url_set, NEG_TEST2)
+{
+  Eina_Bool result = ewk_view_url_set(GetEwkWebView(), NULL);
+  if (result) {
+    FAIL();
+  }
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_use_settings_font_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_use_settings_font_func.cpp
new file mode 100755 (executable)
index 0000000..12438be
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_use_settings_font : public utc_blink_ewk_base
+{
+ protected:
+};
+
+/**
+* @brief Check whether function works well with correct webview as parameter
+*/
+TEST_F(utc_blink_ewk_view_use_settings_font, POS_TEST)
+{
+  ewk_view_use_settings_font(GetEwkWebView());
+  SUCCEED();
+}
+
+/**
+* @brief Checking whether function works properly in case of NULL of a webview.
+*/
+TEST_F(utc_blink_ewk_view_use_settings_font, NEG_TEST)
+{
+  ewk_view_use_settings_font(NULL);
+  SUCCEED();
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_user_agent_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_user_agent_get_func.cpp
new file mode 100755 (executable)
index 0000000..8b40ced
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_user_agent_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // won't fail the test if EventLoopStop was already called
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed);
+  }
+
+  static void title_changed(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[title changed] ::");
+    if(data == NULL)
+      FAIL();
+
+    utc_blink_ewk_view_user_agent_get* owner = static_cast<utc_blink_ewk_view_user_agent_get*>(data);
+
+    char* title = strdup(ewk_view_title_get(owner->GetEwkWebView()));
+    char* userAgent =  strdup(ewk_view_user_agent_get(owner->GetEwkWebView()));
+
+    if(strcmp(title, userAgent) == 0) {
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    }
+    free(title);
+    free(userAgent);
+    title = NULL;
+    userAgent = NULL;
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_user_agent_get()
+ */
+TEST_F(utc_blink_ewk_view_user_agent_get, POS_TEST)
+{
+   const char textStyleHTML[] =
+    "<html>"
+      "<head>"
+        "<title>User Agent Test</title>"
+        "<script>"
+          "document.title=navigator.userAgent;"
+        "</script>"
+      "</head>"
+      "<body></body>"
+    "</html>";
+
+  Eina_Bool result = ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Negative test case of ewk_view_user_agent_get()
+ */
+TEST_F(utc_blink_ewk_view_user_agent_get, NEG_TEST)
+{
+  const char* userAgent =  ewk_view_user_agent_get(NULL);
+  if (NULL != userAgent)
+    FAIL();
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_user_agent_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_user_agent_set_func.cpp
new file mode 100755 (executable)
index 0000000..c69d792
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Define this macro _before_ you include the utc_blink_ewk_base.h header file. */
+#define USER_AGENT_STRING "TEST_USER_AGENT"
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_user_agent_set : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object* webview)
+  {
+    EventLoopStop(utc_blink_ewk_base::Failure); // won't fail the test if EventLoopStop was already called
+  }
+
+  void PostSetUp()
+  {
+    evas_object_smart_callback_add(GetEwkWebView(), "title,changed", title_changed, this);
+  }
+
+  void PreTearDown()
+  {
+    evas_object_smart_callback_del(GetEwkWebView(), "title,changed", title_changed);
+  }
+
+  static void title_changed(void* data, Evas_Object* webview, void* event_info)
+  {
+    utc_message("[title changed] ::");
+    if(data == NULL)
+      FAIL();
+
+    utc_blink_ewk_view_user_agent_set* owner = static_cast<utc_blink_ewk_view_user_agent_set*>(data);
+
+    char* title = strdup(ewk_view_title_get(owner->GetEwkWebView()));
+
+    if(strcmp(title, USER_AGENT_STRING))
+      owner->EventLoopStop(utc_blink_ewk_base::Success);
+    free(title);
+    title = NULL;
+  }
+};
+
+/**
+ * @brief Positive test case of ewk_view_user_agent_set()
+ */
+TEST_F(utc_blink_ewk_view_user_agent_set, POS_TEST)
+{
+   const char textStyleHTML[] =
+    "<html>"
+      "<head>"
+        "<title>User Agent Test</title>"
+        "<script>"
+          "document.title=navigator.userAgent;"
+        "</script>"
+      "</head>"
+      "<body></body>"
+    "</html>";
+
+  Eina_Bool result = ewk_view_html_string_load(GetEwkWebView(), textStyleHTML, 0, 0);
+  if (!result)
+    FAIL();
+
+  utc_blink_ewk_base::MainLoopResult main_result = EventLoopStart();
+
+  if (main_result != utc_blink_ewk_base::Success)
+    FAIL();
+}
+
+/**
+ * @brief Negative test case of ewk_view_user_agent_set()
+ */
+TEST_F(utc_blink_ewk_view_user_agent_set, NEG_TEST)
+{
+  char* userAgent = strdup(ewk_view_user_agent_get(GetEwkWebView()));
+
+  Eina_Bool value = ewk_view_user_agent_set(NULL, "");
+
+  if (EINA_TRUE == value)
+    FAIL();
+
+  char* newUserAgent = strdup(ewk_view_user_agent_get(GetEwkWebView()));
+
+  if(strcmp(newUserAgent, userAgent) != 0) {
+    free(userAgent);
+    free(newUserAgent);
+    userAgent = NULL;
+    newUserAgent = NULL;
+    FAIL();
+  }
+  free(userAgent);
+  free(newUserAgent);
+  userAgent = NULL;
+  newUserAgent = NULL;
+}
\ No newline at end of file
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_visibility_set_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_visibility_set_func.cpp
new file mode 100755 (executable)
index 0000000..b1a8afb
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_visibility_set : public utc_blink_ewk_base {
+};
+
+
+TEST_F(utc_blink_ewk_view_visibility_set, POS_TEST1)
+{
+  Eina_Bool result = ewk_view_visibility_set(GetEwkWebView(), EINA_TRUE);
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+TEST_F(utc_blink_ewk_view_visibility_set, POS_TEST2)
+{
+  Eina_Bool result = ewk_view_visibility_set(GetEwkWebView(), EINA_FALSE);
+  EXPECT_EQ(result, EINA_TRUE);
+}
+
+TEST_F(utc_blink_ewk_view_visibility_set, NEG_TEST)
+{
+  Eina_Bool result = ewk_view_visibility_set(NULL, EINA_FALSE);
+  EXPECT_EQ(result, EINA_FALSE);
+}
+
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_capable_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_capable_get_func.cpp
new file mode 100644 (file)
index 0000000..ec7c0dc
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_web_application_capable_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void webAppCapableGetCallback(Eina_Bool capable, void *data)
+  {
+    ASSERT_TRUE(data != NULL);
+    utc_blink_ewk_view_web_application_capable_get *owner = 0;
+    OwnerFromVoid(data, &owner);
+    fprintf(stderr, "[webAppCapableGetCallback] :: capable = %s\n", capable == EINA_TRUE ? "EINA_TRUE" : "EINA_FALSE");
+    ASSERT_EQ(owner->expectedCapable, capable);
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  Eina_Bool expectedCapable;
+  static const char * const appleCapableYesPage;
+  static const char * const appleCapableNoPage;
+  static const char * const googleCapableYesPage;
+  static const char * const googleCapableNoPage;
+  static const char * const noMetaTagPage;
+};
+
+const char * const utc_blink_ewk_view_web_application_capable_get::appleCapableYesPage = "<html>" \
+    "<head><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"></head>" \
+    "<body></body>" \
+    "</html>";
+const char * const utc_blink_ewk_view_web_application_capable_get::appleCapableNoPage = "<html>" \
+    "<head><meta name=\"apple-mobile-web-app-capable\" content=\"no\"></head>" \
+    "<body></body>" \
+    "</html>";
+const char * const utc_blink_ewk_view_web_application_capable_get::googleCapableYesPage = "<html>" \
+    "<head><meta name=\"mobile-web-app-capable\" content=\"yes\"></head>" \
+    "<body></body>" \
+    "</html>";
+const char * const utc_blink_ewk_view_web_application_capable_get::googleCapableNoPage = "<html>" \
+    "<head><meta name=\"mobile-web-app-capable\" content=\"no\"></head>" \
+    "<body></body>" \
+    "</html>";
+const char * const utc_blink_ewk_view_web_application_capable_get::noMetaTagPage = "<html><body></body></html>";
+
+TEST_F(utc_blink_ewk_view_web_application_capable_get, APPLE_CAPABLE_YES_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), appleCapableYesPage, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedCapable = EINA_TRUE;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_capable_get(GetEwkWebView(),
+                                                            utc_blink_ewk_view_web_application_capable_get::webAppCapableGetCallback,
+                                                            this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_capable_get, APPLE_CAPABLE_NO_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), appleCapableNoPage, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedCapable = EINA_FALSE;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_capable_get(GetEwkWebView(),
+                                                            utc_blink_ewk_view_web_application_capable_get::webAppCapableGetCallback,
+                                                            this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_capable_get, GOOGLE_CAPABLE_YES_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), googleCapableYesPage, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedCapable = EINA_TRUE;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_capable_get(GetEwkWebView(),
+                                                            utc_blink_ewk_view_web_application_capable_get::webAppCapableGetCallback,
+                                                            this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_capable_get, GOOGLE_CAPABLE_NO_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), googleCapableNoPage, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedCapable = EINA_FALSE;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_capable_get(GetEwkWebView(),
+                                                            utc_blink_ewk_view_web_application_capable_get::webAppCapableGetCallback,
+                                                            this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_capable_get, NO_META_TAG_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), noMetaTagPage, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedCapable = EINA_FALSE;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_capable_get(GetEwkWebView(),
+                                                            utc_blink_ewk_view_web_application_capable_get::webAppCapableGetCallback,
+                                                            this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_icon_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_icon_url_get_func.cpp
new file mode 100644 (file)
index 0000000..51c7f4d
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+
+class utc_blink_ewk_view_web_application_icon_url_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void webAppUrlGetCallback(const char *url, utc_blink_ewk_view_web_application_icon_url_get *owner)
+  {
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != url);
+    utc_message("[webAppUrlGetCallback] :: url = %s", url);
+    if(!*url) {
+      owner->EventLoopStop(Failure);
+    } else {
+      ASSERT_STREQ(owner->GetResourceUrl(owner->expectedUrl.c_str()).c_str(), url);
+      owner->EventLoopStop(Success);
+    }
+  }
+
+protected:
+  std::string expectedUrl;
+  static const char * const iconUrl;
+  static const char * const appleTouchIconPage;
+  static const char * const appleTouchIconPrecomposedPage;
+  static const char * const googleIconPage;
+  static const char * const googleAppleIconPage;
+};
+
+const char * const utc_blink_ewk_view_web_application_icon_url_get::iconUrl = "ewk_view_web_application/tizen-icon.png";
+const char * const utc_blink_ewk_view_web_application_icon_url_get::appleTouchIconPage = "ewk_view_web_application/web_app_url_get.html";
+const char * const utc_blink_ewk_view_web_application_icon_url_get::appleTouchIconPrecomposedPage = "ewk_view_web_application/web_app_url_get_precomposed.html";
+const char * const utc_blink_ewk_view_web_application_icon_url_get::googleIconPage = "ewk_view_web_application/web_app_url_get_icon.html";
+const char * const utc_blink_ewk_view_web_application_icon_url_get::googleAppleIconPage = "ewk_view_web_application/web_app_url_get_icon_apple.html";
+
+TEST_F(utc_blink_ewk_view_web_application_icon_url_get, APPLE_TOUCH_ICON_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(appleTouchIconPage).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrl = iconUrl;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_url_get(GetEwkWebView(),
+                                                             (void(*)(const char*,void*))webAppUrlGetCallback,
+                                                             this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_icon_url_get, APPLE_TOUCH_ICON_PRECOMPOSED_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(appleTouchIconPrecomposedPage).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrl = iconUrl;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_url_get(GetEwkWebView(),
+                                                             (void(*)(const char*,void*))webAppUrlGetCallback,
+                                                             this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_icon_url_get, GOOGLE_ICON_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(googleIconPage).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrl = iconUrl;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_url_get(GetEwkWebView(),
+                                                             (void(*)(const char*,void*))webAppUrlGetCallback,
+                                                             this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_icon_url_get, GOOGLE_APPLE_ICON_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(googleAppleIconPage).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrl = iconUrl;
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_url_get(GetEwkWebView(),
+                                                             (void(*)(const char*,void*))webAppUrlGetCallback,
+                                                             this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_icon_url_get, NO_ICON_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), "<html><body></body></html>", 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrl = std::string();
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_url_get(GetEwkWebView(),
+                                                             (void(*)(const char*,void*))webAppUrlGetCallback,
+                                                             this));
+  ASSERT_EQ(Failure, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_icon_urls_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_view_web_application_icon_urls_get_func.cpp
new file mode 100644 (file)
index 0000000..41e174d
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include <map>
+
+class utc_blink_ewk_view_web_application_icon_urls_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void webAppUrlsGetCallback(Eina_List *urls, utc_blink_ewk_view_web_application_icon_urls_get *owner)
+  {
+    ASSERT_TRUE(NULL != owner);
+    utc_message("[webAppUrlsGetCallback] :: ");
+    ASSERT_EQ(owner->expectedUrls.size(), eina_list_count(urls));
+    Eina_List *l = 0;
+    void *d = 0;
+    EINA_LIST_FOREACH(urls, l, d) {
+      const char* size = ewk_web_application_icon_data_size_get(static_cast<Ewk_Web_App_Icon_Data *>(d));
+      ASSERT_TRUE(NULL != size);
+      const char* url = ewk_web_application_icon_data_url_get(static_cast<Ewk_Web_App_Icon_Data *>(d));
+      ASSERT_TRUE(NULL != url);
+      utc_message("[URLS]: %s ; %s", size, url);
+      ASSERT_STREQ(owner->GetResourceUrl(owner->expectedUrls[size].c_str()).c_str(), url);
+    }
+    owner->EventLoopStop(Success);
+  }
+
+protected:
+  std::map<std::string, std::string> expectedUrls;
+  static const char * const webAppUrlsPage;
+  static const char * const noUrlsPage;
+};
+
+const char * const utc_blink_ewk_view_web_application_icon_urls_get::webAppUrlsPage = "ewk_view_web_application/web_app_urls_get.html";
+const char * const utc_blink_ewk_view_web_application_icon_urls_get::noUrlsPage = "<html><body></body></html>";
+
+TEST_F(utc_blink_ewk_view_web_application_icon_urls_get, WEB_APP_URLS_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(webAppUrlsPage).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrls["64x64"] = "ewk_view_web_application/tizen-icon1.png";
+  expectedUrls["128x128"] = "ewk_view_web_application/tizen-icon2.png";
+  expectedUrls["144x144"] = "ewk_view_web_application/tizen-icon3.png";
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_urls_get(GetEwkWebView(),
+                                                             (void(*)(Eina_List*,void*))webAppUrlsGetCallback,
+                                                             this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
+
+TEST_F(utc_blink_ewk_view_web_application_icon_urls_get, NO_URLS_PAGE)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), noUrlsPage, 0, 0));
+  ASSERT_EQ(Success, EventLoopStart());
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_urls_get(GetEwkWebView(),
+                                                             (void(*)(Eina_List*,void*))webAppUrlsGetCallback,
+                                                             this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_web_application_icon_data_url_get_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_web_application_icon_data_url_get_func.cpp
new file mode 100644 (file)
index 0000000..5341ca9
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * chromium EFL
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "utc_blink_ewk_base.h"
+#include <map>
+
+// this test uses parts of code from:
+// utc_blink_ewk_view_web_application_icon_urls_get_func.cpp
+// because this test provides exemplary use of ewk_view_web_application_icon_urls_get
+// which is only way to get Ewk_Web_App_Icon_Data class objects without using
+// private implementation
+
+class utc_blink_ewk_web_application_icon_data_url_get : public utc_blink_ewk_base
+{
+protected:
+  void LoadFinished(Evas_Object *)
+  {
+    EventLoopStop(Success);
+  }
+
+  static void webAppUrlsGetCallback(Eina_List *urls, utc_blink_ewk_web_application_icon_data_url_get *owner)
+  {
+    ASSERT_TRUE(NULL != owner);
+    ASSERT_TRUE(NULL != urls);
+    utc_message("[webAppUrlsGetCallback] :: ");
+    ASSERT_EQ(owner->expectedUrls.size(), eina_list_count(urls));
+    Eina_List *l = 0;
+    void *d = 0;
+    EINA_LIST_FOREACH(urls, l, d) {
+      Ewk_Web_App_Icon_Data *data = static_cast<Ewk_Web_App_Icon_Data*>(d);
+      ASSERT_TRUE(NULL != data);
+      const char* size = ewk_web_application_icon_data_size_get(data);
+      ASSERT_TRUE(NULL != size);
+      const char* url = ewk_web_application_icon_data_url_get(data);
+      ASSERT_TRUE(NULL != url);
+      utc_message("[URLS]: %s ; %s", size, url);
+      ASSERT_STREQ(owner->GetResourceUrl(owner->expectedUrls[size].c_str()).c_str(), url);
+    }
+    owner->EventLoopStop(Success);
+  }
+
+  std::map<std::string, std::string> expectedUrls;
+  static const char * const webAppUrlsPage;
+
+};
+
+const char * const utc_blink_ewk_web_application_icon_data_url_get::webAppUrlsPage = "ewk_view_web_application/web_app_urls_get.html";
+
+TEST_F(utc_blink_ewk_web_application_icon_data_url_get, POS_TEST)
+{
+  ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(webAppUrlsPage).c_str()));
+  ASSERT_EQ(Success, EventLoopStart());
+  expectedUrls["64x64"] = "ewk_view_web_application/tizen-icon1.png";
+  expectedUrls["128x128"] = "ewk_view_web_application/tizen-icon2.png";
+  expectedUrls["144x144"] = "ewk_view_web_application/tizen-icon3.png";
+  ASSERT_EQ(EINA_TRUE, ewk_view_web_application_icon_urls_get(GetEwkWebView(),
+            (void(*)(_Eina_List*,void*))webAppUrlsGetCallback,
+            this));
+  ASSERT_EQ(Success, EventLoopStart());
+}
diff --git a/tizen_src/ewk/utc_gtest_run.sh b/tizen_src/ewk/utc_gtest_run.sh
new file mode 100644 (file)
index 0000000..3973268
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/bash
+
+##  @file   utc_gtest_run.sh
+##  @author Jongsoo Yoon <join.yoon@samsung.com>
+##  @date   2014-02-20
+##  @brief  This shell-script file is made to test all unit test cases automatically for Chromium EFL API
+
+##  Set target environment
+UTC_EXEC_PATH=/opt/usr/utc_exec
+UTC_RESULTS_ROOT_DIR=/opt/usr/utc_results
+UTC_ROOT=/usr/bin
+
+set $(date +%y%m%d_%H%M%S)
+FILE_NAME_EXTENSION=$1
+
+UTC_RESULT_DIR=$UTC_RESULTS_ROOT_DIR/unittest-result-$FILE_NAME_EXTENSION
+UTC_LOG_DIR=$UTC_RESULT_DIR-logs
+
+## Echo setting values
+echo UTC_EXEC_PATH=$UTC_EXEC_PATH
+echo UTC_ROOT=$UTC_ROOT
+echo UTC_RESULT_DIR=$UTC_RESULT_DIR
+
+## Mkdir UTC DIRECTORYS
+if [ -d $UTC_RESULTS_ROOT_DIR ]
+then
+  echo $UTC_RESULTS_ROOT_DIR
+else
+  echo make $UTC_RESULTS_ROOT_DIR
+  mkdir $UTC_RESULTS_ROOT_DIR
+fi
+mkdir $UTC_RESULT_DIR
+mkdir $UTC_LOG_DIR
+
+## Run Unit Test for All
+UTC_FILTER=utc_blink
+for utc_exec in `ls $UTC_EXEC_PATH | grep $UTC_FILTER`; do
+  echo ====shell script==== ::: start test ::: $utc_exec
+  cp $UTC_EXEC_PATH/$utc_exec $UTC_ROOT
+  # some TCs need to get focus on webview, lockscreen is blocking focus
+  killall -s QUIT lockscreen
+  $UTC_ROOT/$utc_exec --gtest_output="xml:$UTC_RESULT_DIR/$utc_exec.xml" # | tee $UTC_LOG_DIR/$utc_exec.log
+  rm $UTC_ROOT/$utc_exec
+
+  if [ ! -f "$UTC_RESULT_DIR/$utc_exec.xml" ]; then
+    test_name=${utc_exec%"_func"}
+    ## Generate fake xml file that tells about possible segfault.
+    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "<testsuites tests=\"1\" failures=\"1\" disabled=\"0\" errors=\"0\" time=\"0.1\" name=\"Launch\">" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "  <testsuite name=\"$test_name\" tests=\"1\" failures=\"1\" disabled=\"0\" errors=\"0\" time=\"0.1\">" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "    <testcase name=\"LaunchTC\" status=\"run\" time=\"0.1\" classname=\"$test_name\">" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "      <failure message=\"SIGSEGV\" type=\"\"></failure>" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "    </testcase>" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "  </testsuite>" >> $UTC_RESULT_DIR/$utc_exec.xml
+    echo "</testsuites>" >> $UTC_RESULT_DIR/$utc_exec.xml
+  fi
+
+  echo ====shell script==== :::  end test  ::: $utc_exec
+done
+
+## Set testsuites initial values
+_testAPIs=0
+_failureAPIs=0
+_successAPIs=0
+_totalTests=0
+_success=0
+_failures=0
+_disabled=0
+_errors=0
+_time=0
+_isFails=0
+_name=AllTests
+utc_report_xml_file_path=$UTC_RESULT_DIR.xml
+
+## Parsing & Merging All tests xml files
+for result_xml in  $UTC_RESULT_DIR/*.xml; do
+  echo -e "\033[1;33;3m$result_xml\033[0m"
+  _testAPIs=`expr $_testAPIs + 1`
+  _isFails=`expr $_failures + $_disabled + $_errors`
+  _totalTests=`expr $_totalTests + $(xmllint --xpath "string(//testsuites/@tests)" $result_xml)`
+  _failures=`expr $_failures + $(xmllint --xpath "string(//testsuites/@failures)" $result_xml)`
+  _disabled=`expr $_disabled + $(xmllint --xpath "string(//testsuites/@disabled)" $result_xml)`
+  _errors=`expr $_errors + $(xmllint --xpath "string(//testsuites/@errors)" $result_xml)`
+  _time=`echo $_time $(xmllint --xpath "string(//testsuites/@time)" $result_xml) | awk '{printf "%.3f", $1 + $2}'`
+
+  if [ `expr $_failures + $_disabled + $_errors` -gt $_isFails ];then
+    _isFails=`expr $_failures + $_disabled + $_errors`
+    _failureAPIs=`expr $_failureAPIs + 1`
+  fi
+
+  echo >> $UTC_RESULT_DIR/temp_report
+  xmllint --xpath //testsuite $result_xml >> $UTC_RESULT_DIR/temp_report
+done
+_success=`expr $_totalTests - $_isFails`
+_successAPIs=`expr $_testAPIs - $_failureAPIs`
+
+## Generate report xml file
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $utc_report_xml_file_path
+echo "<testsuites testAPIs=\"$_testAPIs\" successAPIs=\"$_successAPIs\" failureAPIs=\"$_failureAPIs\" tests=\"$_totalTests\" success=\"$_success\" failures=\"$_failures\" disabled=\"$_disabled\" errors=\"$_errors\" time=\"$_time\" name=\"$_name\">" >> $utc_report_xml_file_path
+cat $UTC_RESULT_DIR/temp_report >> $utc_report_xml_file_path
+echo >> $utc_report_xml_file_path
+echo "</testsuites>" >> $utc_report_xml_file_path
+
+## End Unit Test
+#rm $UTC_RESULT_DIR -rf
+
+echo -e "\033[1;33;3mend unit test..\033[0m"
+echo -e "\033[1;33;3mxml report file is located in \"\033[1;32;4m$utc_report_xml_file_path\033[1;33;3m\"\033[0m"