WASHINGTON — Karl Rove and Harriet E. Miers, top former aides to President George W. Bush, will testify under oath to a House committee investigating the firings of nine United States attorneys in 2007, under an agreement announced Wednesday by the panel. The agreement settled a rancorous dispute that began in mid-2007 when the House Judiciary Committee subpoenaed Mr. Rove and Ms. Miers, who, according to e-mail messages released by the Justice Department, played a role in the firings.