Only if both scope and signal generator (or your amplifier) has direct connection between internal circuit ground and Mains ground wire
That's why I asked this question. I don't have a mains powered signal generator, but I was thinking of getting one.
In any case there is not advisable to connect grounds of oscilloscope (or signal generator) to anything except ground in DUT, even with isolating transformer.
No, I would never do it deliberately. I was worried about doing it through lack of knowledge, or accidentally touching the wrong place while placing the ground lead.