I've often wondered about this. At first, I thought that, no, dropping it on Japan was a bit racist (at least) and they wouldn't have done it to a European population. But, after reflecting about Dresden and other examples, I believe if they'd had it in, say, July 1944, especially if they were sure Hitler was there, they'd have done it to Berlin.
On the other hand, I think, if that had been the situation, the allies would have tried to contact the Wehrmacht High Command and told them what would happen if they did not surrender. Our perception of the Japanese was that they would never, ever surrender, whereas I'm sure we knew that, Hitler suddenly disappearing, the Germans would have accepted.