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

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: no copies 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 // Any copyright is dedicated to the Public Domain.
2 // http://creativecommons.org/publicdomain/zero/1.0/
3
4 if (self.importScripts) {
5 importScripts('helpers.js');
6
7 if (get_current_scope() == 'ServiceWorker')
8 importScripts('../../serviceworker/resources/worker-testharness.js');
9 else
10 importScripts('../../resources/testharness.js');
11 }
12
13 async_test(function(test) {
14 Permissions.query('geolocation').then(function() {
15 assert_unreached('Permissions.query() should not succeed (for now).')
16 }, function(e) {
17 assert_true(e instanceof DOMException);
18 assert_equals('NotSupportedError', e.name);
19 }).then(function() {
20 test.done();
21 });
22 }, 'Check the Permissions.query() normal behavior in ' + get_current_scope() + ' scope.');
23
24 async_test(function(test) {
25 Permissions.query('unknown-keyword').then(function() {
26 assert_unreached('Permissions.query() should not succeed (for now).')
27 }, function(e) {
28 assert_true(e instanceof TypeError);
29 assert_equals('TypeError', e.name);
30 }).then(function() {
31 test.done();
32 });
33 }, 'Check the Permissions.query() with wrong keyword in ' + get_current_scope() + ' scope.');
34
35 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698