I think everyone agrees that you didn't do this out of cruelty, it was curiosity, it wasn't well thought through, but no malice was intended, that much is clear, but you have understand it from your chameleon's point of view. He doesn't have the abiliy of understand that you will lift him out of the water when you are satisfied.
You are the biggest and most powerful presence in his life, one he associates with care, nurturing, and above all, safety, so to be taken and plunged into an environment BY YOU, this oft comforting presence, must be a shocking and terrifying experience. It's like if you were cared for by the being that is many, many times your size from an very young age, it's fed and cared for you, nurtured and raised you, you've bonded to it and you trust it implicitly even though you are incapable of understanding it or even communicating with it. And then one day this being comes to you, you think it's like every other day when you interract, you're calm and trusting, and then BOOM, you're dropped into an environment with which you have absolutely no understanding or experience, possibly the middle of some great body of water. You panic, you don't know where you are or why you're there, and this being that you have always associated with security and care is standing right there just watching. Naturally you're going to scrabble and flail to naviagte through a substance you've never encountered on this level before, you're probably afraid you're going to die if you don't. The most basic instinct in life kicks in: sink or swim, because you believe that IF you don't flail and kick, desperate for air and land, that you WILL die, you don't know that that all-powerful presence is going to eventually scoop you up when it's ready.
At the end of that long scenario I'm trying to say that you essentially placed your chameleon into a situation where, in its head, it believed it was well within the realms of possibility of dying if it didn't "swim".