on xenial help sign in
Add Unity.Platform mock for our tests (LP: #1655336)

Approved by: Michał Sawicz

commitba5c54f92271a376e5a27ab0438f1f1aef1211ae authorLukáš Tinkl <lukas.tinkl@canonical.com> dateTue 10 Jan 2017, 14:47 (10 years ago) parent0944c511cd3d6d
4 files changed+29
tests/mocks/Unity/CMakeLists.txt+1 tests/mocks/Unity/Platform/CMakeLists.txt+1 tests/mocks/Unity/Platform/MockPlatform.qml+25 tests/mocks/Unity/Platform/qmldir+2
tests/mocks/Unity/CMakeLists.txt+1
@@ -7,6 +7,7 @@ add_subdirectory(Launcher)
77add_subdirectory(Notifications)
88add_subdirectory(DashCommunicator)
99add_subdirectory(Screens)
10+add_subdirectory(Platform)
1011
1112pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
1213pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=12)
tests/mocks/Unity/Platform/CMakeLists.txtnew file+1
@@ -0,0 +1 @@
1+add_unity8_mock(Unity.Platform 1.0 Unity/Platform)
tests/mocks/Unity/Platform/MockPlatform.qmlnew file+25
@@ -0,0 +1,25 @@
1+/*
2+ * Copyright (C) 2017 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+pragma Singleton
18+
19+import QtQuick 2.4
20+
21+QtObject {
22+ property string chassis: "desktop"
23+ property bool isPC: true
24+ property bool isMultiSession: true
25+}
tests/mocks/Unity/Platform/qmldirnew file+2
@@ -0,0 +1,2 @@
1+module Unity.Platform
2+singleton Platform 1.0 MockPlatform.qml