A Chicago federal judge has granted class-action status to a lawsuit that accuses Yahoo Inc. of sending unsolicited text messages to Sprint cellphone customers in violation of the Telephone Consumer Protection Act.