@@ -28,7 +28,7 @@ Item {
29 property ListModel searchHistory: ListModel {}
29 property ListModel searchHistory: ListModel {}
31− property var lens_status: {
31+ property var lensStatus: {
32 'MockLens1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
32 'MockLens1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
33 'MockLens2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
33 'MockLens2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
34 'MockLens3': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
34 'MockLens3': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
@@ -41,17 +41,17 @@ Item {
43 DashContent {
43 DashContent {
44− id: dash_content
44+ id: dashContent
45 anchors.fill: parent
45 anchors.fill: parent
47 model: lensesModel
47 model: lensesModel
48 lenses : lensesModel
48 lenses : lensesModel
50− lens_mapper : lens_delegate_mapper
50+ lensMapper : lensDelegateMapper
53 LensDelegateMapper {
53 LensDelegateMapper {
54− id: lens_delegate_mapper
54+ id: lensDelegateMapper
55 lensDelegateMapping: {
55 lensDelegateMapping: {
56 "MockLens1": "../tests/qmltests/Dash/qml/fake_lensView1.qml",
56 "MockLens1": "../tests/qmltests/Dash/qml/fake_lensView1.qml",
57 "MockLens2": "../tests/qmltests/Dash/qml/fake_lensView2.qml",
57 "MockLens2": "../tests/qmltests/Dash/qml/fake_lensView2.qml",
@@ -62,37 +62,37 @@ Item {
64 function clear_lens_status() {
64 function clear_lens_status() {
65− lens_status["MockLens1"].movementStarted = 0;
65+ lensStatus["MockLens1"].movementStarted = 0;
66− lens_status["MockLens1"].positionedAtBeginning = 0;
66+ lensStatus["MockLens1"].positionedAtBeginning = 0;
68− lens_status["MockLens2"].movementStarted = 0;
68+ lensStatus["MockLens2"].movementStarted = 0;
69− lens_status["MockLens2"].positionedAtBeginning = 0;
69+ lensStatus["MockLens2"].positionedAtBeginning = 0;
71− lens_status["MockLens3"].movementStarted = 0;
71+ lensStatus["MockLens3"].movementStarted = 0;
72− lens_status["MockLens3"].positionedAtBeginning = 0;
72+ lensStatus["MockLens3"].positionedAtBeginning = 0;
74− lens_status["MockLens4"].movementStarted = 0;
74+ lensStatus["MockLens4"].movementStarted = 0;
75− lens_status["MockLens4"].positionedAtBeginning = 0;
75+ lensStatus["MockLens4"].positionedAtBeginning = 0;
77− lens_status["MockLens5"].movementStarted = 0;
77+ lensStatus["MockLens5"].movementStarted = 0;
78− lens_status["MockLens5"].positionedAtBeginning = 0;
78+ lensStatus["MockLens5"].positionedAtBeginning = 0;
81 SignalSpy {
81 SignalSpy {
82− id: lensLoaded_spy
82+ id: lensLoadedSpy
83− target: dash_content
83+ target: dashContent
84 signalName: "lensLoaded"
84 signalName: "lensLoaded"
87 SignalSpy {
87 SignalSpy {
88− id: movementStarted_spy
88+ id: movementStartedSpy
89− target: dash_content
89+ target: dashContent
90 signalName: "movementStarted"
90 signalName: "movementStarted"
93 SignalSpy {
93 SignalSpy {
94− id: contentEndReached_spy
94+ id: contentEndReachedSpy
95− target: dash_content
95+ target: dashContent
96 signalName: "contentEndReached"
96 signalName: "contentEndReached"
@@ -101,13 +101,13 @@ Item {
101 when: windowShown
101 when: windowShown
103 function init() {
103 function init() {
104− lensLoaded_spy.clear();
104+ lensLoadedSpy.clear();
105− movementStarted_spy.clear();
105+ movementStartedSpy.clear();
106− contentEndReached_spy.clear()
106+ contentEndReachedSpy.clear()
107 clear_lens_status();
107 clear_lens_status();
109 // clear, wait for dahs to empty and load lenses.
109 // clear, wait for dahs to empty and load lenses.
110− var dashContentList = findChild(dash_content, "dashContentList");
110+ var dashContentList = findChild(dashContent, "dashContentList");
111 verify(dashContentList != undefined)
111 verify(dashContentList != undefined)
112 lensesModel.clear();
112 lensesModel.clear();
113 tryCompare(dashContentList, "count", 0);
113 tryCompare(dashContentList, "count", 0);
@@ -115,47 +115,47 @@ Item {
117 function test_movement_started_signal() {
117 function test_movement_started_signal() {
118− dash_content.setCurrentLensAtIndex(3, true, false);
118+ dashContent.setCurrentLensAtIndex(3, true, false);
120− var dashContentList = findChild(dash_content, "dashContentList");
120+ var dashContentList = findChild(dashContent, "dashContentList");
121 verify(dashContentList != undefined)
121 verify(dashContentList != undefined)
122− tryCompare(lensLoaded_spy, "count", 5);
122+ tryCompare(lensLoadedSpy, "count", 5);
124 dashContentList.movementStarted();
124 dashContentList.movementStarted();
125− compare(movementStarted_spy.count, 1, "DashContent should have emitted movementStarted signal when content list did.");
125+ compare(movementStartedSpy.count, 1, "DashContent should have emitted movementStarted signal when content list did.");
126− compare(lens_status["MockLens1"].movementStarted, 1, "MockLens1 should have emitted movementStarted signal when content list did.");
126+ compare(lensStatus["MockLens1"].movementStarted, 1, "MockLens1 should have emitted movementStarted signal when content list did.");
127− compare(lens_status["MockLens2"].movementStarted, 1, "MockLens2 should have emitted movementStarted signal when content list did.");
127+ compare(lensStatus["MockLens2"].movementStarted, 1, "MockLens2 should have emitted movementStarted signal when content list did.");
128− compare(lens_status["MockLens3"].movementStarted, 1, "MockLens3 should have emitted movementStarted signal when content list did.");
128+ compare(lensStatus["MockLens3"].movementStarted, 1, "MockLens3 should have emitted movementStarted signal when content list did.");
129− compare(lens_status["MockLens4"].movementStarted, 1, "MockLens4 should have emitted movementStarted signal when content list did.");
129+ compare(lensStatus["MockLens4"].movementStarted, 1, "MockLens4 should have emitted movementStarted signal when content list did.");
130− compare(lens_status["MockLens5"].movementStarted, 1, "MockLens5 should have emitted movementStarted signal when content list did.");
130+ compare(lensStatus["MockLens5"].movementStarted, 1, "MockLens5 should have emitted movementStarted signal when content list did.");
133 function test_positioned_at_beginning_signal() {
133 function test_positioned_at_beginning_signal() {
134− dash_content.setCurrentLensAtIndex(3, true, false);
134+ dashContent.setCurrentLensAtIndex(3, true, false);
136− tryCompare(lensLoaded_spy, "count", 5);
136+ tryCompare(lensLoadedSpy, "count", 5);
138− dash_content.positionedAtBeginning();
138+ dashContent.positionedAtBeginning();
139− compare(lens_status["MockLens1"].positionedAtBeginning, 1, "MockLens1 should have emitted positionedAtBeginning signal when DashContent did.");
139+ compare(lensStatus["MockLens1"].positionedAtBeginning, 1, "MockLens1 should have emitted positionedAtBeginning signal when DashContent did.");
140− compare(lens_status["MockLens2"].positionedAtBeginning, 1, "MockLens2 should have emitted positionedAtBeginning signal when DashContent did.");
140+ compare(lensStatus["MockLens2"].positionedAtBeginning, 1, "MockLens2 should have emitted positionedAtBeginning signal when DashContent did.");
141− compare(lens_status["MockLens3"].positionedAtBeginning, 1, "MockLens3 should have emitted positionedAtBeginning signal when DashContent did.");
141+ compare(lensStatus["MockLens3"].positionedAtBeginning, 1, "MockLens3 should have emitted positionedAtBeginning signal when DashContent did.");
142− compare(lens_status["MockLens4"].positionedAtBeginning, 1, "MockLens4 should have emitted positionedAtBeginning signal when DashContent did.");
142+ compare(lensStatus["MockLens4"].positionedAtBeginning, 1, "MockLens4 should have emitted positionedAtBeginning signal when DashContent did.");
143− compare(lens_status["MockLens5"].positionedAtBeginning, 1, "MockLens5 should have emitted positionedAtBeginning signal when DashContent did.");
143+ compare(lensStatus["MockLens5"].positionedAtBeginning, 1, "MockLens5 should have emitted positionedAtBeginning signal when DashContent did.");
146 function test_lens_loaded() {
146 function test_lens_loaded() {
147− tryCompare(lensLoaded_spy, "count", 5);
147+ tryCompare(lensLoadedSpy, "count", 5);
150 function test_content_end_reached() {
150 function test_content_end_reached() {
151− var dashContentList = findChild(dash_content, "dashContentList");
151+ var dashContentList = findChild(dashContent, "dashContentList");
152 verify(dashContentList != undefined);
152 verify(dashContentList != undefined);
153− tryCompare(lensLoaded_spy, "count", 5);
153+ tryCompare(lensLoadedSpy, "count", 5);
155− dash_content.setCurrentLensAtIndex(0, true, false);
155+ dashContent.setCurrentLensAtIndex(0, true, false);
156 dashContentList.currentItem.item.endReached();
156 dashContentList.currentItem.item.endReached();
158− compare(contentEndReached_spy.count, 1);
158+ compare(contentEndReachedSpy.count, 1);
161 // This tests that setting the current lens index will end up at the correct index even if
161 // This tests that setting the current lens index will end up at the correct index even if
@@ -164,19 +164,19 @@ Item {
164 verify(lensesModel.loaded == false);
164 verify(lensesModel.loaded == false);
166 // next index is 1 if current is -1, otherwise it's current + 1
166 // next index is 1 if current is -1, otherwise it's current + 1
167− var next_index = ((dash_content.currentIndex == -1 ? 0 : dash_content.currentIndex) + 1) % 5
167+ var next_index = ((dashContent.currentIndex == -1 ? 0 : dashContent.currentIndex) + 1) % 5
169− dash_content.setCurrentLensAtIndex(next_index, true, false);
169+ dashContent.setCurrentLensAtIndex(next_index, true, false);
170− tryCompare(dash_content, "currentIndex", next_index);
170+ tryCompare(dashContent, "currentIndex", next_index);
171 verify(lensesModel.loaded == true);
171 verify(lensesModel.loaded == true);
173 // test greater than lens count.
173 // test greater than lens count.
174− dash_content.setCurrentLensAtIndex(lensesModel.count, true, false);
174+ dashContent.setCurrentLensAtIndex(lensesModel.count, true, false);
175− compare(dash_content.currentIndex, 4);
175+ compare(dashContent.currentIndex, 4);
178 function get_current_item_object_name() {
178 function get_current_item_object_name() {
179− var dashContentList = findChild(dash_content, "dashContentList");
179+ var dashContentList = findChild(dashContent, "dashContentList");
180 verify(dashContentList != undefined);
180 verify(dashContentList != undefined);
182 if (dashContentList.currentItem != undefined) {
182 if (dashContentList.currentItem != undefined) {
@@ -198,7 +198,7 @@ Item {
200 function test_lens_mapping(data) {
200 function test_lens_mapping(data) {
201− dash_content.setCurrentLensAtIndex(data.index, true, false);
201+ dashContent.setCurrentLensAtIndex(data.index, true, false);
202 tryCompareFunction(get_current_item_object_name, data.objectName)
202 tryCompareFunction(get_current_item_object_name, data.objectName)