issue #5695: add request permission
add request api testcase
Merge pull request #635 from joshuastray/master

issue #5695: add requestPermission testcase