M theory, the 11-dimensional theory that encompasses the known superstring theories, is only partially understood, but is widely considered to be a promising potential route to quantum gravity, and is therefore an important candidate for cosmological testing. Currently there are not realistic M theory cosmological solutions, so that it is reasonable to use simplified phenomenological models that share some of the key features of M theory, especially branes. In brane cosmology, the observable universe is a 1+3-dimensional "brane" surface moving in a higher-dimensional "bulk" spacetime. Fields and particles in the non-gravitational sector are confined to the brane, while gravity propagates in the bulk. At low energies, gravity is localized at the brane, but at high energies in the early Universe gravity "leaks" into the bulk, which introduces changes to cosmological dynamics and perturbations. This can lead to characteristic imprints on the CMB and other cosmological observations, and precision cosmology is in principle a means to constrain and possibly falsify brane-world models.