From 3d3aade25ace3e292ca5e33bef2972aa3d76a532 Mon Sep 17 00:00:00 2001 From: Shane Tomlinson <stomlinson@mozilla.com> Date: Tue, 27 Sep 2011 15:37:29 +0100 Subject: [PATCH] Renaming proveEmailOwnership to completeEmailRegistration. --- browserid/static/dialog/resources/browserid-network.js | 4 ++-- browserid/static/dialog/test/qunit/browserid-network_test.js | 4 ++-- browserid/views/prove.ejs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/browserid/static/dialog/resources/browserid-network.js b/browserid/static/dialog/resources/browserid-network.js index f49b37c42..7fa321280 100644 --- a/browserid/static/dialog/resources/browserid-network.js +++ b/browserid/static/dialog/resources/browserid-network.js @@ -248,13 +248,13 @@ var BrowserIDNetwork = (function() { /** * Call with a token to prove an email address ownership. - * @method proveEmailOwnership + * @method completeEmailRegistration * @param {string} token - token proving email ownership. * @param {function} [onSuccess] - Callback to call when complete. Called * with one boolean parameter that specifies the validity of the token. * @param {function} [onFailure] - Called on XHR failure. */ - proveEmailOwnership: function(token, onSuccess, onFailure) { + completeEmailRegistration: function(token, onSuccess, onFailure) { withCSRF(function() { xhr.ajax({ type: "POST", diff --git a/browserid/static/dialog/test/qunit/browserid-network_test.js b/browserid/static/dialog/test/qunit/browserid-network_test.js index ef50db438..653a4023b 100644 --- a/browserid/static/dialog/test/qunit/browserid-network_test.js +++ b/browserid/static/dialog/test/qunit/browserid-network_test.js @@ -191,7 +191,7 @@ steal.plugins("jquery", "funcunit/qunit").then("/dialog/resources/browserid-netw test("complete_email_addition valid", function() { - network.proveEmailOwnership("goodtoken", function onSuccess(proven) { + network.completeEmailRegistration("goodtoken", function onSuccess(proven) { equal(proven, true, "good token proved"); start(); }, function onFailure() { @@ -203,7 +203,7 @@ steal.plugins("jquery", "funcunit/qunit").then("/dialog/resources/browserid-netw test("complete_email_addition with invalid token", function() { xhr.useResult("invalid"); - network.proveEmailOwnership("badtoken", function onSuccess(proven) { + network.completeEmailRegistration("badtoken", function onSuccess(proven) { equal(proven, false, "bad token could not be proved"); start(); }, function onFailure() { diff --git a/browserid/views/prove.ejs b/browserid/views/prove.ejs index 8814e62f3..17439c745 100644 --- a/browserid/views/prove.ejs +++ b/browserid/views/prove.ejs @@ -36,7 +36,7 @@ function failure(why) { $(function() { var token = getParameterByName("token"); - BrowserIDNetwork.proveEmailOwnership(token, function onSuccess(valid) { + BrowserIDNetwork.completeEmailRegistration(token, function onSuccess(valid) { if (valid) { success(); } else { -- GitLab