tizen 2.3.1 release
[framework/web/mobile/wrt.git] / tests / widgets / common / include / mock / MockViewModule.h
1 /*
2  * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @file        MockViewModule.h
18  * @author      Tomasz Iwanek (t.iwanek@samsung.com)
19  * @brief       Mock for view module
20  */
21
22 #ifndef MOCKVIEWMODULE_H
23 #define MOCKVIEWMODULE_H
24
25 #include<i_view_module.h>
26
27 class MockViewModule : public ViewModule::IViewModule
28 {
29 public:
30     MockViewModule();
31     bool createWebView(Ewk_Context* context,
32                              Evas_Object* window);
33     void prepareView(WidgetModel *, const std::string &);
34     void showWidget();
35     void hideWidget();
36     void suspendWidget();
37     void resumeWidget();
38     void setWidgetUrl(const std::string &);
39     void resetWidgetFromSuspend();
40     void resetWidgetFromResume();
41     void backward();
42     void reloadStartPage();
43     Evas_Object* getCurrentWebview();
44     void fireJavascriptEvent(int event, void* data);
45     void setUserCallbacks(const WRT::UserDelegatesPtr& cbs);
46     void checkSyncMessageFromBundle(
47           const char* name,
48           const char* body,
49           char** returnData);
50     void checkAsyncMessageFromBundle(
51             const char* name,
52             const char* body);
53     void downloadData(const char* url);
54     void activateVibration(bool on, uint64_t time);
55 };
56
57 #endif // MOCKVIEWMODULE_H