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.
5 #ifndef UTC_BLINK_EWK_CONTEXT_FORM_AUTOFILL_PROFILE_UTILS_H
6 #define UTC_BLINK_EWK_CONTEXT_FORM_AUTOFILL_PROFILE_UTILS_H
8 #include "utc_blink_ewk_base.h"
10 const unsigned TEST_AUTOFILL_PROFILE_ID = 12345;
11 const char* const TEST_AUTOFILL_PROFILE_NAME = "Mr. Smith";
12 const char* const TEST_AUTOFILL_PROFILE_COMPANY = "Samsung";
13 const char* const TEST_AUTOFILL_PROFILE_ADDRESS1 = "Existing Street 15";
14 const char* const TEST_AUTOFILL_PROFILE_ADDRESS2 = "NonExisting Street -15";
15 const char* const TEST_AUTOFILL_PROFILE_CITY_TOWN = "Capitol";
16 const char* const TEST_AUTOFILL_PROFILE_STATE_PROVINCE_REGION = "Beautiful Province";
17 const char* const TEST_AUTOFILL_PROFILE_ZIPCODE = "12-345";
18 const char* const TEST_AUTOFILL_PROFILE_COUNTRY = "Neverland";
19 const char* const TEST_AUTOFILL_PROFILE_PHONE = "123456789";
20 const char* const TEST_AUTOFILL_PROFILE_EMAIL = "someEmail@someServer.com";
22 Ewk_Autofill_Profile* getTestEwkAutofillProfile();
24 bool checkOne(Ewk_Autofill_Profile* profileToCheck, const char* reference,
25 Ewk_Autofill_Profile_Data_Type kind, const char* errMessage);
26 bool checkIfProfileContainsTestData(Ewk_Autofill_Profile* profileToCheck);
28 class utc_blink_ewk_context_form_autofill_profile_base
29 : public utc_blink_ewk_base {
31 void PostSetUp() override {
36 void PreTearDown() override {
41 void RemoveTestProfile() {
42 Ewk_Autofill_Profile* profile =
43 ewk_context_form_autofill_profile_get(ewk_context_default_get(),
44 TEST_AUTOFILL_PROFILE_ID);
46 ewk_context_form_autofill_profile_remove(ewk_context_default_get(),
47 TEST_AUTOFILL_PROFILE_ID);
48 ewk_autofill_profile_delete(profile);
51 ewk_context_form_autofill_profile_get(ewk_context_default_get(),
52 TEST_AUTOFILL_PROFILE_ID);
53 ASSERT_TRUE(profile == nullptr);
58 #endif //UTC_BLINK_EWK_CONTEXT_FORM_AUTOFILL_PROFILE_UTILS_H