Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2135)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-revoke.js

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Fix mikhail's comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-revoke.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-revoke.js b/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-revoke.js
index d779cb06a4a38a1ddc724124cb5ed3a3069fb378..34aa026983165ddb9e001737a15f38236b58ead7 100644
--- a/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-revoke.js
+++ b/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-revoke.js
@@ -70,6 +70,21 @@ var tests = [
}
},
{
+ test: async_test('Test sensors permission in ' + get_current_scope() + ' scope.'),
+ fn: function(callback) {
+ setPermission('sensors', 'granted', location.origin, location.origin).then(function() {
+ return navigator.permissions.revoke({name:'sensors'});
+ }).then(function(result) {
+ assert_true(result instanceof PermissionStatus);
+ assert_equals(result.state, DEFAULT_PERMISSION_STATE);
+ callback();
+ }).catch(function() {
+ assert_unreached('revoking sensors permission should not fail.');
+ callback();
+ });
+ }
+},
+{
test: async_test('Test push permission in ' + get_current_scope() + ' scope.'),
fn: function(callback) {
setPermission('push-messaging', 'granted', location.origin, location.origin).then(function() {

Powered by Google App Engine
This is Rietveld 408576698