The mirror test, sometimes called the mark test or the mirror self-recognition test (MSR), is a behavioural technique developed in 1970 by psychologist Gordon Gallup Jr. as an attempt to determine whether a non-human animal possesses the ability of self-recognition. The MSR test is the traditional method for attempting to measure self awareness, however there has been recent controversy whether the test is a true indicator.
Very few species have passed the MSR test. As of 2016, only great apes (including humans), a single Asiatic elephant, dolphins, orcas, and the Eurasian magpie have passed the MSR test. A wide range of species have been reported to fail the test including several monkey species, giant pandas, sea lions, and dogs.
And this is what happens, when your dog sees himself in the mirror!