]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/qt5/qtwebenginewidgets.cpp
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.txt or copy at
4 // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 #define BOOST_TEST_MODULE QtWebEngineWidgets
8 #include <QtWebEngineWidgets>
10 #include <QWebEngineProfile>
11 #include <QWebEngineSettings>
12 #include <QWebEngineScript>
14 #include <QApplication>
16 #include <boost/test/unit_test.hpp>
18 BOOST_AUTO_TEST_CASE( defines
)
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);
28 Also tests the core library
30 BOOST_AUTO_TEST_CASE( webengine_widgets
)
32 QApplication
app(boost::unit_test::framework::master_test_suite().argc
,
33 boost::unit_test::framework::master_test_suite().argv
);
35 QWebEngineSettings
*defaultSettings
= QWebEngineSettings::globalSettings();
36 QWebEngineProfile
*defaultProfile
= QWebEngineProfile::defaultProfile();
38 defaultSettings
->setAttribute(QWebEngineSettings::FullScreenSupportEnabled
, true);
39 defaultProfile
->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies
);