Release Android Preview 21 and bilingual changelog
Add permission-based reading of Android contacts, SMS and call history. Include shared Gaia fixes and document device validation limits. Pixel image qualification remains pending.
This commit is contained in:
parent
1c20a0b6d5
commit
200d1fb235
43 changed files with 2271 additions and 65 deletions
19
tests/settings-startup.test.mjs
Normal file
19
tests/settings-startup.test.mjs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import vm from 'node:vm';
|
||||
import {readFileSync} from 'node:fs';
|
||||
const source=readFileSync(new URL('../gaia/apps/settings/js/startup.js',import.meta.url),'utf8');
|
||||
const bootstrap=source.slice(source.lastIndexOf('(function() {'));
|
||||
test('Settings waits for deferred components before loading AMD modules',()=>{
|
||||
let starts=0;
|
||||
const document=Object.assign(new EventTarget(),{readyState:'interactive'});
|
||||
vm.runInNewContext(bootstrap,{document,AppStarter:()=>({start:()=>starts++})});
|
||||
assert.equal(starts,0);
|
||||
document.dispatchEvent(new Event('DOMContentLoaded'));assert.equal(starts,1);
|
||||
document.dispatchEvent(new Event('DOMContentLoaded'));assert.equal(starts,1);
|
||||
});
|
||||
test('Settings starts immediately when loaded after the document',()=>{
|
||||
let starts=0;
|
||||
vm.runInNewContext(bootstrap,{document:{readyState:'complete'},AppStarter:()=>({start:()=>starts++})});
|
||||
assert.equal(starts,1);
|
||||
});
|
||||
Loading…
Reference in a new issue