[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_history_free_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
7 class utc_blink_ewk_history_free : public utc_blink_ewk_base
8 {
9 protected:
10  void LoadFinished(Evas_Object*) override { EventLoopStop(Success); }
11
12 protected:
13   static const char* const TEST_URL;
14 };
15
16 const char* const utc_blink_ewk_history_free::TEST_URL = "ewk_history/page1.html";
17
18 TEST_F(utc_blink_ewk_history_free, EXISTING_HISTORY)
19 {
20   ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), GetResourceUrl(TEST_URL).c_str()));
21   ASSERT_EQ(Success, EventLoopStart());
22
23   Ewk_History *history = ewk_view_history_get(GetEwkWebView());
24   ASSERT_TRUE(history);
25
26   ewk_history_free(history);
27 }
28
29 TEST_F(utc_blink_ewk_history_free, EXISTING_EMPTY_HISTORY)
30 {
31   Ewk_History *history = ewk_view_history_get(GetEwkWebView());
32   ASSERT_TRUE(history);
33
34   ewk_history_free(history);
35 }
36
37 TEST_F(utc_blink_ewk_history_free, NULL_HISTORY)
38 {
39   ewk_history_free(NULL);
40 }