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

Side by Side Diff: LayoutTests/http/tests/permissions/resources/test-query.js

Issue 760223003: Stub implementation of Permissions API module. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix win compile Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 if (self.importScripts) {
2 importScripts('helpers.js');
3
4 if (get_current_scope() == 'ServiceWorker')
5 importScripts('../../serviceworker/resources/worker-testharness.js');
6 else
7 importScripts('../../resources/testharness.js');
8 }
9
10 async_test(function(test) {
11 Permissions.query('geolocation').then(function() {
12 assert_unreached('Permissions.query() should not succeed (for now).')
13 }, function(e) {
14 assert_true(e instanceof DOMException);
15 assert_equals('NotSupportedError', e.name);
16 }).then(function() {
17 test.done();
18 });
19 }, 'Check the Permissions.query() normal behavior in ' + get_current_scope() + ' scope.');
20
21 async_test(function(test) {
22 Permissions.query('unknown-keyword').then(function() {
23 assert_unreached('Permissions.query() should not succeed (for now).')
24 }, function(e) {
25 assert_true(e instanceof TypeError);
26 assert_equals('TypeError', e.name);
27 }).then(function() {
28 test.done();
29 });
30 }, 'Check the Permissions.query() with wrong keyword in ' + get_current_scope() + ' scope.');
31
32 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698