Normally, permissions granted to a site are cleared between each testcase in the Android instrumentation tests. For example, running the following JavaScript will have the page request to use the camera:
navigator.getUserMedia({video: true})
Accepting the resulting permission prompt grants the site the permission to use the camera, but doing so in another testcase immediately after causes another permission prompt to be displayed.
Doing the same with the following JavaScript to request notification permissions yields different behavior:
Notification.requestPermission()
The first test to do so will get a permission prompt as expected, but all subsequent tests will retain the permission from the first and not get any permission prompts.
Tests are supposed to be hermetic, so the notification permission should be cleared between tests like every other permission type.
Comment 1 by bsheedy@chromium.org
, Jan 15