Legendre and Chebyshev spectral approximations of Burgers' equation