Add testscases for PR23827.
Merge remote-tracking branch 'origin/master'