From 6b273a743c495687aa2b4ffd25805f2de6111ffb Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel Date: Mon, 7 May 2012 11:14:14 -0600 Subject: [PATCH] promote observer API to stable --- resources/static/include_js/include.js | 22 ++++++++++------------ resources/static/test/cases/include.js | 11 ++--------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/resources/static/include_js/include.js b/resources/static/include_js/include.js index 06c655aeb..6da3e97e6 100644 --- a/resources/static/include_js/include.js +++ b/resources/static/include_js/include.js @@ -1111,20 +1111,18 @@ }; navigator.id = { - // The experimental API, not yet final - experimental: { - request: function(options) { - checkCompat(false); - return internalRequest(options); - }, - watch: function(options) { - checkCompat(false); - internalWatch(options); - } + request: function(options) { + options = options || {}; + checkCompat(false); + return internalRequest(options); + }, + watch: function(options) { + checkCompat(false); + internalWatch(options); }, // logout from the current website - // NOTE: callback argument will be deprecated when experimental API lands, to - // be replaced with the .onlogout observer of the watch api. + // The callback parameter is DEPRECATED, instead you should use the + // the .onlogout observer of the .watch() api. logout: function(callback) { // allocate iframe if it is not allocated _open_hidden_iframe(); diff --git a/resources/static/test/cases/include.js b/resources/static/test/cases/include.js index 2273cc25c..00bd85568 100644 --- a/resources/static/test/cases/include.js +++ b/resources/static/test/cases/include.js @@ -16,18 +16,11 @@ _.each([ "get", "getVerifiedEmail", - "logout" - ], function(item, index) { - equal(typeof navigator.id[ item ], "function", "navigator.id." + item + " is available"); - }); - }); - - test("expected experimental API function is available", function() { - _.each([ + "logout", "request", "watch" ], function(item, index) { - equal(typeof navigator.id.experimental[ item ], "function", "navigator.id." + item + " is available"); + equal(typeof navigator.id[ item ], "function", "navigator.id." + item + " is available"); }); });