Authors:
Jin,Weihu <weihux.jin@intel.com>
Liu,Xin <xinx.liu@intel.com>
+ Wei Ji <wei.ji@samsung.com>
-->
<script>
//==== PRIORITY P2
- var t =async_test(document.title);
- setup({timeout: 60000});
- try {
- window.navigator.geolocation.getCurrentPosition(expectedsuccessCallback, unexpectederrorCallback);
- } catch (error) {
- t.step(function () {
- assert_unreached("Error message: { " + error.message + " }");
- });
- t.done();
- }
- function expectedsuccessCallback (position) {
- var coords = position.coords;
- var accuracy = coords.accuracy;
- t.step(function () {
- assert_true(coords != null && accuracy != null, "the attribute accuracy of interface Coordinates is comparison");
- });
- t.done();
- }
- function unexpectederrorCallback (error) {
- t.step(function () {
- assert_unreached("Error message: { " + error.message + " }");
- });
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), coords, accuracy, expectedsuccessCallback, unexpectederrorCallback;
+
+t.step(function () {
+ expectedsuccessCallback = t.step_func(function (position) {
+ coords = position.coords;
+ accuracy = coords.accuracy;
+ assert_true(coords != null && accuracy != null, "the attribute accuracy of interface Coordinates is comparison");
t.done();
- }
+ });
+
+ unexpectederrorCallback = t.step_func(function (error) {
+ assert_unreached("getCurrentPosition() error callback invoked: " + error.message);
+ });
+
+ window.navigator.geolocation.getCurrentPosition(expectedsuccessCallback, unexpectederrorCallback);
+});
+
</script>
</body>
</html>