Shutting down is usually signs of overheating, not sure if this is signs of the charging system is somehow screwed up since this doesn't happen while on battery?
I changed the actual charger we had a spare lying around.when you say you swapped power cables ? do you mean just the power cable or do you mean the actual charger unit itself ?
Yes I have tried this and it still shuts downs maybe the power supply has been damaged somehow and it's shutting down to protect the computer?Have you tried using it on mains power but without the battery attached?