[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_view_main_frame_get_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_main_frame_get : public utc_blink_ewk_base
8 {
9 protected:
10   void LoadFinished(Evas_Object* webview) override
11   {
12     EventLoopStop(Success);
13   }
14 };
15
16 TEST_F(utc_blink_ewk_view_main_frame_get, POS_TEST)
17 {
18   const char simpleHTML[] = "<html><body>test</body></html>";
19
20   ASSERT_EQ(EINA_TRUE, ewk_view_html_string_load(GetEwkWebView(), simpleHTML, nullptr, nullptr));
21   ASSERT_EQ(Success, EventLoopStart());
22   ASSERT_NE(nullptr, ewk_view_main_frame_get(GetEwkWebView()));
23   ASSERT_EQ(EINA_TRUE, ewk_frame_is_main_frame(ewk_view_main_frame_get(GetEwkWebView())));
24 }
25
26 TEST_F(utc_blink_ewk_view_main_frame_get, INVALID_ARG)
27 {
28   ASSERT_EQ(nullptr, ewk_view_main_frame_get(nullptr));
29 }