Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Merge branch 'dev' of github.com:mozilla/browserid into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ozten committed May 4, 2012
2 parents af324ae + 6b273a7 commit 4ecc153
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
22 changes: 10 additions & 12 deletions resources/static/include_js/include.js
Expand Up @@ -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();
Expand Down
11 changes: 2 additions & 9 deletions resources/static/test/cases/include.js
Expand Up @@ -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");
});
});

Expand Down

0 comments on commit 4ecc153

Please sign in to comment.