Fix AccountPage to have default form classes on initial page registration
Review Request #7103 — Created March 22, 2015 and submitted — Latest diff uploaded
|Wang Jun Sun|
When an extension uses
AccountPagesHookwith a pre-built list of forms (
form_classes), the list
form_classesis cleared when the extension's
AccountPageis unregistered after the extension reloads. This causes the extension's
AccountPage(s) to not show up in the account page after.
This fix keeps track of the initial
form_classesdefined by the
_default_form_classes, such that the original defined list of
form_classeswill be restored after an extension reload.
Wrote two unit tests which passed alongside existing tests. Also verified that an extension which uses
AccountPagesHookstill shows up in account pages after a reload.