Fix AccountPage to have default form classes on initial page registration

Review Request #7103 - Created March 22, 2015 and submitted

Wang Jun Sun
Review Board
master
7099
4a5e110...
reviewboard
chipx86

When an extension uses AccountPagesHook with a pre-built list of forms (form_classes), the list form_classes is cleared when the extension's AccountPage is 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_classes defined by the AccountPage with _default_form_classes, such that the original defined list of form_classes will be restored after an extension reload.

Wrote two unit tests which passed alongside existing tests. Also verified that an extension which uses AccountPagesHook still shows up in account pages after a reload.

  • 0
  • 0
  • 8
  • 0
  • 8
Description From Last Updated
Review Bot
Wang Jun Sun
Review Bot
Xuanyi Lin
David Trowbridge
Wang Jun Sun
Review Bot
Barret Rennie
Wang Jun Sun
Review Bot
David Trowbridge
Wang Jun Sun
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (d075eb2)
Loading...