[M120 Migration][MM] Support W3C EME
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / unittest / utc_blink_ewk_intercept_request_get_base.h
1 // Copyright 2016 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 #ifndef EWK_UNITTEST_UTC_BLINK_EWK_INTERCEPT_REQUEST_GET_BASE_H_
6 #define EWK_UNITTEST_UTC_BLINK_EWK_INTERCEPT_REQUEST_GET_BASE_H_
7
8 #include "utc_blink_ewk_base.h"
9
10 #include <atomic>
11
12 class utc_blink_ewk_intercept_request_get_base : public utc_blink_ewk_base {
13  protected:
14   static const std::string kInterceptURL;
15
16   utc_blink_ewk_intercept_request_get_base();
17   ~utc_blink_ewk_intercept_request_get_base() override;
18
19   void LoadFinished(Evas_Object* webview) override;
20   void pos_test();
21   void neg_test();
22   virtual void test_func(Ewk_Intercept_Request* intercept_request) = 0;
23
24  private:
25   static void callback_positive(Ewk_Context* /*ctx*/,
26                                 Ewk_Intercept_Request* intercept_request,
27                                 void* user_data);
28   static void callback_negative(Ewk_Context* /*ctx*/,
29                                 Ewk_Intercept_Request* /*intercept_request*/,
30                                 void* user_data);
31
32   std::atomic<bool> api_executed_;
33 };
34
35 #endif  // EWK_UNITTEST_UTC_BLINK_EWK_INTERCEPT_REQUEST_GET_BASE_H_