Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js

Issue 285673002: Change value type of timeout and maximumAge in PositionOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js b/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js
index 928370894499bdcd5923fd9bcdc349ce7f643a15..c5b34d0cb9d246176ce0d35e0b4ab7788d7d860b 100644
--- a/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js
+++ b/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js
@@ -55,6 +55,19 @@ function testZeroMaximumAge() {
function testNonZeroMaximumAge() {
// Update the mock service to report an error.
Michael van Ouwerkerk 2014/05/13 16:15:17 Fix this comment, the line below does not set an e
kihong 2014/05/14 03:44:25 Done.
+ internals.setGeolocationPosition(document, ++mockLatitude, ++mockLongitude, ++mockAccuracy);
+ // The maximumAge is non-zero, so we expect the cached position, not the error from the service.
+ navigator.geolocation.getCurrentPosition(function(p) {
+ checkPosition(p);
+ testOverSignedIntMaximumAge();
+ }, function(e) {
+ testFailed('Error callback invoked unexpectedly');
+ finishJSTest();
+ }, {maximumAge: 1000});
+}
+
+function testOverSignedIntMaximumAge() {
+ // Update the mock service to report an error.
Michael van Ouwerkerk 2014/05/13 16:15:17 Actually, this is strange... maximum-age-expected.
kihong 2014/05/14 03:44:25 As you mentioned, this is slightly strange there m
internals.setGeolocationPositionUnavailableError(document, mockMessage);
// The maximumAge is non-zero, so we expect the cached position, not the error from the service.
navigator.geolocation.getCurrentPosition(function(p) {
@@ -63,7 +76,7 @@ function testNonZeroMaximumAge() {
}, function(e) {
testFailed('Error callback invoked unexpectedly');
finishJSTest();
- }, {maximumAge: 1000});
+ }, {maximumAge: 2147483648});
}
function testZeroMaximumAgeError() {

Powered by Google App Engine
This is Rietveld 408576698