2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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.
19 #include <boost/test/unit_test.hpp>
21 #include "ServiceManager.h"
22 #include "PlatformInputManager.h"
24 BOOST_AUTO_TEST_SUITE(PlatformInputManager)
26 BOOST_AUTO_TEST_CASE(PointerModeSetting)
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"));
33 BOOST_REQUIRE(platformInputManager);
35 BOOST_CHECK(platformInputManager->getPointerModeEnabled());
37 platformInputManager->setPointerModeEnabled(false);
39 BOOST_CHECK(!(platformInputManager->getPointerModeEnabled()));
41 platformInputManager->setPointerModeEnabled(true);
43 BOOST_CHECK(platformInputManager->getPointerModeEnabled());
46 BOOST_AUTO_TEST_SUITE_END()