UIHelper.setKeyboardInputModeIdentifier("zh_Hans-Pinyin@sw=Pinyin-Simplified;hw=Automatic") does not switch to Pinyin unless the simulator instance was pre-configured to have the Pinyin keyboard under Settings > General > Keyboard > Keyboards.
<rdar://problem/52615537>
fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard.html (added in bug #199122) fails because of this bug.