Fixed TTS-1906 by moving 14 TCs to tct-geoallow-w3c-tests from delta
authorLiu, Xin <xinx.liu@intel.com>
Wed, 21 Aug 2013 10:50:26 +0000 (18:50 +0800)
committerwanmingx.lin <wanmingx.lin@intel.com>
Wed, 21 Aug 2013 12:13:50 +0000 (20:13 +0800)
Signed-off-by: Liu, Xin <xinx.liu@intel.com>
19 files changed:
tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_0.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_100.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_60000.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_cached_position.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_example_one_short.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_operation_completed.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_timer_timeout.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_cached_position.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_example_repeated_position.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_operation_completed.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_timer_timeout.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/Overview.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/common.js [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/style.css [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/t.html [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/t00002.js [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/t00031.js [new file with mode: 0644]
tct-geoallow-w3c-tests/geoallow/w3c/t00062.js [new file with mode: 0644]
tct-geoallow-w3c-tests/tests.xml

diff --git a/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_0.html b/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_0.html
new file mode 100644 (file)
index 0000000..ec22df8
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+<html>
+  <head>
+    <title>Geolocation Test:Coordinates_attribute_timeout_0</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#coordinates" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if will get Coordinates attribute return value when set timeout to 0" />
+    <script type="text/javascript" src="../resources/testharness.js"></script>
+    <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+    <script src="../resources/blacklist.js" type="text/javascript"></script>
+  </head>
+  <body>
+  <div id=log></div>
+    <script type="text/javascript">
+        var t = async_test(document.title);
+        setup({timeout:20000});
+        if (!is_platform_supported("Geolocation")) {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
+                    {timeout: 0});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(err.name == "NOT_SUPPORTED_ERROR", "Exception while get Coordinates accuracy attribute " + err.name + err.message);
+                });
+                t.done();
+            }
+        } else {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
+                    {timeout: 0});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false, "Exception while get Coordinates accuracy attribute " + err.name + err.message);
+                });
+                t.done();
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_false(true, "successCallback should not be invoked");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_equals(error.code,error.TIMEOUT, "The timeout error occurred");
+            });
+            t.done();
+        }
+    </script>
+  </body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_100.html b/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_100.html
new file mode 100644 (file)
index 0000000..a5220e4
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+<html>
+  <head>
+    <title>Geolocation Test:Coordinates_attribute_timeout_100</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#coordinates" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if will get Coordinates attribute return value when set timeout to 100" />
+    <script type="text/javascript" src="../resources/testharness.js"></script>
+    <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+    <script src="../resources/blacklist.js" type="text/javascript"></script>
+  </head>
+  <body>
+  <div id=log></div>
+    <script type="text/javascript">
+        var t = async_test(document.title);
+        setup({timeout:20000});
+        if (!is_platform_supported("Geolocation")) {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
+                    {timeout: 100});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(err.name == "NOT_SUPPORTED_ERROR", "Exception while get Coordinates accuracy attribute " + err.name + err.message);
+                });
+                t.done();
+            }
+        } else {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
+                    {timeout: 100});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false, "Exception while get Coordinates accuracy attribute " + err.name + err.message);
+                });
+                t.done();
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_false(true, "successCallback should not be invoked");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_equals(error.code,error.TIMEOUT, "The timeout error occurred");
+            });
+            t.done();
+        }
+    </script>
+  </body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_60000.html b/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_60000.html
new file mode 100644 (file)
index 0000000..2fc4727
--- /dev/null
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+<html>
+  <head>
+    <title>Geolocation Test:Coordinates_attribute_timeout_60000</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#coordinates" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if will get Coordinates attribute return value when set timeout to 60000" />
+    <script type="text/javascript" src="../resources/testharness.js"></script>
+    <script type="text/javascript" src="../resources/testharnessreport.js"></script>
+    <script src="../resources/blacklist.js" type="text/javascript"></script>
+  </head>
+  <body>
+  <div id=log></div>
+    <script type="text/javascript">
+        var t = async_test(document.title);
+        setup({timeout:65000});
+        if (!is_platform_supported("Geolocation")) {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
+                    {timeout: 60000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(err.name == "NOT_SUPPORTED_ERROR", "Exception while get Coordinates accuracy attribute " + err.name + err.message);
+                });
+                t.done();
+            }
+        } else {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback,
+                    {timeout: 60000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false, "Exception while get Coordinates accuracy attribute " + err.name + err.message);
+                });
+                t.done();
+            }
+        }
+        function successCallback (position) {
+            var coords = position.coords;
+            t.step(function () {
+                assert_true(coords.accuracy == null || isNaN(coords.accuracy) || coords.accuracy >= 0, "should get Coordinates.accuracy");
+                assert_true(coords.altitudeAccuracy == null || isNaN(coords.altitudeAccuracy) || coords.altitudeAccuracy >= 0, "should get Coordinates.altitudeAccuracy");
+                assert_true(coords.altitude == null || isNaN(coords.altitude) || coords.altitude >= 0, "should get Coordinates.altitude");
+                assert_true(coords.heading == null || isNaN(coords.heading) || coords.heading >= 0, "should get Coordinates.heading");
+                assert_true(coords.latitude == null || isNaN(coords.latitude) || coords.latitude >= 0, "should get Coordinates.latitude");
+                assert_true(coords.longitude == null || isNaN(coords.longitude) || coords.longitude >= 0, "should get Coordinates.longitude");
+                assert_true(coords.speed == null || isNaN(coords.speed) || coords.speed >= 0, "should get Coordinates.speed");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_false(true, "errorCallback should not be invoked");
+            });
+            t.done();
+        }
+    </script>
+  </body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_cached_position.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_cached_position.html
new file mode 100644 (file)
index 0000000..6fbd68e
--- /dev/null
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_getCurrentPosition_cached_position</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if getCurrentPosition() supports cached position object" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback, { maximumAge: 60000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_true(true,"can't get current position");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_true(false,error.message);
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_example_one_short.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_example_one_short.html
new file mode 100644 (file)
index 0000000..41d14e3
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_getCurrentPosition_example_one_short</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if example of a 'one-shot' position request works" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <h1>This case will show you current positon.</h1>
+    <div><span id="position"></span></div>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback, { maximumAge: 60000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            var coordinates = position.coords;
+            document.getElementById("position").innerHTML="Your current position:"+coordinates.latitude+","+coordinates.longitude;
+            t.step(function () {
+                assert_true(true,"can't get current position");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_true(false,error.message);
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_operation_completed.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_operation_completed.html
new file mode 100644 (file)
index 0000000..8455679
--- /dev/null
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_getCurrentPosition_operation_completed</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if getCurrentPosition() invokes onPositionCallback() when the operation completes successfully before the timeout expires" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback, { timeout : 20000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_true(true,"can't get current position");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_true(false,error.message);
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_timer_timeout.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_timer_timeout.html
new file mode 100644 (file)
index 0000000..3ee3e5b
--- /dev/null
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_getCurrentPosition_timer_timeout</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if getCurrentPosition() invokes onPositionErrorCallback() after timer fires TIMEOUT" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                navigator.geolocation.getCurrentPosition(successCallback, errorCallback, { timeout : 0});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_true(false,"This errorCallback will be called");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            var error = error.code;
+            t.step(function () {
+                assert_true(error == 3,"can't get TIMEOUT error when timeout set to 0");
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_cached_position.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_cached_position.html
new file mode 100644 (file)
index 0000000..008fa11
--- /dev/null
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_watchPosition_cached_position</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if watchPosition() supports cached position object" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                var watchId = navigator.geolocation.watchPosition(successCallback, errorCallback, { maximumAge: 6000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_true(true,"can't get current position");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_true(false,error.message);
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_example_repeated_position.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_example_repeated_position.html
new file mode 100644 (file)
index 0000000..a20b1a9
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_watchPosition_example_repeated_position</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if example of requesting repeated position updates works" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <h1>You can click the button to get repeated position</h1>
+    <input type="button" onclick="buttonClickHandler()" value="stop continue to monitor the position"/>
+    <div><span id="position"></span></div>
+    <div><span id="position"></span></div>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:6000});
+        setup({timeout:20000});
+        var watchId;
+        var increase=0;
+        function showGeolocation () {
+            try {
+                watchId = navigator.geolocation.watchPosition(successCallback, errorCallback, { maximumAge: 60000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 4000)
+            }
+        }
+        function successCallback (position) {
+            var coordinates = position.coords;
+            document.getElementById("position").innerHTML="Your current position:"+coordinates.latitude+","+coordinates.longitude;
+            t.step(function () {
+                assert_true(true,"can't get current position");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_true(false,error.message);
+            });
+            t.done();
+        }
+        function buttonClickHandler(){
+            navigator.geolocation.clearWatch(watchId);
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_operation_completed.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_operation_completed.html
new file mode 100644 (file)
index 0000000..e1219be
--- /dev/null
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_watchPosition_operation_completed</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if watchPosition() invokes onPositionCallback() when the operation completes successfully before the timeout expires" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                var watchId = navigator.geolocation.watchPosition(successCallback, errorCallback, {  timeout : 20000});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_true(position !== null,"Get PositionCallback object");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            t.step(function () {
+                assert_true(false,error.message);
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_timer_timeout.html b/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_timer_timeout.html
new file mode 100644 (file)
index 0000000..c420641
--- /dev/null
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+  of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+  may be used to endorse or promote products derived from this work without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+        Liu,Xin <xinx.liu@intel.com>
+
+-->
+
+
+<html>
+  <head>
+    <title>Geolocation Test:Geolocation_watchPosition_timer_timeout</title>
+    <link rel="author" title="Intel" href="http://www.intel.com/" />
+    <link rel="help" href="http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation" />
+    <meta name="flags" content="interact" />
+    <meta name="assert" content="Check if watchPosition() invokes onPositionErrorCallback() after timer fires TIMEOUT" />
+    <script src="../resources/testharness.js" type="text/javascript"></script>
+    <script src="../resources/testharnessreport.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="log"></div>
+    <script type="text/javascript">
+        var t = async_test(document.title,{timeout:3000});
+        setup({timeout:20000});
+        function showGeolocation () {
+            try {
+                var watchId = navigator.geolocation.watchPosition(successCallback, errorCallback, { timeout : 0});
+            } catch (err) {
+                t.step(function () {
+                    assert_true(false,err.message);
+                });
+                t.done();
+            } finally{
+                setTimeout(function () {
+                    t.done();
+                }, 3000)
+            }
+        }
+        function successCallback (position) {
+            t.step(function () {
+                assert_true(false,"This errorCallback will be called");
+            });
+            t.done();
+        }
+        function errorCallback (error) {
+            var error = error.code;
+            t.step(function () {
+                assert_true(error == 3,"can't get TIMEOUT error when timeout set to 0");
+            });
+            t.done();
+        }
+        showGeolocation();
+  </script>
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/Overview.html b/tct-geoallow-w3c-tests/geoallow/w3c/Overview.html
new file mode 100644 (file)
index 0000000..dc6d25e
--- /dev/null
@@ -0,0 +1,300 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Geolocation API Specification Testing</title>
+    <link type="text/css" href="http://www.w3.org/StyleSheets/base.css" />
+    <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/base" />
+    <link href="style.css" rel="stylesheet" type="text/css"/>
+  </head>
+  <body>
+
+    <h1>Geolocation API Test Suite</h1>
+
+
+<a href="test-suite.zip">A Zip archive of all the files</a> is also available.
+
+<h2>Introduction</h2>
+
+<p>This page links to a series of test cases for the <a href="http://dev.w3.org/geo/api/spec-source.html">W3C Geolocation API Specification</a>. It is organised by section, and (more or less) categorizes each test according to which statement in the specification it relates to.</p>
+
+<h2>Instructions</h2>
+
+<p>The tests are designed to be run manually, mostly because the specification expects user interaction for allowing the browser to access location information.</p>
+
+<!-- ###################################################################### -->
+<hr/>
+<h2>Tests</h2>
+
+<!-- ###################################################################### -->
+
+<h3><a href="http://dev.w3.org/geo/api/spec-source.html#privacy_for_uas">4 Security and privacy considerations</a></h3>
+
+<h4><a href="http://dev.w3.org/geo/api/spec-source.html#privacy_for_uas">4.1 Privacy considerations for implementors of the Geolocation API</a></h4>
+<ul>
+
+  <li>
+    <q>User agents must not send location information to Web sites without the express permission of the user. User agents must acquire permission through a user interface, unless they have prearranged trust relationships with users, as described below.</q>
+    <br/><small><a href="t.html?00001">Test 00001</a>: user denies access, check
+      that error callback is called with correct code</small>
+    <br/><small><a href="t.html?00002">Test 00002</a>: user allows access, check
+      that success callback is called or error callback is called with correct code.</small>
+  </li>
+
+  <li>
+    <q>The user interface must include the host component of the document's URI</q>
+    <br/><small><a href="t.html?00018">Test 00018</a>: call getCurrentPosition, check that there's UI appearing with the document host</small>
+    <br/><small><a href="t.html?00019">Test 00019</a>: call watchPosition, check that there's UI appearing with the document host</small>
+  </li>
+
+  <li>
+    <q>Those permissions that are acquired through the user interface and that are preserved beyond the current browsing session (i.e. beyond the time when the browsing context [BROWSINGCONTEXT] is navigated to another URL) must be revocable and user agents must respect revoked permissions.</q>
+    <br/><small><a href="t.html?00141">Test 00141</a>: user asked to approve/remember, then asked to revoke, then reload. The permission dialogue should reappear.</small>
+    <br/><small><a href="t.html?00142">Test 00142</a>: user asked to deny/remember, then ask to revoke, then reload. The permission dialogue should reappear</small>
+  </li>
+</ul>
+
+<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
+
+    <h3><a href="http://dev.w3.org/geo/api/spec-source.html#api_description">5 API Description</a></h3>
+
+    <h4><a href="http://dev.w3.org/geo/api/spec-source.html#geolocation_interface">5.1 Geolocation interface</a></h4>
+
+<ul>
+  <li>
+    <q>Objects implementing the Navigator interface (e.g. the window.navigator object) must also implement the NavigatorGeolocation interface. An instance of NavigatorGeolocation would be then obtained by using binding-specific casting methods on an instance of Navigator.</q>
+    <br/><small><a href="t.html?00026">Test 00026</a>: check that window.navigator.geolocation exists and is of type 'object'.</small>
+    <br/><small><a href="t.html?00150">Test 00150</a>: check that the geolocation property of window.navigator is enumerable.</small>
+  </li>
+
+  <li>
+    <!-- The TypeError replaced by TypeMismatchError in WebKit-->
+    <!--<q>The getCurrentPosition() method takes one, two or three arguments ... If successCallback is the null value, then throw a TypeError.</q>-->
+    <q>The getCurrentPosition() method takes one, two or three arguments ... If successCallback is the null value, then throw a TypeMismatchError.</q>
+    <br/><small><a href="t.html?00027">Test 00027</a>: call getCurrentPosition without arguments, check that exception is thrown</small>
+    <br/><small><a href="t.html?00011">Test 00011</a>: call getCurrentPosition with null success callback, check that exception is thrown</small>
+    <br/><small><a href="t.html?00013">Test 00013</a>: call getCurrentPosition with null success and error callbacks, check that exception is thrown</small>
+    <br/><small><a href="t.html?00028">Test 00028</a>: call getCurrentPosition() with wrong type for first argument. Exception expected.</small>
+    <br/><small><a href="t.html?00029">Test 00029</a>: call getCurrentPosition() with wrong type for second argument. Exception expected.</small>
+    <br/><small><a href="t.html?00030">Test 00030</a>: call getCurrentPosition() with wrong type for third argument. No exception expected.</small>
+  </li>
+
+  <li>
+    <q>When called, [the getCurrentPosition() method] must immediately return and then asynchronously attempt to obtain the current location of the device.</q>
+    <br/><small><a href="t.html?00031">Test 00031</a>: Check that getCurrentPosition returns synchronously before any callbacks are invoked.</small>
+  </li>
+
+  <li>
+    <q>If the [location] attempt is successful, the successCallback is invoked (i.e. the handleEvent operation is called on the callback object) with a new Position object, reflecting the current location of the device.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>If the attempt fails, the errorCallback is invoked with a new PositionError object, reflecting the reason for the failure.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <!-- The TypeError replaced by TypeMismatchError in WebKit-->
+    <!--<q>The watchPosition() method takes one, two or three arguments ... If successCallback is the null value, then throw a TypeError.<q> -->
+    <q>The watchPosition() method takes one, two or three arguments ... If successCallback is the null value, then throw a TypeMismatchError.<q>
+    <br/><small><a href="t.html?00058">Test 00058</a>: call watchPosition with no arguments, check that exception is thrown</small>
+    <br/><small><a href="t.html?00015">Test 00015</a>: call watchPosition with null success callback, check that exception is thrown</small>
+    <br/><small><a href="t.html?00017">Test 00017</a>: call watchPosition with null success and error callbacks, check that exception is thrown</small>
+    <br/><small><a href="t.html?00059">Test 00059</a>: call watchPosition() with wrong type for first argument. Exception expected.</small>
+    <br/><small><a href="t.html?00060">Test 00060</a>: call watchPosition() with wrong type for second argument. Exception expected.</small>
+    <br/><small><a href="t.html?00061">Test 00061</a>: call watchPosition() with wrong type for third argument. No exception expected.</small>
+  </li>
+
+  <li>
+    <q>When called, [watchPosition] must immediately return a long value that uniquely identifies a watch operation and then asynchronously start the watch operation.</q>
+    <br/><small><a href="t.html?00062">Test 00062</a>: check that watchPosition returns synchronously before any callbacks are invoked.</small>
+    <br/><small><a href="t.html?00151">Test 00151</a>: check that watchPosition
+      returns a long.</small>
+  </li>
+
+  <li>
+    <q>This operation must first attempt to obtain the current location of the device and invoke the appropriate callback.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>It then must continue to monitor the position of the device and invoke the appropriate callback every time this position changes.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>The watch operation continues until the clearWatch method is called with the corresponding identifier</q>
+    <br/><small><a href="t.html?00080">Test 00080</a>: Test that calling
+      clearWatch with invalid watch IDs does not cause an exception.</small>
+  </li>
+
+  <li>
+    <q>The successCallback is only invoked when a new position is obtained and this position differs significantly from the previously reported position. The definition of what consitutes a significant difference is left to the implementation.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>For both getCurrentPosition  and watchPosition, the implementation must never invoke the successCallback without having first obtained permission from the user to share location</q>
+    <br/><small>See <a href="t.html?00001">Test 00001</a>, <a href="t.html?00002">Test 00002</a>, <a href="t.html?00018">Test 00018</a> and <a href="t.html?00019">Test 00019</a></small>
+  </li>
+
+  <li>
+    <q>If the user grants permission, the appropriate callback must be invoked as described above.</q>
+    <br/><small>See <a href="t.html?00002">Test 00002</a></small>
+  </li>
+
+  <li>
+    <q>If the user denies permission, the errorCallback (if present) must be invoked with code PERMISSION_DENIED.</q>
+    <br/><small>See <a href="t.html?00001">Test 00001</a></small>
+  </li>
+
+  <li>
+    <q>The time that is spent obtaining the user permission must not be included in the period covered by the timeout attribute of the PositionOptions  parameter. The timeout attribute must only apply to the location acquisition operation.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>If the user grants permission, the appropriate callback must be invoked as described above. If the user denies permission, the errorCallback (if present) must be invoked with code PERMISSION_DENIED, irrespective of any other errors encoutered in the above steps.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>The clearWatch() method takes one argument. When called, the watch process identified by the watchId argument will be stopped and should not invoke any further callbacks.</q>
+    <br/><small>No tests</small>
+  </li>
+</ul>
+
+<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
+
+<h4><a href="http://dev.w3.org/geo/api/spec-source.html#position_options_interface">5.2 PositionOptions interface</a></h4>
+<ul>
+
+  <li>
+    <q>In ECMAScript, the enableHighAccuracy, timeout and maximumAge properties are all optional: when creating a PositionOptions object, the developer may specify any of these properties.</q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>The enableHighAccuracy  attribute provides a hint that the application would like to receive the best possible results. This may result in slower response times or increased power consumption. The user might also deny this capability, or the device might not be able to provide more accurate results than if the flag wasn't specified.</q>
+    <br/><small><a href="t.html?00123">Test 00123</a>: call getCurrentPosition with wrong type for enableHighAccuracy. No exception expected.</small>
+    <br/><small><a href="t.html?00124">Test 00124</a>: call watchPosition with wrong type for enableHighAccuracy. No exception expected.</small>
+  </li>
+
+  <li>
+    <q>If the PositionOptions parameter to getCurrentPosition or watchPosition is omitted, the default value used for the enableHighAccuracy attribute is false. The same default value is used in ECMAScript when the enableHighAccuracy property is omitted. </q>
+    <br/><small>No tests</small>
+  </li>
+
+  <li>
+    <q>The timeout attribute denotes the maximum length of time (expressed in milliseconds) that is allowed to pass from the call to getCurrentPosition() or watchPosition() until the corresponding successCallback is invoked. If the implementation is unable to successfully acquire a new Position before the given timeout elapses, and no other errors have occurred in this interval, then the corresponding errorCallback must be invoked with a PositionError object whose code attribute is set to TIMEOUT.</q>
+    <br/><small><a href="t.html?00086">Test 00086</a>: set timeout and maximumAge to 0, check that timeout error raised (getCurrentPosition)</small>
+    <br/><small><a href="t.html?00088">Test 00088</a>: set timeout and maximumAge to 0, check that timeout error raised (watchPosition)</small>
+  </li>
+
+  <li>
+    <q>If the PositionOptions parameter to getCurrentPosition or watchPosition is omitted, the default value used for the timeout attribute is Infinity.</q>
+    <br/><small>No tests.</small>
+  </li>
+
+  <li>
+    <q>If a negative value is supplied, the timeout value is considered to be 0.</q>
+    <br/><small><a href="t.html?00091">Test 00091</a>: check that a negative timeout value is equivalent to a 0 timeout value (getCurrentLocation)</small>
+    <br/><small><a href="t.html?00092">Test 00092</a>: check that a negative timeout value is equivalent to a 0 timeout value (watchPosition)</small>
+  </li>
+
+  <li>
+    <q>The same default value is used in ECMAScript when the timeout property is omitted.</q>
+    <br/><small>No tests.</small>
+  </li>
+
+  <li>
+    <q>In case of a getCurrentPosition() call, the errorCallback would be invoked at most once</q>
+    <br/><small>No tests.</small>
+  </li>
+
+  <li>
+    <q>In case of a watchPosition(), the errorCallback could be invoked repeatedly: the first timeout is relative to the moment watchPosition()  was called or the moment the user's permission was obtained, if that was necessary. Subsequent timeouts are relative to the moment when the implementation determines that the position of the hosting device has changed and a new Position object must be acquired. </q>
+    <br/><small>No tests.</small>
+  </li>
+
+  <li>
+    <q>The maximumAge attribute indicates that the application is willing to accept a cached position whose age is no greater than the specified time in milliseconds. If maximumAge is set to 0, the implementation must immediately attempt to acquire a new position object. Setting the maximumAge to Infinity will force the implementation to return a cached position regardless of its age. If an implementation does not have a cached position available whose age is no greater than the specified maximumAge, then it must acquire a new position object. In case of a watchPosition(), the maximumAge refers to the first position object returned by the implementation.</q>
+    <br/><small>No tests.</small>
+  </li>
+
+  <li>
+    <q>If the PositionOptions parameter to getCurrentPosition or watchPosition is omitted, the default value used for the maximumAge  attribute is 0. If a negative value is supplied, the maximumAge value is considered to be 0. The same default value is used in ECMAScript when the maximumAge  property is omitted.</q>
+    <br/><small>No tests.</small>
+  </li>
+</ul>
+
+<!-- ###################################################################### -->
+
+<h4><a href="http://dev.w3.org/geo/api/spec-source.html#postion_interface">5.3 Position interface</a></h4>
+<ul>
+  <li>
+    <q>The timestamp attribute represents the time when the Position object was acquired and is represented as a DOMTimeStamp [DOMTIMESTAMP].</q>
+    <br/><small><a href="t.html?00095">Test 00095</a>: check existence of timestamp attribute, and correct type</small>
+  </li>
+</ul>
+
+<!-- ###################################################################### -->
+
+<h4><a href="http://dev.w3.org/geo/api/spec-source.html#coordinates_interface">5.4 Coordinates interface</a></h4>
+<ul>
+  <li>
+    <q>The latitude and longitude attributes are geographic coordinates specified in decimal degrees.</q>
+    <br/><small><a href="t.html?00152">Test 00152</a>: check for latitude and longitude.</small>
+  </li>
+
+  <li>
+    <q>The altitude attribute denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be null.</q>
+    <br/><small><a href="t.html?00104">Test 00104</a>: check type of altitude</small>
+  </li>
+
+  <li>
+    <q>The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified in meters and must be supported by all implementations. </q>
+    <br/><small><a href="t.html?00153">Test 00153</a>: check for accuracy property.</small>
+  </li>
+
+  <li>
+    <q>The altitudeAccuracy  attribute is specified in meters. If the implementation cannot provide altitude information, the value of this attribute must be null. </q>
+    <br/><small><a href="t.html?00105">Test 00105</a>: check type of altitudeAccuracy</small>
+  </li>
+
+  <li>
+    <q>The heading attribute denotes the direction of travel of the hosting
+      device and is specified in degrees counting clockwise relative to the true
+      north. If the implementation cannot provide heading information, the value
+      of this attribute must be null.</q>
+    <br/><small><a href="t.html?00106">Test 00106</a>: check type of heading</small>
+  </li>
+
+  <li>
+    <q>If the hosting device is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be NaN.</q>
+    <br/><small>No tests.</small>
+  </li>
+
+  <li>
+    <q>The speed attribute denotes the current ground speed of the hosting device and is specified in meters per second. If the implementation cannot provide speed information, the value of this attribute must be null. </q>
+    <br/><small><a href="t.html?00107">Test 00107</a>: check type of speed</small>
+  </li>
+</ul>
+
+<!-- ###################################################################### -->
+
+<h4><a href="http://dev.w3.org/geo/api/spec-source.html#postion_error_interface">5.5 PositionError interface</a></h4>
+<ul>
+  <li>
+    <q>The code attribute must return the appropriate code from the following list:</q>
+    <br/><small><a href="t.html?00108">Test 00108</a>: check that the error type exists and that its attributes have the right numeric value</small>
+  </li>
+</ul>
+
+<address>
+Please send feedback, error reports, or new tests to public-geolocation@w3.org
+</address>
+
+</body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/common.js b/tct-geoallow-w3c-tests/geoallow/w3c/common.js
new file mode 100644 (file)
index 0000000..d54df91
--- /dev/null
@@ -0,0 +1,120 @@
+var geo = window.navigator.geolocation;
+var testFinished = false;
+var messageEl = $('message');
+var instructionsEl = $('instructions');
+
+// inject this test's javascript code
+if (window.location.search.length > 1) {
+  var testNumber = window.location.search.substring(1);
+  document.getElementsByTagName('title')[0].text='Test '+testNumber;
+  document.getElementById('source').href='t'+testNumber+'.js';
+  var testScript = document.createElement('script');
+  testScript.type = 'text/javascript';
+  testScript.src = 't' + testNumber + '.js';
+  message('');
+  document.getElementsByTagName('body')[0].appendChild(testScript);
+}
+
+
+if (geo == undefined) fail('Geolocation API not supported by this browser');
+
+// The spec states that an implementation SHOULD acquire user permission before
+// beggining the position acquisition steps. If an implementation follows this
+// advice, set the following flag to aid debugging.
+var isUsingPreemptivePermission = false;
+
+//===================================================
+
+
+
+function $(id) {
+  return document.getElementById(id);
+}
+
+function pass(message) {
+  if (!testFinished) {
+    messageEl.className = 'pass';
+    messageEl.innerHTML = 'PASS' + (message ? ': ' + message : '');
+    testFinished = true;
+  }
+}
+
+function fail(message) {
+  if (!testFinished) {
+    messageEl.className = 'fail';
+    messageEl.innerHTML = 'FAIL' + (message ? ': ' + message : '');
+    testFinished = true;
+  }
+}
+
+function maybe(message) {
+  messageEl.className = 'maybe';
+  messageEl.innerHTML = message ? message : '';
+}
+
+function message(message) {
+  if (!testFinished) {
+    messageEl.className = '';
+    messageEl.innerHTML = message ? message : '';
+  }
+}
+
+function instruction(message) {
+  if (!testFinished) {
+    instructionsEl.innerHTML = message ? message : '';
+  }
+}
+function askAccept() {
+  instruction('Clear all Geolocation permissions before running this test. If prompted for permission, please allow.');
+}
+function askRefuse() {
+  instruction('Clear all Geolocation permissions before running this test. If prompted for permission, please deny.');
+}
+
+function run(fn) {
+  try {
+    fn();
+  } catch(e) { fail('Test threw unexpected exception "' + e + '".'); };
+}
+
+function runExpectingException(type, fn) {
+  try {
+    fn();
+    fail('Test did not throw expected exception "' + type + '"');
+  } catch(e) {
+    maybe('Test threw exception below. PASS if type is "' + type + '", otherwise FAIL.<br><br>' + e);
+  }
+}
+
+var dummyFunction = function() {};
+
+var expectedErrorCallback = function(e) {
+  pass('An error callback was invoked with error ' + errorToString(e));
+};
+var expectedSuccessCallback = function(pos) {
+  pass('A success callback was invoked with position ' + positionToString(pos));
+};
+
+var unexpectedErrorCallback = function(e) {
+  fail('An error callback was invoked unexpectedly with error ' + errorToString(e));
+};
+var unexpectedSuccessCallback = function(pos) {
+  fail('A success callback was invoked unexpectedly with position ' + positionToString(pos));
+};
+
+var positionToString = function(pos) {
+  var c = pos.coords;
+  return '[lat: ' + c.latitude + ', lon: ' + c.longitude + ', acc: ' + c.accuracy + ']';
+}
+
+var errorToString = function(err) {
+  var codeString;
+  switch(err.code) {
+    case err.UNKNOWN_ERROR: codeString = 'UNKNOWN_ERROR'; break;
+    case err.PERMISSION_DENIED: codeString = 'PERMISSION_DENIED'; break;
+    case err.POSITION_UNAVAILABLE: codeString = 'POSITION_UNAVAILABLE'; break;
+    case err.TIMEOUT: codeString = 'TIMEOUT'; break;
+    default: codeString = 'undefined error code'; break;
+  }
+  return '[code: ' + codeString + ' (' + err.code + '), message: ' + (err.message ? err.message : '(empty)') + ']';
+}
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/style.css b/tct-geoallow-w3c-tests/geoallow/w3c/style.css
new file mode 100644 (file)
index 0000000..ca6f639
--- /dev/null
@@ -0,0 +1,13 @@
+q { font-style: italic }
+li { padding-bottom: 1em; }
+.fail { background-color: #f88; }
+.pass { background-color: #8f8; }
+.maybe { background-color: #aaf; }
+.issue { background-color: #ff8; }
+.na { background-color: #fcc; }
+.spec-issue { color: red }
+.warning { font-size: 150%; color: #f77 }
+.important { font-size: 120%; font-weight: bold }
+ul.toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
+ul.toc li ul { margin-bottom: 0.75em; }
+ul.toc li ul li ul { margin-bottom: 0.25em; }
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/t.html b/tct-geoallow-w3c-tests/geoallow/w3c/t.html
new file mode 100644 (file)
index 0000000..6c02d1e
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>geolocation test</title>
+    <link rel="stylesheet" type="text/css" href="style.css"/>
+  </head>
+  <body>
+    <p id="instructions"></p>
+    <p id="message">NOT TESTED (script did not run)</p>
+    <hr/>
+    <p><a id="source" href="">View JavaScript source</a></p>
+    <script type="text/javascript" src="common.js"></script>
+ </body>
+</html>
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/t00002.js b/tct-geoallow-w3c-tests/geoallow/w3c/t00002.js
new file mode 100644 (file)
index 0000000..d311c2c
--- /dev/null
@@ -0,0 +1,12 @@
+askAccept();
+run(function() {
+  geo.getCurrentPosition(
+      expectedSuccessCallback,
+      function(error) {
+        if (!isUsingPreemptivePermission && error.code == error.POSITION_UNAVAILABLE) {
+          expectedErrorCallback(error);
+        } else {
+          unexpectedErrorCallback(error);
+        }
+      });
+});
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/t00031.js b/tct-geoallow-w3c-tests/geoallow/w3c/t00031.js
new file mode 100644 (file)
index 0000000..3e00aa8
--- /dev/null
@@ -0,0 +1,13 @@
+instruction('Respond to any permission prompt that appears.');
+run(function() {
+  var hasMethodReturned = false;
+  function checkMethodHasReturned() {
+    if (hasMethodReturned) {
+      pass();
+    } else {
+      fail();
+    }
+  }
+  geo.getCurrentPosition(checkMethodHasReturned, checkMethodHasReturned);
+  hasMethodReturned = true;
+});
diff --git a/tct-geoallow-w3c-tests/geoallow/w3c/t00062.js b/tct-geoallow-w3c-tests/geoallow/w3c/t00062.js
new file mode 100644 (file)
index 0000000..dec7335
--- /dev/null
@@ -0,0 +1,13 @@
+instruction('Respond to any permission prompt that appears.');
+run(function() {
+  var hasMethodReturned = false;
+  function checkMethodHasReturned() {
+    if (hasMethodReturned) {
+      pass();
+    } else {
+      fail();
+    }
+  }
+  geo.watchPosition(checkMethodHasReturned, checkMethodHasReturned);
+  hasMethodReturned = true;
+});
index 99e02206679ac5f9da5330eef25a0c8af0fd52f7..76ddb5c3cf35e9096a2989f84c75d711a389f0a2 100644 (file)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check that errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to false" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P2" onload_delay="24" id="Geolocation_watchPosition_errorCallback_with_PositionOptions_timeout_0_enableHighAccuracy_false">
+      <testcase purpose="Check that watchPosition errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to false" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P2" onload_delay="24" id="Geolocation_watchPosition_errorCallback_with_PositionOptions_timeout_0_enableHighAccuracy_false">
         <description>
           <pre_condition/>
           <post_condition/>
           <steps>
             <step order="1">
-              <step_desc>Check that errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to false</step_desc>
+              <step_desc>Check that watchPosition errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to false</step_desc>
               <expected>Pass</expected>
             </step>
           </steps>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check that errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to true" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P2" onload_delay="24" id="Geolocation_watchPosition_errorCallback_with_PositionOptions_timeout_0_enableHighAccuracy_true">
+      <testcase purpose="Check that watchPosition errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to true" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P2" onload_delay="24" id="Geolocation_watchPosition_errorCallback_with_PositionOptions_timeout_0_enableHighAccuracy_true">
         <description>
           <pre_condition/>
           <post_condition/>
           <steps>
             <step order="1">
-              <step_desc>Check that errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to true</step_desc>
+              <step_desc>Check that watchPosition errorCallback can be called if Geolocation,timeout is set to 0 and enableHighAccuracy is set to true</step_desc>
               <expected>Pass</expected>
             </step>
           </steps>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if getCurrentPosition() supports cached position object" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="12" id="Geolocation_getCurrentPosition_cached_position">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if getCurrentPosition() supports cached position object</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_cached_position.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if example of a 'one-shot' position request works" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="12" id="Geolocation_getCurrentPosition_example_one_short">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if example of a 'one-shot' position request works</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_example_one_short.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getCurrentPosition() invokes onPositionCallback() when the operation completes successfully before the timeout expires" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="12" id="Geolocation_getCurrentPosition_operation_completed">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if getCurrentPosition() invokes onPositionCallback() when the operation completes successfully before the timeout expires</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_operation_completed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getCurrentPosition() invokes onPositionErrorCallback() after timer fires TIMEOUT" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" id="Geolocation_getCurrentPosition_timer_timeout">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if getCurrentPosition() invokes onPositionErrorCallback() after timer fires TIMEOUT</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_getCurrentPosition_timer_timeout.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if watchPosition() supports cached position object" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="24" id="Geolocation_watchPosition_cached_position">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if watchPosition() supports cached position object</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_cached_position.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if example of requesting repeated position updates works" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="24" id="Geolocation_watchPosition_example_repeated_position">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if example of requesting repeated position updates works</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_example_repeated_position.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if watchPosition() invokes onPositionCallback() when the operation completes successfully before the timeout expires" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="24" id="Geolocation_watchPosition_operation_completed">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if watchPosition() invokes onPositionCallback() when the operation completes successfully before the timeout expires</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_operation_completed.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if watchPosition() invokes onPositionErrorCallback() after timer fires TIMEOUT" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" id="Geolocation_watchPosition_timer_timeout">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if watchPosition() invokes onPositionErrorCallback() after timer fires TIMEOUT</step_desc>
+              <expected>PASS</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Geolocation_watchPosition_timer_timeout.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if will get Coordinates attribute return value when set timeout to 0" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="12" id="Coordinates_attribute_timeout_0">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if will get Coordinates attribute return value when set timeout to 0</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_0.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Coordinates" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#coordinates</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if will get Coordinates attribute return value when set timeout to 100" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="12" id="Coordinates_attribute_timeout_100">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if will get Coordinates attribute return value when set timeout to 100</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_100.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Coordinates" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#coordinates</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if will get Coordinates attribute return value when set timeout to 60000" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="auto" priority="P3" onload_delay="12" id="Coordinates_attribute_timeout_60000">
+        <description>
+          <pre_condition/>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>Check if will get Coordinates attribute return value when set timeout to 60000</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/Coordinates_attribute_timeout_60000.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Coordinates" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#coordinates</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if success callback is called or error callback is called with correct code" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="manual" priority="P3" id="errorcallback_POSITION_UNAVAILABLE">
+        <description>
+          <pre_condition>enable GPS or connect to an available network</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>If prompts for permission to use geolocation, please accept</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/w3c/t.html?00002</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#security</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if getCurrentPosition returns synchronously before any callbacks are invoked" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="manual" priority="P3" id="getCurrentPosition_return_synchronously">
+        <description>
+          <pre_condition>enable GPS or connect to an available network</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>If prompts for permission to use geolocation, please accept</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/w3c/t.html?00031</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation_interface</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if watchPosition returns synchronously before any callbacks are invoked" type="compliance" status="approved" component="WebAPI/Location/Geolocation API Specification" execution_type="manual" priority="P3" id="watchPosition_return_synchronously">
+        <description>
+          <pre_condition>enable GPS or connect to an available network</pre_condition>
+          <post_condition/>
+          <steps>
+            <step order="1">
+              <step_desc>If prompts for permission to use geolocation, please accept</step_desc>
+              <expected>Pass</expected>
+            </step>
+          </steps>
+          <test_script_entry>/opt/tct-geoallow-w3c-tests/geoallow/w3c/t.html?00062</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion usage="true" interface="Geolocation" specification="Geolocation API Specification" section="Location" category="Tizen W3C API Specifications"/>
+            <spec_url>http://www.w3.org/TR/2012/PR-geolocation-API-20120510/#geolocation_interface</spec_url>
+            <spec_statement/>
+          </spec>
+        </specs>
+      </testcase>
     </set>
   </suite>
 </test_definition>