So i dont know if this is a bug, but had a battle end with my 2 leveling pets dying in the back row as my main 25 hit the killing bow. This was against the Flowing Pandaran spirit trainer. Both bets got the xp. thought it might be because they died on the final turn that they got xp.
so i decided to test it out on next trainer in my level cycle. Crysa.
I let the level pet die (Echo of Heights) on round 10, my Nexus Whelpling finished the fight on round 12.
the Echo of Heights got its xp. I have included a screenshot of the fight log.
http://www.bachomp.com/part1.png
http://www.bachomp.com/part2.png
again, not sure if this is a bug or if it was always like this. i was always careful of restarting the battle when my level pet died.
** ok not sure why the images are not showing up. i did the img tag correctly. I have added them as links