Index: third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js b/third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js |
index fe16ccd5b08f617412692929c64cd9eac1a233c9..5bdec40b12e6407036989d34424350ce3d0cb451 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/permissions/resources/test-query.js |
@@ -25,6 +25,42 @@ async_test(function(test) { |
}, 'Test PermissionDescription WebIDL rules in ' + get_current_scope() + ' scope.'); |
async_test(function(test) { |
+ navigator.permissions.query({name:'ambient-light-sensor'}).then(function(result) { |
+ assert_true(result instanceof PermissionStatus); |
+ test.done(); |
+ }).catch(function() { |
+ assert_unreached('querying ambient-light-sensor permission should not fail.') |
+ }); |
+}, 'Test ambient-light-sensor permission in ' + get_current_scope() + ' scope.'); |
+ |
+async_test(function(test) { |
+ navigator.permissions.query({name:'accelerometer'}).then(function(result) { |
+ assert_true(result instanceof PermissionStatus); |
+ test.done(); |
+ }).catch(function() { |
+ assert_unreached('querying accelerometer permission should not fail.') |
+ }); |
+}, 'Test accelerometer permission in ' + get_current_scope() + ' scope.'); |
+ |
+async_test(function(test) { |
+ navigator.permissions.query({name:'gyroscope'}).then(function(result) { |
+ assert_true(result instanceof PermissionStatus); |
+ test.done(); |
+ }).catch(function() { |
+ assert_unreached('querying gyroscope permission should not fail.') |
+ }); |
+}, 'Test gyroscope permission in ' + get_current_scope() + ' scope.'); |
+ |
+async_test(function(test) { |
+ navigator.permissions.query({name:'magnetometer'}).then(function(result) { |
+ assert_true(result instanceof PermissionStatus); |
+ test.done(); |
+ }).catch(function() { |
+ assert_unreached('querying magnetometer permission should not fail.') |
+ }); |
+}, 'Test magnetometer permission in ' + get_current_scope() + ' scope.'); |
+ |
+async_test(function(test) { |
navigator.permissions.query({name:'geolocation'}).then(function(result) { |
assert_true(result instanceof PermissionStatus); |
assert_equals(result.state, 'denied'); |