mozilla/browserid — pull request #3517 by shane-tomlinson (2013-06-12 15:38:21+00:00)
Title: Cleanup on the "email_chosen" state and reduce duplication of code.

@ozten, @seanmonstar or @jedp - would you guys mind giving this a review? I consolidated the code that decided how to handle transition states, I am hoping this is a little easier to follow. You guys had the most context from doing the original stuff.

No Selenium tests were changed putting this together, user facing functionality should be identical.

* Code that decided how to handle transition states and clear certs was sprinkled throughout the code, making it difficult to maintain.
* Move cert invalidation that happened in state.js into user.js.
* Rename user.js->checkEmailIssuer to checkForInvalidCerts
* Simplify checkForInvalidCerts
* Add more unit tests.