blob: cb7aabfc6b0e64f3d963f6ea0dd708a53c387418 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//META: script=/resources/testdriver.js
//META: script=/resources/testdriver-vendor.js
'use strict';
promise_test(async t => {
const fonts = await self.queryLocalFonts();
assert_equals(
fonts.length, 0, 'Fonts are not returned with permission not given.');
}, 'queryLocalFonts(): permission not given');
promise_test(async t => {
await test_driver.set_permission({name: 'local-fonts'}, 'denied');
const fonts = await self.queryLocalFonts();
assert_equals(
fonts.length, 0, 'Fonts are not returned with permission denied.');
}, 'queryLocalFonts(): permission denied');
promise_test(async t => {
await test_driver.set_permission({name: 'local-fonts'}, 'granted');
const fonts = await self.queryLocalFonts();
assert_greater_than_equal(
fonts.length, 1, 'Fonts are returned with permission granted.');
}, 'queryLocalFonts(): permission granted');
|