2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @author Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
20 * @date 09/13/2011 08:24:44 AM
24 #ifndef WRTPLUGINS_W3C_TEST_H_
25 #define WRTPLUGINS_W3C_TEST_H_
28 #include <dpl/generic_event.h>
29 #include <dpl/event/controller.h>
30 #include <dpl/type_list.h>
31 #include <JavaScriptCore/JavaScript.h>
33 namespace WrtPlugins {
36 DECLARE_GENERIC_EVENT_0(FinishEvent)
38 class Test : public DPL::Event::Controller<DPL::TypeListDecl<FinishEvent>::Type> {
42 void run(double timeout = 0.0);
43 void setEvaluator(JSObjectRef evaluator);
44 void setContext(JSContextRef context);
47 void OnEventReceived(const FinishEvent& event);
57 std::string resultToString(Result result);
60 JSContextRef m_context;
61 JSObjectRef m_evaluator;