Merge "Add unit tests for native input and fix bugs identified." into gingerbread