on xenial help sign in
Add Unity.Platform mock for our tests (LP: #1655336)
ba5c54fLukáš Tinkl
tests/mocks/Unity/CMakeLists.txt+1
@@ -7,6 +7,7 @@ add_subdirectory(Launcher)
7add_subdirectory(Notifications)
7add_subdirectory(Notifications)
8add_subdirectory(DashCommunicator)
8add_subdirectory(DashCommunicator)
9add_subdirectory(Screens)
9add_subdirectory(Screens)
10+add_subdirectory(Platform)
10
11
11pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
12pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
12pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=12)
13pkg_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