summaryrefslogtreecommitdiff
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorabcd <qt-info@nokia.com>2011-08-07 19:33:49 +1000
committerJuha Vuolle <juha.vuolle@nokia.com>2011-08-08 01:47:35 +0200
commit780fb826ee8b4dc297f53818f505edac077d5522 (patch)
tree244236f5ee0a33507467186a3d81e18cb0e7a32a /tests/auto/declarative
parentdfa3799b0b6226201db16fe28c52aa791b409793 (diff)
downloadqtlocation-780fb826ee8b4dc297f53818f505edac077d5522.tar.gz
fix test
The test failed due to the assumption that a new QGeoServiceProvider instance created everytime a plugin is assigned to a model. Since change f7131b42e6b997680ed4ebcc3d19becc1ef6da0e. This is no longer a valid assumption. Therefore we create new plugin instances to make the tests pass. Change-Id: If49c68cff2bcfcbfeeb99fee1015d52895e2f394 Reviewed-on: http://codereview.qt.nokia.com/2709 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Juha Vuolle <juha.vuolle@nokia.com>
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/tst_map_geocoding.qml13
-rw-r--r--tests/auto/declarative/tst_map_routing.qml11
2 files changed, 22 insertions, 2 deletions
diff --git a/tests/auto/declarative/tst_map_geocoding.qml b/tests/auto/declarative/tst_map_geocoding.qml
index 8bc0235b..593e4ea4 100644
--- a/tests/auto/declarative/tst_map_geocoding.qml
+++ b/tests/auto/declarative/tst_map_geocoding.qml
@@ -208,6 +208,17 @@ Item {
]
}
+ Plugin {
+ id: autoPlugin;
+ name: "qmlgeo.test.plugin"
+ parameters: [
+ // Parms to guide the test plugin
+ PluginParameter { name: "supported"; value: true},
+ PluginParameter { name: "finishRequestImmediately"; value: false},
+ PluginParameter { name: "validateWellKnownValues"; value: false}
+ ]
+ }
+
GeocodeModel {id: testModel; plugin: testPlugin}
SignalSpy {id: locationsSpy; target: testModel; signalName: "locationsChanged"}
SignalSpy {id: countSpy; target: testModel; signalName: "countChanged"}
@@ -228,7 +239,7 @@ Item {
SignalSpy {id: statusImmediateSpy; target: immediateModel; signalName: "statusChanged"}
SignalSpy {id: errorImmediateSpy; target: immediateModel; signalName: "errorChanged"}
- GeocodeModel {id: automaticModel; plugin: slackPlugin; query: automaticAddress1; autoUpdate: true}
+ GeocodeModel {id: automaticModel; plugin: autoPlugin; query: automaticAddress1; autoUpdate: true}
SignalSpy {id: automaticLocationsSpy; target: automaticModel; signalName: "locationsChanged"}
TestCase {
diff --git a/tests/auto/declarative/tst_map_routing.qml b/tests/auto/declarative/tst_map_routing.qml
index b186760d..5b4de8dd 100644
--- a/tests/auto/declarative/tst_map_routing.qml
+++ b/tests/auto/declarative/tst_map_routing.qml
@@ -466,6 +466,15 @@ Item {
]
}
+ Plugin {
+ id: bacicRoutingPlugin_slacker;
+ name: "qmlgeo.test.plugin"
+ parameters: [
+ // Parms to guide the test plugin
+ PluginParameter { name: "gc_finishRequestImmediately"; value: false}
+ ]
+ }
+
Coordinate {id: rcoordinate1; latitude: 50; longitude: 50}
Coordinate {id: rcoordinate2; latitude: 51; longitude: 52}
Coordinate {id: rcoordinate3; latitude: 53; longitude: 54}
@@ -500,7 +509,7 @@ Item {
SignalSpy {id: testErrorSpy; target: routeModel; signalName: "errorChanged"}
SignalSpy {id: testWaypointsSpy; target: routeQuery; signalName: "waypointsChanged"}
- RouteModel {id: routeModelSlack; plugin: testPlugin_slacker; query: routeQuery }
+ RouteModel {id: routeModelSlack; plugin: bacicRoutingPlugin_slacker; query: routeQuery }
SignalSpy {id: testRoutesSlackSpy; target: routeModelSlack; signalName: "routesChanged"}
SignalSpy {id: testCountSlackSpy; target: routeModelSlack; signalName: "countChanged" }
SignalSpy {id: testStatusSlackSpy; target: routeModelSlack; signalName: "statusChanged"}