New state law targeting sex-related ads on websites faces court test