[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_view_stop_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_view_stop : public utc_blink_ewk_base
8 {
9 protected:
10
11   static const char* const sample_html_file;
12 };
13
14 const char* const utc_blink_ewk_view_stop::sample_html_file = "/common/sample.html";
15
16 /**
17  * @brief Positive  test case of ewk_view_stop()
18  * ewk_view_stop should return TRUE  as we are stopping the load with a valid url
19  */
20 TEST_F(utc_blink_ewk_view_stop, POS_TEST)
21 {
22   if (!ewk_view_url_set(GetEwkWebView(), GetResourceUrl(sample_html_file).c_str()))
23     FAIL();
24
25   Eina_Bool result = ewk_view_stop(GetEwkWebView());
26   EXPECT_EQ(result, EINA_TRUE);
27 }
28
29 /**
30  * @brief Negative  test case of ewk_view_stop()
31  * ewk_view_stop should return FALSE as we are stopping the load with NULL
32  */
33 TEST_F(utc_blink_ewk_view_stop, NEG_TEST)
34 {
35   Eina_Bool result = ewk_view_stop(NULL);
36   EXPECT_EQ(result, EINA_FALSE);
37 }