Task 54279: Backport device-orientation tests

Checked out tests/ at ce6ab12 (initial porting/minor test fix) and
backported to 3.6.1
Merge pull request #1 from stacic/backportTests

Task 54279: Backport device-orientation tests