1 // (c) Copyright Juergen Hunold 2016 2 // Use, modification and distribution is subject to the Boost Software 3 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 6 #define BOOST_TEST_MODULE QtWebEngineWidgets 7 8 #include <QtWebEngineWidgets> 9 10 #include <QWebEngineProfile> 11 #include <QWebEngineSettings> 12 #include <QWebEngineScript> 13 14 #include <QApplication> 15 16 #include <boost/test/unit_test.hpp> 17 BOOST_AUTO_TEST_CASE(defines)18BOOST_AUTO_TEST_CASE( defines) 19 { 20 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true); 21 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WIDGETS_LIB), true); 22 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINE_LIB), true); 23 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINECORE_LIB), true); 24 BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBENGINEWIDGETS_LIB), true); 25 } 26 27 /*! 28 Also tests the core library 29 */ BOOST_AUTO_TEST_CASE(webengine_widgets)30BOOST_AUTO_TEST_CASE( webengine_widgets ) 31 { 32 QApplication app(boost::unit_test::framework::master_test_suite().argc, 33 boost::unit_test::framework::master_test_suite().argv); 34 35 QWebEngineSettings *defaultSettings = QWebEngineSettings::globalSettings(); 36 QWebEngineProfile *defaultProfile = QWebEngineProfile::defaultProfile(); 37 38 defaultSettings->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true); 39 defaultProfile->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); 40 } 41