Not happy, and why would they? Flip it around, how happy would you be if you knew they were out there shopping around for your replacement? Only keeping you so long as they didn't find someone better?
The only time it's acceptable IMO is when you're thinking about leaving for an actual, offered role that's much different, eg, "I'm thinking of leaving to be CTO of Startup X, what do you think?"; in any event it's probably OK if the reasons are beyond the company's control (you're moving, etc).