Merge lp:~3v1n0/unity8/fake-indicators-model into lp:unity8

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2449
Merged at revision: 2647
Proposed branch: lp:~3v1n0/unity8/fake-indicators-model
Merge into: lp:unity8
Prerequisite: lp:~3v1n0/unity8/indicators-client-load-fix
Diff against target: 1251 lines (+1141/-7)
4 files modified
tests/mocks/Unity/Indicators/CMakeLists.txt (+1/-0)
tests/mocks/Unity/Indicators/IndicatorsModel.qml (+32/-7)
tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js (+1106/-0)
tests/mocks/Unity/Indicators/fakeplugin.cpp (+2/-0)
To merge this branch: bzr merge lp:~3v1n0/unity8/fake-indicators-model
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Lukáš Tinkl (community) Approve
Michał Sawicz Needs Fixing
Albert Astals Cid (community) Approve
Michael Terry Needs Fixing
Nick Dedekind Pending
Review via email: mp+297509@code.launchpad.net

Commit message

Indicators, mocks: add fake indicators menuitem to populate mocks with different menu types

Also allow to use fake indicators model in IndicatorsClient

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

Nope

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes. make tryShell (or make tryMenuContent) is enough, or this will also allow to launch indicators-client with a fake data model when QML2_IMPORT_PATH points to the mocks path (i.e. builddir/tests/mocks:builddir/tests/utils/modules:builddir/plugins)

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

No debian change here

 * If you changed the UI, has there been a design review?

No UI change, although the indicators used in mocks will show some fake data.

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2445
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1497/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1996/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2024
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1932/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1497/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

Looks like we're missing modelprinter.cpp and modelprinter.h

Revision history for this message
Michael Terry (mterry) :
review: Needs Fixing
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Looks like we're missing modelprinter.cpp and modelprinter.h

Actually they are already provided by unity8. I'm just ensuring they are added to the fake lib here.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2447
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1787/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2341
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1250
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1250
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1250
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2369
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2249/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1787/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/mocks/Unity/Indicators/IndicatorsModel.qml
1 conflicts encountered.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

And... Fixed :-)

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2448
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1903/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2479/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2507
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2386/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2386/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2386/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1903/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

* Did CI run pass? If not, please explain why.
Yes, except broken yakkety

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2448
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1928/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2521
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1357
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1357
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1357
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2549
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2430
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2430
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2430
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2423/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1928/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Failing tests:

qmltestrunner.IndicatorItemRow::test_validCurrentItem
qmltestrunner.IndicatorsBar::test_expandSelectedItem
qmltestrunner.IndicatorsMenu::test_swipeForCurrentItem
qmltestrunner.Panel::test_drag_show

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :
2448. By Marco Trevisan (Treviño)

Merging with trunk

2449. By Marco Trevisan (Treviño)

fakeindicatorsmodeldata.js: mark indicator-files always visible

This fixes tests using mocks

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Tests should run properly here... Let's wait CI confirmation.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Yup, tests work fine now, thanks!

* Did you perform an exploratory manual test run of the code change and any related functionality?

Yes

* Did CI run pass? If not, please explain why.

Nope. not yet

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2449
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2134/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2805
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1553
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1553/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1553/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2833
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2692/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2134/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/mocks/Unity/Indicators/CMakeLists.txt'
--- tests/mocks/Unity/Indicators/CMakeLists.txt 2015-03-02 14:42:27 +0000
+++ tests/mocks/Unity/Indicators/CMakeLists.txt 2016-09-08 16:44:47 +0000
@@ -16,6 +16,7 @@
16 fakeunitymenumodelcache.cpp16 fakeunitymenumodelcache.cpp
17 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/indicators.h17 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/indicators.h
18 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/menucontentactivator.cpp18 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/menucontentactivator.cpp
19 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/modelprinter.cpp
19 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/sharedunitymenumodel.cpp20 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/sharedunitymenumodel.cpp
20 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelcache.cpp21 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelcache.cpp
21 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelstack.cpp22 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelstack.cpp
2223
=== modified file 'tests/mocks/Unity/Indicators/IndicatorsModel.qml'
--- tests/mocks/Unity/Indicators/IndicatorsModel.qml 2016-07-30 16:15:23 +0000
+++ tests/mocks/Unity/Indicators/IndicatorsModel.qml 2016-09-08 16:44:47 +0000
@@ -18,6 +18,7 @@
18import Unity.Indicators 0.1 as Indicators18import Unity.Indicators 0.1 as Indicators
19import Unity.InputInfo 0.119import Unity.InputInfo 0.1
20import AccountsService 0.120import AccountsService 0.1
21import "fakeindicatorsmodeldata.js" as FakeIndicators
2122
22Indicators.FakeIndicatorsModel {23Indicators.FakeIndicatorsModel {
23 id: root24 id: root
@@ -60,7 +61,7 @@
60 }61 }
61 },62 },
62 {63 {
63 "identifier": "fake-indicator-sound",64 "identifier": "fake-indicator-files",
64 "indicatorProperties": {65 "indicatorProperties": {
65 "enabled": true,66 "enabled": true,
66 "busName": "com.canonical.indicators.fake4",67 "busName": "com.canonical.indicators.fake4",
@@ -69,7 +70,7 @@
69 }70 }
70 },71 },
71 {72 {
72 "identifier": "fake-indicator-power",73 "identifier": "fake-indicator-sound",
73 "indicatorProperties": {74 "indicatorProperties": {
74 "enabled": true,75 "enabled": true,
75 "busName": "com.canonical.indicators.fake5",76 "busName": "com.canonical.indicators.fake5",
@@ -78,7 +79,7 @@
78 }79 }
79 },80 },
80 {81 {
81 "identifier": "fake-indicator-datetime",82 "identifier": "fake-indicator-power",
82 "indicatorProperties": {83 "indicatorProperties": {
83 "enabled": true,84 "enabled": true,
84 "busName": "com.canonical.indicators.fake6",85 "busName": "com.canonical.indicators.fake6",
@@ -87,13 +88,22 @@
87 }88 }
88 },89 },
89 {90 {
90 "identifier": "fake-indicator-session",91 "identifier": "fake-indicator-datetime",
91 "indicatorProperties": {92 "indicatorProperties": {
92 "enabled": true,93 "enabled": true,
93 "busName": "com.canonical.indicators.fake7",94 "busName": "com.canonical.indicators.fake7",
94 "menuObjectPath": "/com/canonical/indicators/fake7",95 "menuObjectPath": "/com/canonical/indicators/fake7",
95 "actionsObjectPath": "/com/canonical/indicators/fake7"96 "actionsObjectPath": "/com/canonical/indicators/fake7"
96 }97 }
98 },
99 {
100 "identifier": "fake-indicator-session",
101 "indicatorProperties": {
102 "enabled": true,
103 "busName": "com.canonical.indicators.fake8",
104 "menuObjectPath": "/com/canonical/indicators/fake8",
105 "actionsObjectPath": "/com/canonical/indicators/fake8"
106 }
97 }107 }
98 ]108 ]
99109
@@ -133,21 +143,26 @@
133 "",143 "",
134 [ "image://theme/messages-new" ]));144 [ "image://theme/messages-new" ]));
135 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake4",145 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake4",
146 getUnityMenuModelData("fake-indicator-files",
147 "Files (F)",
148 "",
149 [ "image://theme/transfer-progress" ]));
150 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake5",
136 getUnityMenuModelData("fake-indicator-sound",151 getUnityMenuModelData("fake-indicator-sound",
137 "Sound (F)",152 "Sound (F)",
138 "",153 "",
139 [ "image://theme/audio-volume-high" ]));154 [ "image://theme/audio-volume-high" ]));
140 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake5",155 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake6",
141 getUnityMenuModelData("fake-indicator-power",156 getUnityMenuModelData("fake-indicator-power",
142 "Battery (F)",157 "Battery (F)",
143 "",158 "",
144 [ "image://theme/battery-020" ]));159 [ "image://theme/battery-020" ]));
145 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake6",160 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake7",
146 getUnityMenuModelData("fake-indicator-datetime",161 getUnityMenuModelData("fake-indicator-datetime",
147 "Upcoming Events (F)",162 "Upcoming Events (F)",
148 "12:04",163 "12:04",
149 []));164 []));
150 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake7",165 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake8",
151 getUnityMenuModelData("fake-indicator-session",166 getUnityMenuModelData("fake-indicator-session",
152 "System (F)",167 "System (F)",
153 "",168 "",
@@ -155,6 +170,16 @@
155 }170 }
156171
157 function getUnityMenuModelData(identifier, title, label, icons) {172 function getUnityMenuModelData(identifier, title, label, icons) {
173 var menudata = FakeIndicators.fakeMenuData[identifier];
174
175 if (menudata !== undefined) {
176 var rootState = menudata[0]["rowData"].actionState;
177 rootState.title = title;
178 rootState.label = label;
179 rootState.icons = icons;
180 return menudata;
181 }
182
158 var root = [{183 var root = [{
159 "rowData": { // 1184 "rowData": { // 1
160 "label": "",185 "label": "",
161186
=== added file 'tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js'
--- tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js 1970-01-01 00:00:00 +0000
+++ tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js 2016-09-08 16:44:47 +0000
@@ -0,0 +1,1106 @@
1var usageScenario = (typeof shell != 'undefined') ? shell.usageScenario : "desktop";
2
3var fakeMenuData = {
4 "fake-indicator-messages": [
5 {
6 "rowData": {
7 "action": "indicator._header",
8 "actionState": {
9 "icons": [ "image://theme/messages-new" ],
10 "label": "",
11 "title": "Messages (F)",
12 "visible": true
13 },
14 "icon": "",
15 "isCheck": false,
16 "isRadio": false,
17 "isSeparator": false,
18 "isToggled": false,
19 "label": "",
20 "sensitive": true,
21 "type": "com.canonical.indicator.root"
22 },
23 "submenu": [
24 {
25 "rowData": {
26 "label": "There's an updated system image.",
27 "sensitive": true,
28 "isSeparator": false,
29 "icon": "file:///usr/share/ubuntu/settings/system/icons/settings-system-update.svg",
30 "type": "com.canonical.indicator.messages.messageitem",
31 "ext": {
32 "icon": "file:///usr/share/ubuntu/settings/system/icons/settings-system-update.svg",
33 "xCanonicalAppIcon": "file:///usr/share/ubuntu/settings/system/system-settings.png",
34 "xCanonicalMessageActions": null,
35 "xCanonicalText": "Tap to open the system updater.",
36 "xCanonicalTime": ((new Date).getTime() - 350 * 1000) * 1000,
37 },
38 "action": "indicator.ubuntu-system-settings",
39 "actionState": {},
40 "isCheck": false,
41 "isRadio": false,
42 "isToggled": false,
43 }
44 },
45 {
46 "rowData": {
47 "action": "indicator.telephony-service-sms.msg.MSG_ID",
48 "actionState": {},
49 "ext": {},
50 "icon": "file:///usr/share/telephony-service/assets/avatar-default@18.png",
51 "type": "com.canonical.indicator.messages.messageitem",
52 "ext": {
53 "icon": "file:///usr/share/telephony-service/assets/avatar-default@18.png",
54 "xCanonicalAppIcon": "image://theme/telephony-service-message",
55 "xCanonicalMessageActions": "",
56 "xCanonicalText": "This is a message sent to an awesome Ubuntu phone.",
57 "xCanonicalTime": ((new Date).getTime() - 35 * 1000) * 1000
58 },
59 "isCheck": false,
60 "isRadio": false,
61 "isSeparator": false,
62 "isToggled": false,
63 "label": "+44391234567 - [SIM 1]",
64 "sensitive": true
65 }
66 },
67 {
68 "rowData": {
69 "action": "indicator.remove-all",
70 "actionState": {},
71 "ext": {},
72 "icon": "",
73 "isCheck": false,
74 "isRadio": false,
75 "isSeparator": false,
76 "isToggled": false,
77 "label": "Clear All",
78 "sensitive": true,
79 "type": "com.canonical.indicator.button"
80 }
81 },
82 ]
83 }
84 ],
85
86 "fake-indicator-session": [
87 {
88 "rowData": {
89 "action": "indicator._header",
90 "actionState": {
91 "icons": [],
92 "label": "",
93 "title": "Session (F)",
94 "visible": usageScenario == "desktop"
95 },
96 "icon": "",
97 "isCheck": false,
98 "isRadio": false,
99 "isSeparator": false,
100 "isToggled": false,
101 "label": "",
102 "sensitive": true,
103 "type": "com.canonical.indicator.root"
104 },
105 "submenu": [
106 {
107 "rowData": {
108 "action": "indicator.about",
109 "actionState": {},
110 "ext": {},
111 "icon": "",
112 "isCheck": false,
113 "isRadio": false,
114 "isSeparator": false,
115 "isToggled": false,
116 "label": "About this " + usageScenario,
117 "sensitive": true,
118 "type": ""
119 }
120 },
121 {
122 "rowData": {
123 "action": "indicator.help",
124 "actionState": {},
125 "ext": {},
126 "icon": "",
127 "isCheck": false,
128 "isRadio": false,
129 "isSeparator": false,
130 "isToggled": false,
131 "label": "Ubuntu Help",
132 "sensitive": true,
133 "type": ""
134 }
135 },
136 {
137 "rowData": {
138 "action": "",
139 "actionState": {},
140 "ext": {},
141 "icon": "",
142 "isCheck": false,
143 "isRadio": false,
144 "isSeparator": true,
145 "isToggled": false,
146 "label": "",
147 "sensitive": true,
148 "type": ""
149 }
150 },
151 {
152 "rowData": {
153 "action": "indicator.settings",
154 "actionState": {},
155 "ext": {},
156 "icon": "",
157 "isCheck": false,
158 "isRadio": false,
159 "isSeparator": false,
160 "isToggled": false,
161 "label": "System Settings...",
162 "sensitive": true,
163 "type": ""
164 }
165 },
166 {
167 "rowData": {
168 "action": "",
169 "actionState": {},
170 "ext": {},
171 "icon": "",
172 "isCheck": false,
173 "isRadio": false,
174 "isSeparator": true,
175 "isToggled": false,
176 "label": "",
177 "sensitive": true,
178 "type": ""
179 }
180 },
181 {
182 "rowData": {
183 "action": "indicator.switch-to-screensaver",
184 "actionState": {},
185 "ext": {},
186 "icon": "",
187 "isCheck": false,
188 "isRadio": false,
189 "isSeparator": false,
190 "isToggled": false,
191 "label": "Lock",
192 "sensitive": true,
193 "type": ""
194 }
195 },
196 {
197 "rowData": {
198 "action": "indicator.switch-to-guest",
199 "actionState": {},
200 "ext": {},
201 "icon": "",
202 "isCheck": false,
203 "isRadio": false,
204 "isSeparator": false,
205 "isToggled": false,
206 "label": "Guest Session",
207 "sensitive": true,
208 "type": "indicator.guest-menu-item"
209 }
210 },
211 {
212 "rowData": {
213 "action": "indicator.switch-to-user",
214 "actionState": {},
215 "ext": {},
216 "icon": "",
217 "isCheck": false,
218 "isRadio": true,
219 "isSeparator": false,
220 "isToggled": false,
221 "label": "Marco",
222 "sensitive": true,
223 "type": "indicator.user-menu-item"
224 }
225 },
226 {
227 "rowData": {
228 "action": "indicator.switch-to-user",
229 "actionState": {},
230 "ext": {},
231 "icon": "",
232 "isCheck": false,
233 "isRadio": true,
234 "isSeparator": false,
235 "isToggled": false,
236 "label": "Unity8",
237 "sensitive": true,
238 "type": "indicator.user-menu-item"
239 }
240 },
241 {
242 "rowData": {
243 "action": "",
244 "actionState": {},
245 "ext": {},
246 "icon": "",
247 "isCheck": false,
248 "isRadio": false,
249 "isSeparator": true,
250 "isToggled": false,
251 "label": "",
252 "sensitive": true,
253 "type": ""
254 }
255 },
256 {
257 "rowData": {
258 "action": "indicator.logout",
259 "actionState": {},
260 "ext": {},
261 "icon": "",
262 "isCheck": false,
263 "isRadio": false,
264 "isSeparator": false,
265 "isToggled": false,
266 "label": "Logout...",
267 "sensitive": true,
268 "type": ""
269 }
270 },
271 {
272 "rowData": {
273 "action": "",
274 "actionState": {},
275 "ext": {},
276 "icon": "",
277 "isCheck": false,
278 "isRadio": false,
279 "isSeparator": true,
280 "isToggled": false,
281 "label": "",
282 "sensitive": true,
283 "type": ""
284 }
285 },
286 {
287 "rowData": {
288 "action": "indicator.suspend",
289 "actionState": {},
290 "ext": {},
291 "icon": "",
292 "isCheck": false,
293 "isRadio": false,
294 "isSeparator": false,
295 "isToggled": false,
296 "label": "Suspend",
297 "sensitive": true,
298 "type": ""
299 }
300 },
301 {
302 "rowData": {
303 "action": "indicator.power-off",
304 "actionState": {},
305 "ext": {},
306 "icon": "",
307 "isCheck": false,
308 "isRadio": false,
309 "isSeparator": false,
310 "isToggled": false,
311 "label": "Power off...",
312 "sensitive": true,
313 "type": ""
314 }
315 }
316 ]
317 }
318 ],
319
320 "fake-indicator-power": [
321 {
322 "rowData": {
323 "action": "indicator._header",
324 "actionState": {
325 "icons": [ "image://theme/battery-020" ],
326 "label": "",
327 "title": "Battery (F)",
328 "visible": true
329 },
330 "icon": "",
331 "isCheck": false,
332 "isRadio": false,
333 "isSeparator": false,
334 "isToggled": false,
335 "label": "",
336 "sensitive": true,
337 "type": "com.canonical.indicator.root"
338 },
339 "submenu": [
340 {
341 "rowData": {
342 "action": "indicator.activate-statistics",
343 "actionState": {},
344 "ext": {},
345 "icon": "image://theme/battery-full-charged-symbolic",
346 "isCheck": false,
347 "isRadio": false,
348 "isSeparator": false,
349 "isToggled": false,
350 "label": "Battery (full charged)",
351 "sensitive": true,
352 "type": "com.canonical.indicator.basic"
353 }
354 },
355 {
356 "rowData": {
357 "action": "indicator.activate-statistics",
358 "actionState": {},
359 "ext": {},
360 "icon": "image://theme/battery-100",
361 "isCheck": false,
362 "isRadio": false,
363 "isSeparator": false,
364 "isToggled": false,
365 "label": "Battery",
366 "sensitive": true,
367 "type": "com.canonical.indicator.basic"
368 }
369 },
370 {
371 "rowData": {
372 "action": "",
373 "actionState": {},
374 "ext": {},
375 "icon": "",
376 "isCheck": false,
377 "isRadio": false,
378 "isSeparator": true,
379 "isToggled": false,
380 "label": " ",
381 "sensitive": true,
382 "type": ""
383 }
384 },
385 {
386 "rowData": {
387 "action": "indicator.show-time",
388 "actionState": false,
389 "ext": {},
390 "icon": "",
391 "isCheck": true,
392 "isRadio": false,
393 "isSeparator": false,
394 "isToggled": false,
395 "label": "Show time on menubar",
396 "sensitive": true,
397 "type": ""
398 }
399 },
400 {
401 "rowData": {
402 "action": "indicator.show-percentage",
403 "actionState": false,
404 "ext": {},
405 "icon": "",
406 "isCheck": true,
407 "isRadio": false,
408 "isSeparator": false,
409 "isToggled": false,
410 "label": "Show percentage on menubar",
411 "sensitive": true,
412 "type": ""
413 }
414 },
415 {
416 "rowData": {
417 "action": "indicator.activate-settings",
418 "actionState": {},
419 "ext": {},
420 "icon": "",
421 "isCheck": false,
422 "isRadio": false,
423 "isSeparator": false,
424 "isToggled": false,
425 "label": "Power Settings...",
426 "sensitive": true,
427 "type": ""
428 }
429 }
430 ]
431 }
432 ],
433
434 "fake-indicator-sound": [
435 {
436 "rowData": {
437 "action": "indicator._header",
438 "actionState": {
439 "icons": [ "image://theme/audio-volume-high" ],
440 "label": "",
441 "title": "Sound (F)",
442 "visible": true
443 },
444 "icon": "",
445 "isCheck": false,
446 "isRadio": false,
447 "isSeparator": false,
448 "isToggled": false,
449 "label": "",
450 "sensitive": true,
451 "type": "com.canonical.indicator.root"
452 },
453 "submenu": [
454 {
455 "rowData": {
456 "action": "indicator.silent-mode",
457 "actionState": true,
458 "ext": {},
459 "icon": "",
460 "isCheck": true,
461 "isRadio": false,
462 "isSeparator": false,
463 "isToggled": false,
464 "label": "Silent Mode",
465 "sensitive": true,
466 "type": "com.canonical.indicator.switch"
467 }
468 },
469 {
470 "rowData": {
471 "action": "indicator.volume",
472 "actionState": 0.35,
473 "ext": {
474 "maxIcon": "image://theme/audio-volume-high-panel",
475 "maxValue": 1,
476 "minIcon": "image://theme/audio-volume-low-zero-panel",
477 "minValue": 0,
478 "xCanonicalSyncAction": "indicator.volume-sync"
479 },
480 "icon": "",
481 "isCheck": false,
482 "isRadio": true,
483 "isSeparator": false,
484 "isToggled": false,
485 "label": "Volume",
486 "sensitive": true,
487 "type": "com.canonical.unity.slider"
488 }
489 },
490 {
491 "rowData": {
492 "action": "",
493 "actionState": {},
494 "ext": {},
495 "icon": "",
496 "isCheck": false,
497 "isRadio": false,
498 "isSeparator": true,
499 "isToggled": false,
500 "label": "",
501 "sensitive": true,
502 "type": ""
503 }
504 },
505 {
506 "rowData": {
507 "action": "indicator.mediaplayer-app.desktop",
508 "actionState": {
509 "running": true,
510 "state": "Stopped"
511 },
512 "ext": {},
513 "icon": "file:///usr/share/mediaplayer-app/mediaplayer-app.png",
514 "isCheck": false,
515 "isRadio": false,
516 "isSeparator": false,
517 "isToggled": false,
518 "label": "Media Player",
519 "sensitive": false,
520 "type": "com.canonical.unity.media-player"
521 }
522 },
523 {
524 "rowData": {
525 "actionState": {},
526 "ext": {
527 "action": ""
528 },
529 "icon": "",
530 "isCheck": false,
531 "isRadio": false,
532 "isSeparator": false,
533 "isToggled": false,
534 "label": "",
535 "sensitive": true,
536 "type": "com.canonical.unity.playback-item"
537 }
538 },
539 {
540 "rowData": {
541 "action": "indicator.phone-settings",
542 "actionState": {},
543 "ext": {},
544 "icon": "",
545 "isCheck": false,
546 "isRadio": false,
547 "isSeparator": false,
548 "isToggled": false,
549 "label": "Sound Settings…",
550 "sensitive": true,
551 "type": ""
552 }
553 }
554 ]
555 }
556 ],
557
558
559 "fake-indicator-datetime": [
560 {
561 "rowData": {
562 "action": "indicator._header",
563 "actionState": {
564 "icons": [],
565 "label": "16.10",
566 "title": "Upcoming Events (F)",
567 "visible": true
568 },
569 "icon": "",
570 "isCheck": false,
571 "isRadio": false,
572 "isSeparator": false,
573 "isToggled": false,
574 "label": "",
575 "sensitive": true,
576 "type": "com.canonical.indicator.root"
577 },
578 "submenu": [
579 {
580 "rowData": {
581 "action": "indicator.phone.open-calendar-app",
582 "actionState": {},
583 "ext": {},
584 "icon": "image://theme/calendar",
585 "isCheck": false,
586 "isRadio": false,
587 "isSeparator": false,
588 "isToggled": false,
589 "label": "Saturday, 31 December 2016",
590 "sensitive": true,
591 "type": ""
592 }
593 },
594 {
595 "rowData": {
596 "action": "",
597 "actionState": {},
598 "ext": {},
599 "icon": "fake-indicator-datetime",
600 "isCheck": false,
601 "isRadio": false,
602 "isSeparator": true,
603 "isToggled": false,
604 "label": "",
605 "sensitive": true,
606 "type": ""
607 }
608 },
609 {
610 "rowData": {
611 "action": "indicator.phone.open-alarm-app",
612 "actionState": {},
613 "ext": {},
614 "icon": "image://theme/clock",
615 "isCheck": false,
616 "isRadio": false,
617 "isSeparator": false,
618 "isToggled": false,
619 "label": "Clock",
620 "sensitive": true,
621 "type": ""
622 }
623 },
624 {
625 "rowData": {
626 "action": "indicator.phone.open-appointment",
627 "actionState": {},
628 "ext": {
629 "xCanonicalColor": Qt.rgba(32,74,135,1),
630 "xCanonicalTime": (new Date).getTime() / 1000 + 35000
631 },
632 "icon": "",
633 "isCheck": false,
634 "isRadio": false,
635 "isSeparator": false,
636 "isToggled": false,
637 "label": "Finish Indicator mocks",
638 "sensitive": true,
639 "type": "com.canonical.indicator.appointment"
640 }
641 },
642 {
643 "rowData": {
644 "action": "indicator.phone.open-appointment",
645 "actionState": {},
646 "ext": {
647 "xCanonicalColor": Qt.rgba(32,74,135,1),
648 "xCanonicalTime": (new Date).getTime() / 1000 + 50474
649 },
650 "icon": "",
651 "isCheck": false,
652 "isRadio": false,
653 "isSeparator": false,
654 "isToggled": false,
655 "label": "Implement Desktop version",
656 "sensitive": true,
657 "type": "com.canonical.indicator.appointment"
658 }
659 },
660 {
661 "rowData": {
662 "action": "indicator.phone.open-appointment",
663 "actionState": {},
664 "ext": {
665 "xCanonicalColor": Qt.rgba(32,74,135,1),
666 "xCanonicalTime": (new Date).getTime() / 1000 + 385000
667 },
668 "icon": "",
669 "isCheck": false,
670 "isRadio": false,
671 "isSeparator": false,
672 "isToggled": false,
673 "label": "Ubuntu drinks event",
674 "sensitive": true,
675 "type": "com.canonical.indicator.appointment"
676 }
677 },
678 {
679 "rowData": {
680 "action": "indicator.phone.open-appointment",
681 "actionState": {},
682 "ext": {
683 "xCanonicalColor": Qt.rgba(32,74,135,1),
684 "xCanonicalTime": (new Date).getTime() / 1000 + 3500050
685 },
686 "icon": "",
687 "isCheck": false,
688 "isRadio": false,
689 "isSeparator": false,
690 "isToggled": false,
691 "label": "Land unity8",
692 "sensitive": true,
693 "type": "com.canonical.indicator.appointment"
694 }
695 },
696 {
697 "rowData": {
698 "action": "",
699 "actionState": {},
700 "ext": {},
701 "icon": "",
702 "isCheck": false,
703 "isRadio": false,
704 "isSeparator": true,
705 "isToggled": false,
706 "label": "",
707 "sensitive": true,
708 "type": ""
709 }
710 },
711 {
712 "rowData": {
713 "action": "indicator.phone.open-settings-app",
714 "actionState": {},
715 "ext": {},
716 "icon": "",
717 "isCheck": false,
718 "isRadio": false,
719 "isSeparator": false,
720 "isToggled": false,
721 "label": "Date and Time settings…",
722 "sensitive": true,
723 "type": ""
724 }
725 }
726 ]
727 }
728 ],
729
730
731 "fake-indicator-files": [
732 {
733 "rowData": {
734 "action": "indicator._header",
735 "actionState": {
736 "icons": [],
737 "label": "Files",
738 "title": "Files",
739 "visible": true
740 },
741 "icon": "",
742 "isCheck": false,
743 "isRadio": false,
744 "isSeparator": false,
745 "isToggled": false,
746 "label": "",
747 "sensitive": true,
748 "type": "com.canonical.indicator.root"
749 },
750 "submenu": [
751 {
752 "rowData": {
753 "action": "indicator.pause-all",
754 "actionState": {},
755 "ext": {
756 "xCanonicalExtraLabel": "Pause all"
757 },
758 "icon": "",
759 "isCheck": false,
760 "isRadio": false,
761 "isSeparator": false,
762 "isToggled": false,
763 "label": "",
764 "sensitive": true,
765 "type": "com.canonical.indicator.button-section"
766 }
767 },
768 {
769 "rowData": {
770 "action": "indicator.activate-transfer",
771 "actionState": {},
772 "ext": {
773 "xCanonicalUid": 1003
774 },
775 "icon": "file:///usr/share/webbrowser-app/webbrowser-app.png",
776 "isCheck": false,
777 "isRadio": false,
778 "isSeparator": false,
779 "isToggled": false,
780 "label": "Ubuntu daily.iso",
781 "sensitive": true,
782 "type": "com.canonical.indicator.transfer"
783 }
784 },
785 {
786 "rowData": {
787 "action": "",
788 "actionState": {},
789 "ext": {},
790 "icon": "",
791 "isCheck": false,
792 "isRadio": false,
793 "isSeparator": true,
794 "isToggled": false,
795 "label": "",
796 "sensitive": true,
797 "type": ""
798 }
799 },
800 {
801 "rowData": {
802 "action": "indicator.clear-all",
803 "actionState": {},
804 "ext": {
805 "xCanonicalExtraLabel": "Clear all"
806 },
807 "icon": "",
808 "isCheck": false,
809 "isRadio": false,
810 "isSeparator": false,
811 "isToggled": false,
812 "label": "Successful Transfers",
813 "sensitive": true,
814 "type": "com.canonical.indicator.button-section"
815 }
816 },
817 {
818 "rowData": {
819 "action": "indicator.activate-transfer",
820 "actionState": {},
821 "ext": {
822 "xCanonicalUid": 1002
823 },
824 "icon": "file:///usr/share/webbrowser-app/webbrowser-app.png",
825 "isCheck": false,
826 "isRadio": false,
827 "isSeparator": false,
828 "isToggled": false,
829 "label": "Ubuntu Guide.pdf",
830 "sensitive": true,
831 "type": "com.canonical.indicator.transfer"
832 }
833 },
834 {
835 "rowData": {
836 "action": "indicator.activate-transfer",
837 "actionState": {},
838 "ext": {
839 "xCanonicalUid": 1001
840 },
841 "icon": "file:///usr/share/webbrowser-app/webbrowser-app.png",
842 "isCheck": false,
843 "isRadio": false,
844 "isSeparator": false,
845 "isToggled": false,
846 "label": "Unity8 Hacking.pdf",
847 "sensitive": true,
848 "type": "com.canonical.indicator.transfer"
849 }
850 }
851 ]
852 }
853 ],
854
855 "fake-indicator-network": [
856 {
857 "rowData": {
858 "action": "indicator._header",
859 "actionState": {
860 "icons": [],
861 "label": "",
862 "title": "Network",
863 "visible": true
864 },
865 "icon": "",
866 "isCheck": false,
867 "isRadio": false,
868 "isSeparator": false,
869 "isToggled": false,
870 "label": "",
871 "sensitive": true,
872 "type": "com.canonical.indicator.root"
873 },
874 "submenu": [
875 {
876 "rowData": {
877 "action": "indicator.airplane.enabled",
878 "actionState": false,
879 "ext": {},
880 "icon": "",
881 "isCheck": true,
882 "isRadio": false,
883 "isSeparator": false,
884 "isToggled": false,
885 "label": "Flight Mode",
886 "sensitive": true,
887 "type": "com.canonical.indicator.switch"
888 }
889 },
890 /* Anything to see here, since no fake modem actions are implemented
891 {
892 "rowData": {
893 "actionState": false,
894 "ext": {},
895 "icon": "",
896 "isCheck": false,
897 "isRadio": false,
898 "isSeparator": true,
899 "isToggled": false,
900 "label": "",
901 "sensitive": true,
902 "type": ""
903 }
904 },
905 {
906 "rowData": {
907 "actionState": false,
908 "ext": {
909 "xCanonicalModemConnectivityIconAction": "indicator.modem.1::connectivity-icon",
910 "xCanonicalModemLockedAction": "indicator.modem.1::locked",
911 "xCanonicalModemRoamingAction": "indicator.modem.1::roaming",
912 "xCanonicalModemSimIdentifierLabelAction": "indicator.modem.1::sim-identifier-label",
913 "xCanonicalModemStatusIconAction": "indicator.modem.1::status-icon",
914 "xCanonicalModemStatusLabelAction": "indicator.modem.1::status-label"
915 },
916 "icon": "",
917 "isCheck": false,
918 "isRadio": false,
919 "isSeparator": false,
920 "isToggled": false,
921 "label": "",
922 "sensitive": true,
923 "type": "com.canonical.indicator.network.modeminfoitem",
924 "visible": false
925 }
926 },
927 */
928 {
929 "rowData": {
930 "action": "indicator.wifi.enable",
931 "actionState": true,
932 "ext": {},
933 "icon": "",
934 "isCheck": true,
935 "isRadio": false,
936 "isSeparator": false,
937 "isToggled": true,
938 "label": "Wi-Fi",
939 "sensitive": true,
940 "type": "com.canonical.indicator.switch"
941 }
942 },
943 {
944 "rowData": {
945 "action": "",
946 "actionState": {},
947 "ext": {},
948 "icon": "",
949 "isCheck": false,
950 "isRadio": false,
951 "isSeparator": true,
952 "isToggled": false,
953 "label": "",
954 "sensitive": true,
955 "type": ""
956 }
957 },
958 {
959 "rowData": {
960 "action": "indicator.accesspoint.1",
961 "actionState": true,
962 "ext": {
963 "xCanonicalWifiApIsAdhoc": 0,
964 "xCanonicalWifiApIsSecure": 1,
965 "xCanonicalWifiApStrengthAction": "indicator.accesspoint.1::strength"
966 },
967 "icon": "",
968 "isCheck": true,
969 "isRadio": false,
970 "isSeparator": false,
971 "isToggled": true,
972 "label": "Canonical",
973 "sensitive": true,
974 "type": "unity.widgets.systemsettings.tablet.accesspoint"
975 }
976 },
977 {
978 "rowData": {
979 "action": "indicator.accesspoint.2",
980 "actionState": false,
981 "ext": {
982 "xCanonicalWifiApIsAdhoc": 0,
983 "xCanonicalWifiApIsSecure": 1,
984 "xCanonicalWifiApStrengthAction": "indicator.accesspoint.2::strength"
985 },
986 "icon": "",
987 "isCheck": true,
988 "isRadio": false,
989 "isSeparator": false,
990 "isToggled": false,
991 "label": "Ubuntu",
992 "sensitive": true,
993 "type": "unity.widgets.systemsettings.tablet.accesspoint"
994 }
995 },
996 {
997 "rowData": {
998 "action": "indicator.accesspoint.3",
999 "actionState": false,
1000 "ext": {
1001 "xCanonicalWifiApIsAdhoc": 0,
1002 "xCanonicalWifiApIsSecure": 0,
1003 "xCanonicalWifiApStrengthAction": "indicator.accesspoint.3::strength"
1004 },
1005 "icon": "",
1006 "isCheck": true,
1007 "isRadio": false,
1008 "isSeparator": false,
1009 "isToggled": false,
1010 "label": "Linux",
1011 "sensitive": true,
1012 "type": "unity.widgets.systemsettings.tablet.accesspoint"
1013 }
1014 },
1015 {
1016 "rowData": {
1017 "action": "indicator.accesspoint.4",
1018 "actionState": false,
1019 "ext": {
1020 "xCanonicalWifiApIsAdhoc": 0,
1021 "xCanonicalWifiApIsSecure": 0,
1022 "xCanonicalWifiApStrengthAction": "indicator.accesspoint.4::strength"
1023 },
1024 "icon": "",
1025 "isCheck": true,
1026 "isRadio": false,
1027 "isSeparator": false,
1028 "isToggled": false,
1029 "label": "for Human Beings",
1030 "sensitive": true,
1031 "type": "unity.widgets.systemsettings.tablet.accesspoint"
1032 }
1033 },
1034 {
1035 "rowData": {
1036 "action": "indicator.wifi.settings",
1037 "actionState": {},
1038 "ext": {},
1039 "icon": "",
1040 "isCheck": false,
1041 "isRadio": false,
1042 "isSeparator": false,
1043 "isToggled": false,
1044 "label": "Wi-Fi settings…",
1045 "sensitive": true,
1046 "type": ""
1047 }
1048 }
1049 ]
1050 }
1051 ],
1052
1053 "fake-indicator-bluetooth": [
1054 {
1055 "rowData": {
1056 "action": "indicator._header",
1057 "actionState": {
1058 "icons": [],
1059 "label": "",
1060 "title": "Network",
1061 "visible": true
1062 },
1063 "icon": "",
1064 "isCheck": false,
1065 "isRadio": false,
1066 "isSeparator": false,
1067 "isToggled": false,
1068 "label": "",
1069 "sensitive": true,
1070 "type": "com.canonical.indicator.root"
1071 },
1072 "submenu": [
1073 {
1074 "rowData": {
1075 "action": "indicator.bluetooth.enable",
1076 "actionState": true,
1077 "ext": {},
1078 "icon": "",
1079 "isCheck": true,
1080 "isRadio": false,
1081 "isSeparator": false,
1082 "isToggled": true,
1083 "label": "Bluetooth",
1084 "sensitive": true,
1085 "type": "com.canonical.indicator.switch"
1086 }
1087 },
1088 {
1089 "rowData": {
1090 "action": "indicator.bluetooth.settings",
1091 "actionState": {},
1092 "ext": {},
1093 "icon": "",
1094 "isCheck": false,
1095 "isRadio": false,
1096 "isSeparator": false,
1097 "isToggled": false,
1098 "label": "Bluetooth settings…",
1099 "sensitive": true,
1100 "type": ""
1101 }
1102 }
1103 ]
1104 }
1105 ]
1106}
01107
=== modified file 'tests/mocks/Unity/Indicators/fakeplugin.cpp'
--- tests/mocks/Unity/Indicators/fakeplugin.cpp 2015-01-20 16:21:07 +0000
+++ tests/mocks/Unity/Indicators/fakeplugin.cpp 2016-09-08 16:44:47 +0000
@@ -29,6 +29,7 @@
29#include "sharedunitymenumodel.h"29#include "sharedunitymenumodel.h"
30#include "fakeunitymenumodelcache.h"30#include "fakeunitymenumodelcache.h"
31#include "unitymenumodelstack.h"31#include "unitymenumodelstack.h"
32#include "modelprinter.h"
3233
33#include <unitymenumodel.h>34#include <unitymenumodel.h>
3435
@@ -49,6 +50,7 @@
49 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");50 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
50 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");51 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
51 qmlRegisterType<SharedUnityMenuModel>(uri, 0, 1, "SharedUnityMenuModel");52 qmlRegisterType<SharedUnityMenuModel>(uri, 0, 1, "SharedUnityMenuModel");
53 qmlRegisterType<ModelPrinter>(uri, 0, 1, "ModelPrinter");
5254
53 qmlRegisterSingletonType<FakeUnityMenuModelCache>(uri, 0, 1, "UnityMenuModelCache", menuModelCacheSingleton);55 qmlRegisterSingletonType<FakeUnityMenuModelCache>(uri, 0, 1, "UnityMenuModelCache", menuModelCacheSingleton);
5456

Subscribers

People subscribed via source and target branches