[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_cb_load_started.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 #define URL  ("http://google.com")
8
9 class utc_blink_cb_load_started : public utc_blink_ewk_base
10 {
11 protected:
12  void LoadStarted(Evas_Object* webview) override {
13    EventLoopStop(utc_blink_ewk_base::Success);
14   }
15
16   void LoadFinished(Evas_Object* webview) override {
17     EventLoopStop(utc_blink_ewk_base::Failure);
18   }
19 };
20
21 /**
22  * @brief Tests "load,started" callback
23  */
24 TEST_F(utc_blink_cb_load_started, callback)
25 {
26     ASSERT_EQ(EINA_TRUE, ewk_view_url_set(GetEwkWebView(), URL));
27     EXPECT_EQ(utc_blink_ewk_base::Success, EventLoopStart());
28 }