"A warmth was spreading through him that had nothing to do with the sunlight; a tight obstruction in his chest seemed to be dissolving. He knew that Ron and Hermione were more shocked than they were letting on, but the mere fact that they were still there on either side of him, speaking bracing words of comfort, not shrinking from him as though he were contaminated or dangerous, was worth more than he could ever tell them." (5.203)
If Harry is "pure of heart," than we argue that Ron and Hermione are too. They do not hang out with Harry in the hopes of finding great wealth, fame, and fortune. They do not always agree with Harry or support what he does. They are friends with Harry because they like him as a person, they have similar likes and dislikes, and they have fun together. Harry never once seeks out friends that will make him seem cool or popular or edgy. He stays true to himself, and, as a result, we get a glimpse of one of the greatest friendships in all of literature.