| Index: third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-request.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-request.js b/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-request.js
|
| index 95f452065a5a7927c0959e07d799e29a0a722b0f..c85da9f92c76d074c3c0307a7cbc5d9893706c53 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-request.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/permissions/chromium/resources/test-request.js
|
| @@ -41,23 +41,15 @@ var tests = [
|
| navigator.permissions.request({name:'geolocation'}).then(function(result) {
|
| assert_true(result instanceof PermissionStatus);
|
| assert_equals(result.state, 'denied');
|
| -
|
| - result.onchange = function() {
|
| - assert_equals(result.state, 'granted');
|
| -
|
| - navigator.permissions.request({name:'geolocation'}).then(function() {
|
| - assert_true(result instanceof PermissionStatus);
|
| - assert_equals(result.state, 'granted');
|
| - callback();
|
| - }).catch(function() {
|
| - assert_unreached('requesting geolocation permission should not fail.')
|
| - callback();
|
| - });
|
| - };
|
| -
|
| - setPermission('geolocation', 'granted', location.origin, location.origin)
|
| - }).catch(function() {
|
| - assert_unreached('requesting geolocation permission should not fail.')
|
| + return setPermission('geolocation', 'granted', location.origin, location.origin);
|
| + }).then(function() {
|
| + return navigator.permissions.request({name:'geolocation'});
|
| + }).then(function(result) {
|
| + assert_true(result instanceof PermissionStatus);
|
| + assert_equals(result.state, 'granted');
|
| + navigator.permissions.revoke({name:'geolocation'}).then(callback);
|
| + }).catch(function(error) {
|
| + assert_unreached(error);
|
| callback();
|
| });
|
| }
|
|
|