[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_context_form_autofill_profile_add_func.cpp
1 // Copyright 2014 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "utc_blink_ewk_base.h"
6 #include "utc_blink_ewk_context_form_autofill_profile_utils.h"
7
8 #include <map>
9
10 class utc_blink_ewk_context_form_autofill_profile_add
11     : public utc_blink_ewk_context_form_autofill_profile_base {
12 };
13
14 TEST_F(utc_blink_ewk_context_form_autofill_profile_add, POS_TEST)
15 {
16   Ewk_Autofill_Profile* profile = getTestEwkAutofillProfile();
17   ASSERT_TRUE(NULL != profile);
18   Eina_Bool result = ewk_context_form_autofill_profile_add(
19       ewk_context_default_get(), profile);
20   ASSERT_TRUE(EINA_FALSE != result);
21   ewk_autofill_profile_delete(profile);
22 }
23
24 TEST_F(utc_blink_ewk_context_form_autofill_profile_add, NEG_TEST)
25 {
26   Ewk_Autofill_Profile* profile = getTestEwkAutofillProfile();
27   Ewk_Context* context = ewk_context_default_get();
28   ASSERT_TRUE(NULL != profile);
29   ASSERT_TRUE(NULL != context);
30   ASSERT_EQ(EINA_FALSE, ewk_context_form_autofill_profile_add(NULL, profile));
31   ASSERT_EQ(EINA_FALSE, ewk_context_form_autofill_profile_add(context, NULL));
32   ewk_autofill_profile_delete(profile);
33 }