State lawmakers heard hours of testimony from students, advocates and representatives of Texas universities about their free-speech policies on campus.