diff options
author | DUI-Team Symbio <dui-team@fi.symbio.com> | 2010-03-04 15:44:40 +0200 |
---|---|---|
committer | DUI-Team Symbio <dui-team@fi.symbio.com> | 2010-03-04 15:44:40 +0200 |
commit | 622af4c93e6d5bffd3ba966cc0c8ee4ad9ee53a9 (patch) | |
tree | 51912e842f8241ec12efc9446577ebcbb8cac73f /tests/ut_duivideowidget/ut_duivideowidget.h | |
parent | 1a8dda5171e6e68819d7c4c81f2892c390322480 (diff) |
Changes: Added unit test for DuiVideoWidget.
RevBy: TrustMe
Diffstat (limited to 'tests/ut_duivideowidget/ut_duivideowidget.h')
-rw-r--r-- | tests/ut_duivideowidget/ut_duivideowidget.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/tests/ut_duivideowidget/ut_duivideowidget.h b/tests/ut_duivideowidget/ut_duivideowidget.h new file mode 100644 index 00000000..a41e8acd --- /dev/null +++ b/tests/ut_duivideowidget/ut_duivideowidget.h @@ -0,0 +1,67 @@ +/*************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (directui@nokia.com) +** +** This file is part of libdui. +** +** If you have questions regarding the use of this file, please contact +** Nokia at directui@nokia.com. +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation +** and appearing in the file LICENSE.LGPL included in the packaging +** of this file. +** +****************************************************************************/ + +#ifndef _ut_duivideowidget_ +#define _ut_duivideowidget_ + +#include <QtTest/QtTest> +#include <QObject> + +#include <duiapplication.h> +#include <duivideowidget.h> + +Q_DECLARE_METATYPE(DuiVideoWidget *); + +class ut_duivideowidget: public QObject +{ + Q_OBJECT; + +public: + ut_duivideowidget(); + virtual ~ut_duivideowidget(); + +private: + + DuiVideoWidget *m_subject; + DuiApplication *app; + + + bool waitVideoReady(int msec=1000); + bool waitPositionChange(int msec=1000); + bool waitPositionFreeze(int msec=1000); + bool ready; +public slots: + + void videoReady(); + +private slots: + + void init(); + void cleanup(); + void initTestCase(); + void cleanupTestCase(); + + void testInitialState(); + void testBogusOpen(); + void testOpen(); + void testPlayback(); + void testVolumeControl(); + void testPositionControl(); +}; +#endif |