Here is a simple way to check whether a contact is really offline in Gmail Chat. Actually this uses a bug of invisible feature.
First select the off the record option for the chat
Then type something and send it.
You will get a message (as shown on the picture below) if the contact is offline.
If the contact is invisible you won’t get the message.