on xenial help sign in
added test for lp1328646
commit821f5d272282d1556598f56f8fbc17a81e8bc623 authorNick Dedekind <nicholas.dedekind@gmail.com> dateTue 19 Aug 2014, 12:13 (12 years ago) parent74f208a
1 file changed+28
tests/qmltests/Panel/Indicators/tst_CachedUnityMenuModel.qml+28
tests/qmltests/Panel/Indicators/tst_CachedUnityMenuModel.qml+28
@@ -116,6 +116,34 @@ Item {
116116 cachedObject.destroy();
117117 wait(1);
118118 compare(Indicators.UnityMenuModelCache.contains(menuModel), true);
119+
120+ cachedObject2.destroy();
121+ }
122+
123+ // Tests that changing cached model data does not change the model path of others
124+ function test_lp1328646() {
125+ var cachedObject = model.createObject(root,
126+ {
127+ "busName": "com.canonical.test1",
128+ "menuObjectPath": "com/canonical/test1",
129+ "actionsObjectPath": "com/canonical/test1/actions"
130+ });
131+
132+ var cachedObject2 = model.createObject(root,
133+ {
134+ "busName": "com.canonical.test1",
135+ "menuObjectPath": "com/canonical/test1",
136+ "actionsObjectPath": "com/canonical/test1/actions"
137+ });
138+
139+ cachedObject.menuObjectPath = "com/canonical/test2";
140+ compare(cachedObject.model.menuObjectPath, "com/canonical/test2");
141+ compare(cachedObject2.model.menuObjectPath, "com/canonical/test1");
142+
143+ verify(cachedObject.model !== cachedObject2.model);
144+
145+ cachedObject.destroy();
146+ cachedObject2.destroy();
119147 }
120148 }
121149}