Commit 09a2536b authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

Make test-query.html stop timing out.

The failure was introduced by commit f206f95f ("Test that access to Generic
Sensor APIs is autogranted"). Looking at the trybot results in that CL, the
test timed out even back then, and I think the lines added by that commit
never worked.

When content_shell is running in web_tests mode, all permissions are denied
by default unless testRunner.setPermission() is called. Switch the
expectations from "granted" to "denied" just like all other tests in the
file.

Bug: 863896
Change-Id: I1085352da5a94492b2b8bfa0c413cd3846c8f14d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866514Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#707276}
parent c8bc8ba6
...@@ -2475,8 +2475,6 @@ crbug.com/748549 external/wpt/network-error-logging [ Skip ] ...@@ -2475,8 +2475,6 @@ crbug.com/748549 external/wpt/network-error-logging [ Skip ]
crbug.com/955620 http/tests/navigation/frozen-useragent.html [ Skip ] crbug.com/955620 http/tests/navigation/frozen-useragent.html [ Skip ]
crbug.com/955620 virtual/stable/http/tests/navigation/frozen-useragent.html [ Skip ] crbug.com/955620 virtual/stable/http/tests/navigation/frozen-useragent.html [ Skip ]
crbug.com/863896 http/tests/permissions/test-query.html [ Timeout ]
crbug.com/876485 fast/performance/performance-measure-null-exception.html [ Failure ] crbug.com/876485 fast/performance/performance-measure-null-exception.html [ Failure ]
crbug.com/713587 external/wpt/css/css-ui/caret-color-006.html [ Skip ] crbug.com/713587 external/wpt/css/css-ui/caret-color-006.html [ Skip ]
......
...@@ -27,7 +27,7 @@ async_test(function(test) { ...@@ -27,7 +27,7 @@ async_test(function(test) {
async_test(function(test) { async_test(function(test) {
navigator.permissions.query({name:'ambient-light-sensor'}).then(function(result) { navigator.permissions.query({name:'ambient-light-sensor'}).then(function(result) {
assert_true(result instanceof PermissionStatus); assert_true(result instanceof PermissionStatus);
assert_equals(result.state, 'granted'); assert_equals(result.state, 'denied');
test.done(); test.done();
}).catch(function() { }).catch(function() {
assert_unreached('querying ambient-light-sensor permission should not fail.') assert_unreached('querying ambient-light-sensor permission should not fail.')
...@@ -37,7 +37,7 @@ async_test(function(test) { ...@@ -37,7 +37,7 @@ async_test(function(test) {
async_test(function(test) { async_test(function(test) {
navigator.permissions.query({name:'accelerometer'}).then(function(result) { navigator.permissions.query({name:'accelerometer'}).then(function(result) {
assert_true(result instanceof PermissionStatus); assert_true(result instanceof PermissionStatus);
assert_equals(result.state, 'granted'); assert_equals(result.state, 'denied');
test.done(); test.done();
}).catch(function() { }).catch(function() {
assert_unreached('querying accelerometer permission should not fail.') assert_unreached('querying accelerometer permission should not fail.')
...@@ -47,7 +47,7 @@ async_test(function(test) { ...@@ -47,7 +47,7 @@ async_test(function(test) {
async_test(function(test) { async_test(function(test) {
navigator.permissions.query({name:'gyroscope'}).then(function(result) { navigator.permissions.query({name:'gyroscope'}).then(function(result) {
assert_true(result instanceof PermissionStatus); assert_true(result instanceof PermissionStatus);
assert_equals(result.state, 'granted'); assert_equals(result.state, 'denied');
test.done(); test.done();
}).catch(function() { }).catch(function() {
assert_unreached('querying gyroscope permission should not fail.') assert_unreached('querying gyroscope permission should not fail.')
...@@ -57,7 +57,7 @@ async_test(function(test) { ...@@ -57,7 +57,7 @@ async_test(function(test) {
async_test(function(test) { async_test(function(test) {
navigator.permissions.query({name:'magnetometer'}).then(function(result) { navigator.permissions.query({name:'magnetometer'}).then(function(result) {
assert_true(result instanceof PermissionStatus); assert_true(result instanceof PermissionStatus);
assert_equals(result.state, 'granted'); assert_equals(result.state, 'denied');
test.done(); test.done();
}).catch(function() { }).catch(function() {
assert_unreached('querying magnetometer permission should not fail.') assert_unreached('querying magnetometer permission should not fail.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment