~feng-kylin/unity8/OpenUrlInIndicator

« back to all changes in this revision

Viewing changes to tests/qmltests/Panel/tst_MenuContent.qml

  • Committer: Tarmac
  • Author(s): Nick Dedekind, Launchpad Translations on behalf of unity-team
  • Date: 2013-07-11 19:50:27 UTC
  • mfrom: (2.5.114 indicators-client)
  • Revision ID: tarmac-20130711195027-yheu3w2oc42c1h7s
Moved indicators-client code into unity8. Fixes: https://bugs.launchpad.net/bugs/1191132, https://bugs.launchpad.net/bugs/1191822.

Approved by PS Jenkins bot, Michał Sawicz, Nicolas d'Offay.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import Unity.Test 0.1 as UT
20
20
import ".."
21
21
import "../../../Panel"
22
 
import Ubuntu.ChewieUI 0.1 as ChewieUI
 
22
import Unity.Indicators 0.1 as Indicators
23
23
 
24
24
Item {
25
25
    id: shell
27
27
    height: units.gu(70)
28
28
 
29
29
    property var indicator_status: {
30
 
        'menu_plugin1': { 'started': false, 'reset': 0 },
31
 
        'menu_plugin2': { 'started': false, 'reset': 0 },
32
 
        'menu_plugin3': { 'started': false, 'reset': 0 },
33
 
        'menu_plugin4': { 'started': false, 'reset': 0 },
34
 
        'menu_plugin5': { 'started': false, 'reset': 0 }
 
30
        'menu_page1': { 'started': false, 'reset': 0 },
 
31
        'menu_page2': { 'started': false, 'reset': 0 },
 
32
        'menu_page3': { 'started': false, 'reset': 0 },
 
33
        'menu_page4': { 'started': false, 'reset': 0 },
 
34
        'menu_page5': { 'started': false, 'reset': 0 }
35
35
    }
36
36
 
37
37
    // Dummy objects
39
39
    Item { id: handle }
40
40
 
41
41
 
42
 
    ChewieUI.PluginModel {
 
42
    Indicators.IndicatorsModel {
43
43
        id: indicatorsModel
 
44
        Component.onCompleted: load()
44
45
    }
45
46
 
46
47
    MenuContent {
123
124
    }
124
125
 
125
126
    function get_test_menu_objecName(index) {
126
 
        return "menu_plugin"+(index+1);
 
127
        return "menu_page"+(index+1);
127
128
    }
128
129
 
129
130
    property string test_menu_objectName : ""
130
131
    function current_menu_equals_test_menu() {
131
132
        var current_loader = menu_content_test.findChild(menuContent, "menus").currentItem
132
133
        if (current_loader == undefined) {
133
 
            console.log("current_loader undefined");
 
134
            console.log("current_loader 'menus' undefined");
134
135
            return false;
135
136
        }
136
137
 
137
138
        var menu = menu_content_test.findChild(menuContent, test_menu_objectName);
138
139
        if (menu == undefined) {
139
 
            console.log("test_menu undefined");
 
140
            console.log("test_menu " + test_menu_objectName + " undefined");
140
141
            return false;
141
142
        }
142
143