India won its first home test series against Pakistan in 27 years when the third and final test in Bangalore ended in a draw .