It was called the “red mark test” or just the “mark test,” and it was first tried out on a gorilla over two decades ago. Scientists applied a smudge of red powder to the forehead of a sleeping gorilla, then placed a large viewing mirror close by and waited for the ape to awaken. To the surprise of all, after the gorilla first noticed its reflection (and reacted to it as a social response), it then began to recognize that it was looking at itself, and, noticing the smudge over its eyes, immediately began trying to wipe it off. Later, the gorilla would use the mirror to groom itself and even examine parts of its body.
The test is now referred to as mirror self-recognition (MSR). The test indicates self-awareness of a higher, and formerly, distinctly human level. The test is also thought to correlate to higher brain behaviors such as empathy and altruism.
Most every animal in nature, when confronted with a mirror, will interpret the image therein as another animal, possibly a threat, and may attack the image, or, be scared away. After a while, the animals habituate and ignore the reflected image entirely. But the gorilla—a “higher” ape—recognized the image as its own, a feat that requires a degree of abstract thought and cognitive association.
Dolphins too recognize their image when confronted with a reflecting surface and have shown other remarkable abilities such as abstract reasoning (regarding object series recognition), and self-selected vocalizations with human trainers.
Now, we can add elephants to the very short list of animals besides humans with self-awareness.
Researchers (Plotnik, et al, reporting in the Proceeding of the National Academy of Science  ) working with Asian elephants (Elephas maximus) at the Bronx zoo, conducted an MSR test. They applied “real” and “sham” marks to the right sides of the pachyderms’ heads and waited to see how the elephants would respond to these when a large mirror was placed in their presence. Sure enough, the elephants demonstrated that they understood they were looking at themselves (and not another elephant) and begin touching the marks with their trunks. In all, their behavior during the MSR tests matched those of apes and dolphins. According to the paper’s authors: “These parallels suggest convergent cognitive evolution most likely related to complex sociality and cooperation.”
The intelligence of elephants  has long been known (though tribal lore, and from field observations) and established. They have complex social lives and relations and do indeed have excellent memories. Also, a full grown male’s brain may weigh fourteen pounds (the actual measure of “intelligence” is brain size to body mass ratio). It is believed that the size (relative to body size) and structure of our larger, more recently evolved brains enables higher states of conscious perception (such as self-awareness). The animals tested here all possess large brains—some, like the dolphin and elephant, larger than our human ones. Each has a cerebral cortex (the outer-most layer of brain matter, known as the neomammalian brain), although this is quite small in the gorilla as compared to the humans.
But we humans are not just self-aware, we are aware that we are aware. We express this “higher” form of awareness primarily through speaking or through symbolic manipulation and recursion (e.g., “This statement is false”). This is called meta-awareness, and so far, it has not been found outside of our species.