Kaydet (Commit) d5c3f1bf authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: add groundwork for ui testing framework

Change-Id: I51b81da870fd220d56b32c20b9e6c4604912a014
üst af5b0086
......@@ -486,6 +486,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
testtools_cppobj \
testtools_bridgetest \
testtools_constructors \
uitest \
unobootstrapprotector \
unoexceptionprotector \
unotest \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <rtl/ustring.hxx>
#include <map>
enum class UIObjectType
{
DIALOG,
UNKNOWN
};
/**
* This class wraps a UI object like vcl::Window and provides
* an interface for the UI testing.
*
* This class should only have virtual methods.
*/
class UIObject
{
public:
virtual ~UIObject();
/**
* returns the state of the wrapped UI object
*/
virtual std::map<const OUString, OUString> get_state();
/**
* executes an action on the wrapped UI object,
* possibly with some additional parameters
*/
virtual void execute(const OUString& rAction,
const std::map<const OUString, OUString>& rParameters);
virtual UIObjectType getType();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,uitest))
$(eval $(call gb_Library_add_defs,uitest,\
-DOOO_DLLIMPLEMENTATION_UITEST \
))
$(eval $(call gb_Library_use_sdk_api,uitest))
$(eval $(call gb_Library_use_externals,uitest,\
boost_headers \
cppunit \
libxml2 \
))
$(eval $(call gb_Library_use_libraries,uitest,\
basegfx \
comphelper \
cppu \
cppuhelper \
drawinglayer \
i18nlangtag \
sal \
svt \
tl \
unotest \
utl \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_exception_objects,uitest,\
test/source/uitest/uitest \
test/source/uitest/uiobject \
))
# vim: set noet sw=4 ts=4:
......@@ -14,6 +14,7 @@ ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,test,\
Library_test \
Library_subsequenttest \
Library_uitest \
Library_vclbootstrapprotector \
Package_unittest \
))
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <test/uiobject.hxx>
UIObject::~UIObject()
{
}
std::map<const OUString, OUString> UIObject::get_state()
{
std::map<const OUString, OUString> aMap;
aMap["NotImplemented"] = "NotImplemented";
return aMap;
}
void UIObject::execute(const OUString& /*rAction*/,
const std::map<const OUString, OUString>& /*rParameters*/)
{
// should never be called
throw std::exception();
}
UIObjectType UIObject::getType()
{
return UIObjectType::UNKNOWN;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <test/uitest.hxx>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment