Removed dead code from SimpleUI
[profile/tv/apps/web/browser.git] / unit_tests / ut_PlatformInputManager.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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  */
18
19 #include <boost/test/unit_test.hpp>
20
21 #include "ServiceManager.h"
22 #include "PlatformInputManager.h"
23
24 BOOST_AUTO_TEST_SUITE(PlatformInputManager)
25
26 BOOST_AUTO_TEST_CASE(PointerModeSetting)
27 {
28      std::shared_ptr<tizen_browser::services::PlatformInputManager> platformInputManager =
29         std::dynamic_pointer_cast
30         <tizen_browser::services::PlatformInputManager,tizen_browser::core::AbstractService>
31         (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.platforminputmanager"));
32
33     BOOST_REQUIRE(platformInputManager);
34
35     BOOST_CHECK(platformInputManager->getPointerModeEnabled());
36
37     platformInputManager->setPointerModeEnabled(false);
38
39     BOOST_CHECK(!(platformInputManager->getPointerModeEnabled()));
40
41     platformInputManager->setPointerModeEnabled(true);
42
43     BOOST_CHECK(platformInputManager->getPointerModeEnabled());
44 }
45
46 BOOST_AUTO_TEST_SUITE_END()