  The X-ray afterglows of almost one half of gamma-ray bursts have been
discovered to have a shallow decay phase by the {\em Swift} satellite, whose
origin remains mysterious. Two main models have been proposed to explain this
phase, relativistic wind bubbles (RWBs) and structured ejecta, which could
originate from millisecond magnetars and rapidly-rotating black holes,
respectively. Based on these models, we here investigate polarization evolution
in the shallow decay phase of X-ray and optical afterglows. We find that in the
RWB model, a significant bump of the polarization degree evolution curve
appears during the shallow decay phase of both optical and X-ray afterglows,
while the polarization position angle changes its direction by $90^\circ$
abruptly. In the structured ejecta model, however, the polarization degree does
not evolve significantly during the shallow decay phase of afterglows, no
matter whether the magnetic field configuration in the ejecta is random or
globally large-scale. Therefore, we conclude that these two models for the
shallow decay phase and relevant central engines would be testable with future
polarization observations.
