2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 function presenceTest()
19 TestEngine.test("Checking checking", true);
20 TestEngine.test("Checking Geolocation object", navigator.geolocation);
22 TestEngine.test("Checking function getCurrentPosition",
23 isFunction(navigator.geolocation.getCurrentPosition));
29 jsPrint("DEBUG POINT 0");
30 var callbackObject = TestEngine.registerCallback("getCurrentPositionCallback",
33 jsPrint("DEBUG POINT 1");
34 navigator.geolocation.getCurrentPosition(
35 callbackObject.successCallback,
36 callbackObject.errorCallback);
37 jsPrint("DEBUG POINT 2");
39 jsPrint("DEBUG POINT 3");
40 TestEngine.logErr("Error in: navigator.geolocation.getCurrentPosition");
42 jsPrint("DEBUG POINT 4");
45 TestEngine.setTestSuiteName("[WAC2.0][Geolocation]", 30*1000); // 30 seconds
46 TestEngine.addTest(true, presenceTest, "[WAC2.0][Geolocation] Geolocation prenence test");
47 TestEngine.addTest(true, accessTest, "[WAC2.0][Geolocation] Access test");
48 TestEngine.setFinalCallback(function(){ jsPrint("closing window"); window.close(); });