Test for ewk_autofill_profile_id_get
authorPiotr Sieduszewski <p.sieduszews@samsung.com>
Fri, 9 Jan 2015 12:30:01 +0000 (13:30 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
This test create 2 profiles, and check a id of it.

This reverts http://165.213.202.130:8080/71877

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9542
Reviewed by: Janusz Majnert, Piotr Tworek, SeungSeop Park, commitbot

Change-Id: Id958bf3a108b1a6b74d424f7e3a87166ab9015eb
Signed-off-by: Piotr Sieduszewski <p.sieduszews@samsung.com>
tizen_src/ewk/unittest/ewk-tests.gypi
tizen_src/ewk/unittest/utc_blink_ewk_autofill_profile_id_get_func.cpp [new file with mode: 0644]

index 658c52b..2b8afd4 100644 (file)
@@ -48,6 +48,7 @@
         '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_back_forward_list_count_func.cpp',
         'utc_blink_ewk_back_forward_list_current_item_get_func.cpp',
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..9d6eaae
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2014 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "utc_blink_ewk_base.h"
+#include "ewk_autofill_profile.h"
+
+class utc_blink_ewk_autofill_profile_id_get : public utc_blink_ewk_base
+{
+};
+
+TEST_F(utc_blink_ewk_autofill_profile_id_get, NullArg)
+{
+  ASSERT_EQ(0, ewk_autofill_profile_id_get(NULL));
+}
+
+TEST_F(utc_blink_ewk_autofill_profile_id_get, POS_TEST)
+{
+  Ewk_Autofill_Profile* const m_profile0 = ewk_autofill_profile_new();
+  Ewk_Autofill_Profile* const m_profile1 = ewk_autofill_profile_new();
+
+  EXPECT_NE(ewk_autofill_profile_id_get(m_profile0), ewk_autofill_profile_id_get(m_profile1));
+  EXPECT_NE(0, ewk_autofill_profile_id_get(m_profile1));
+
+  ewk_autofill_profile_delete(m_profile1);
+  ewk_autofill_profile_delete(m_profile0);
+}