-
Notifications
You must be signed in to change notification settings - Fork 342
/
test.chromium.js
703 lines (579 loc) · 22.3 KB
/
test.chromium.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
/* @flow */
import path from 'path';
import EventEmitter from 'events';
import { assert } from 'chai';
import { describe, it, beforeEach, afterEach } from 'mocha';
import deepcopy from 'deepcopy';
import fs from 'fs-extra';
import * as sinon from 'sinon';
import WebSocket from 'ws';
import getValidatedManifest from '../../../src/util/manifest.js';
import { basicManifest, StubChildProcess } from '../helpers.js';
import {
ChromiumExtensionRunner,
DEFAULT_CHROME_FLAGS,
} from '../../../src/extension-runners/chromium.js';
import type { ChromiumExtensionRunnerParams } from '../../../src/extension-runners/chromium';
import {
consoleStream, // instance is imported to inspect logged messages
} from '../../../src/util/logger.js';
import { TempDir, withTempDir } from '../../../src/util/temp-dir.js';
import fileExists from '../../../src/util/file-exists.js';
import isDirectory from '../../../src/util/is-directory.js';
function prepareExtensionRunnerParams({ params } = {}) {
const fakeChromeInstance = {
process: new StubChildProcess(),
kill: sinon.spy(async () => {}),
};
const runnerParams: ChromiumExtensionRunnerParams = {
extensions: [
{
sourceDir: '/fake/sourceDir',
manifestData: deepcopy(basicManifest),
},
],
keepProfileChanges: false,
startUrl: undefined,
chromiumLaunch: sinon.spy(async () => {
return fakeChromeInstance;
}),
desktopNotifications: sinon.spy(() => {}),
...(params || {}),
};
return { params: runnerParams, fakeChromeInstance };
}
describe('util/extension-runners/chromium', async () => {
it('uses the expected chrome flags', () => {
// Flags from chrome-launcher v0.14.0
const expectedFlags = [
'--disable-features=Translate',
'--disable-component-extensions-with-background-pages',
'--disable-background-networking',
'--disable-component-update',
'--disable-client-side-phishing-detection',
'--disable-sync',
'--metrics-recording-only',
'--disable-default-apps',
'--no-default-browser-check',
'--no-first-run',
'--disable-backgrounding-occluded-windows',
'--disable-renderer-backgrounding',
'--disable-background-timer-throttling',
'--disable-ipc-flooding-protection',
'--password-store=basic',
'--use-mock-keychain',
'--force-fieldtrials=*BackgroundTracing/default/',
];
assert.deepEqual(DEFAULT_CHROME_FLAGS, expectedFlags);
});
it('installs and runs the extension', async () => {
const { params, fakeChromeInstance } = prepareExtensionRunnerParams();
const runnerInstance = new ChromiumExtensionRunner(params);
assert.equal(runnerInstance.getName(), 'Chromium');
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
],
startingUrl: undefined,
});
await runnerInstance.exit();
sinon.assert.calledOnce(fakeChromeInstance.kill);
});
it('installs a "reload manager" companion extension', async () => {
const { params } = prepareExtensionRunnerParams();
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
assert.equal(await fs.exists(reloadManagerExtension), true);
const managerExtManifest = await getValidatedManifest(
reloadManagerExtension
);
assert.deepEqual(managerExtManifest.permissions, ['management', 'tabs']);
await runnerInstance.exit();
});
it('controls the "reload manager" from a websocket server', async () => {
const { params } = prepareExtensionRunnerParams();
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
// $FlowIgnore: allow to call addess even wss property can be undefined.
const wssInfo = runnerInstance.wss.address();
const wsURL = `ws://${wssInfo.address}:${wssInfo.port}`;
const wsClient = new WebSocket(wsURL);
await new Promise((resolve) => wsClient.on('open', resolve));
// Clear console stream from previous messages and start recording
consoleStream.stopCapturing();
consoleStream.flushCapturedLogs();
consoleStream.startCapturing();
// Make verbose to capture debug logs.
consoleStream.makeVerbose();
// Emit a fake socket object as a new wss connection.
const fakeSocket = new EventEmitter();
sinon.spy(fakeSocket, 'on');
runnerInstance.wss?.emit('connection', fakeSocket);
// $FlowIgnore: ignore method-unbinding, sinon just checks the spy properties.
sinon.assert.calledOnce(fakeSocket.on);
fakeSocket.emit('error', new Error('Fake wss socket ERROR'));
// Retrieve captures logs and stop capturing.
const { capturedMessages } = consoleStream;
consoleStream.stopCapturing();
assert.ok(
capturedMessages.some(
(message) =>
message.match('[debug]') && message.match('Fake wss socket ERROR')
)
);
const reload = (client, resolve, data) => {
client.send(JSON.stringify({ type: 'webExtReloadExtensionComplete' }));
resolve(data);
};
const waitForReloadAll = new Promise((resolve) =>
wsClient.on('message', (data) => reload(wsClient, resolve, data))
);
await runnerInstance.reloadAllExtensions();
assert.deepEqual(JSON.parse(await waitForReloadAll), {
type: 'webExtReloadAllExtensions',
});
// TODO(rpl): change this once we improve the manager extension to be able
// to reload a single extension.
const waitForReloadOne = new Promise((resolve) =>
wsClient.on('message', (data) => reload(wsClient, resolve, data))
);
await runnerInstance.reloadExtensionBySourceDir('/fake/sourceDir');
assert.deepEqual(JSON.parse(await waitForReloadOne), {
type: 'webExtReloadAllExtensions',
});
// Verify that if one websocket connection gets closed, a second websocket
// connection still receives the control messages.
const wsClient2 = new WebSocket(wsURL);
await new Promise((resolve) => wsClient2.on('open', resolve));
wsClient.close();
const waitForReloadClient2 = new Promise((resolve) =>
wsClient2.on('message', (data) => reload(wsClient2, resolve, data))
);
await runnerInstance.reloadAllExtensions();
assert.deepEqual(JSON.parse(await waitForReloadClient2), {
type: 'webExtReloadAllExtensions',
});
const waitForReloadAllAgain = new Promise((resolve) =>
wsClient2.on('message', (data) => reload(wsClient2, resolve, data))
);
await runnerInstance.reloadAllExtensions();
assert.deepEqual(JSON.parse(await waitForReloadAllAgain), {
type: 'webExtReloadAllExtensions',
});
await runnerInstance.exit();
});
it('exits if the chrome instance is shutting down', async () => {
const { params, fakeChromeInstance } = prepareExtensionRunnerParams();
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const onceExiting = new Promise((resolve) =>
runnerInstance.registerCleanup(resolve)
);
fakeChromeInstance.process.emit('close');
await onceExiting;
});
it('calls all cleanup callbacks on exit', async () => {
const { params } = prepareExtensionRunnerParams();
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
runnerInstance.registerCleanup(function fnThrowsError() {
throw new Error('fake cleanup exception');
});
const onceExiting = new Promise((resolve) =>
runnerInstance.registerCleanup(resolve)
);
await runnerInstance.exit();
await onceExiting;
});
it('does not call exit if chrome instance exits while shutting down', async () => {
const { params, fakeChromeInstance } = prepareExtensionRunnerParams();
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
sinon.spy(runnerInstance, 'exit');
const exitDone = runnerInstance.exit();
fakeChromeInstance.process.emit('close');
await exitDone;
// $FlowIgnore: ignore method-unbinding, sinon just checks the spy properties.
sinon.assert.calledOnce(runnerInstance.exit);
});
it('awaits for the async setup to complete before exiting', async () => {
const { params } = prepareExtensionRunnerParams({
params: {
chromiumLaunch: sinon.spy(async () => {
throw new Error('Fake chromiumLaunch ERROR');
}),
},
});
const runnerInstance = new ChromiumExtensionRunner(params);
assert.equal(runnerInstance.getName(), 'Chromium');
await assert.isRejected(runnerInstance.run(), /Fake chromiumLaunch ERROR/);
// Clear console stream from previous messages and start recording
consoleStream.stopCapturing();
consoleStream.flushCapturedLogs();
consoleStream.startCapturing();
// Make verbose to capture debug logs.
consoleStream.makeVerbose();
// Call exit and then verify that it caught the chromiumLaunch rejection
// and logged it as a debug log.
await runnerInstance.exit();
// Retrieve captures logs and stop capturing.
const { capturedMessages } = consoleStream;
consoleStream.stopCapturing();
assert.ok(
capturedMessages.some(
(message) =>
message.match('[debug]') &&
message.match('ignored setup error on chromium runner shutdown') &&
message.match('Fake chromiumLaunch ERROR')
)
);
});
it('does use a custom chromium binary when passed', async () => {
const { params } = prepareExtensionRunnerParams({
params: { chromiumBinary: '/my/custom/chrome-bin' },
});
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: '/my/custom/chrome-bin',
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
],
startingUrl: undefined,
});
await runnerInstance.exit();
});
it('does pass multiple starting urls to chrome', async () => {
const { params } = prepareExtensionRunnerParams({
params: { startUrl: ['url1', 'url2', 'url3'] },
});
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
'url2',
'url3',
],
startingUrl: 'url1',
});
await runnerInstance.exit();
});
it('does pass additional args to chrome', async () => {
const { params } = prepareExtensionRunnerParams({
params: {
args: ['--arg1', 'arg2', '--arg3'],
startUrl: ['url1', 'url2', 'url3'],
},
});
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
'--arg1',
'arg2',
'--arg3',
'url2',
'url3',
],
startingUrl: 'url1',
});
await runnerInstance.exit();
});
it('does use a random user-data-dir', async () => {
const { params } = prepareExtensionRunnerParams({
params: {},
});
const spy = sinon.spy(TempDir.prototype, 'path');
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const usedTempPath = spy.returnValues[2];
sinon.assert.calledWithMatch(params.chromiumLaunch, {
userDataDir: usedTempPath,
});
await runnerInstance.exit();
spy.restore();
});
it('does pass a user-data-dir flag to chrome', async () =>
withTempDir(async (tmpDir) => {
const { params } = prepareExtensionRunnerParams({
params: {
chromiumProfile: tmpDir.path(),
},
});
const spy = sinon.spy(TempDir.prototype, 'path');
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const usedTempPath = spy.returnValues[2];
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
userDataDir: usedTempPath,
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
],
startingUrl: undefined,
});
await runnerInstance.exit();
spy.restore();
}));
it(
'does pass existing user-data-dir and profile-directory flag' +
' to chrome',
async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
await fs.mkdirs(path.join(tmpPath, 'userDataDir/Default'));
await fs.outputFile(path.join(tmpPath, 'userDataDir/Local State'), '');
await fs.mkdirs(path.join(tmpPath, 'userDataDir/profile'));
await fs.outputFile(
path.join(tmpPath, 'userDataDir/profile/Secure Preferences'),
''
);
const { params } = prepareExtensionRunnerParams({
params: {
chromiumProfile: path.join(tmpPath, 'userDataDir/profile'),
keepProfileChanges: true,
},
});
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
userDataDir: path.join(tmpPath, 'userDataDir'),
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
'--profile-directory=profile',
],
startingUrl: undefined,
});
await runnerInstance.exit();
})
);
it('does support some special chars in profile-directory flag', async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
// supported to test: [ _-]
// not supported by Chromium: [ßäé]
const profileDirName = " profile _-' ";
await fs.mkdirs(path.join(tmpPath, 'userDataDir/Default'));
await fs.outputFile(path.join(tmpPath, 'userDataDir/Local State'), '');
await fs.mkdirs(path.join(tmpPath, 'userDataDir', profileDirName));
await fs.outputFile(
path.join(tmpPath, 'userDataDir', profileDirName, 'Secure Preferences'),
''
);
const { params } = prepareExtensionRunnerParams({
params: {
chromiumProfile: path.join(tmpPath, 'userDataDir', profileDirName),
keepProfileChanges: true,
},
});
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
userDataDir: path.join(tmpPath, 'userDataDir'),
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
`--profile-directory=${profileDirName}`,
],
startingUrl: undefined,
});
await runnerInstance.exit();
}));
it('does recognize a UserData dir', async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
await fs.mkdirs(path.join(tmpPath, 'Default'));
await fs.outputFile(path.join(tmpPath, 'Local State'), '');
assert.isTrue(await ChromiumExtensionRunner.isUserDataDir(tmpPath));
}));
it('does reject a UserData dir with Local State dir', async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
await fs.mkdirs(path.join(tmpPath, 'Default'));
// Local State should be a file
await fs.mkdirs(path.join(tmpPath, 'Local State'));
assert.isFalse(await ChromiumExtensionRunner.isUserDataDir(tmpPath));
}));
it('does reject a UserData dir with Default file', async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
await fs.mkdirs(path.join(tmpPath, 'Local State'));
// Default should be a directory
await fs.outputFile(path.join(tmpPath, 'Default'), '');
assert.isFalse(await ChromiumExtensionRunner.isUserDataDir(tmpPath));
}));
it('throws an error on profile in invalid user-data-dir', async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
await fs.mkdirs(path.join(tmpPath, 'userDataDir/profile'));
// the userDataDir is missing a file Local State to be validated as such
await fs.outputFile(
path.join(tmpPath, 'userDataDir/profile/Secure Preferences'),
''
);
const { params } = prepareExtensionRunnerParams({
params: {
chromiumProfile: path.join(tmpPath, 'userDataDir/profile'),
keepProfileChanges: true,
},
});
const runnerInstance = new ChromiumExtensionRunner(params);
await assert.isRejected(runnerInstance.run(), /not in a user-data-dir/);
await runnerInstance.exit();
}));
it(
'does copy the profile and pass user-data-dir and profile-directory' +
' flags',
async () =>
withTempDir(async (tmpDir) => {
const tmpPath = tmpDir.path();
await fs.mkdirs(path.join(tmpPath, 'userDataDir/profile'));
await fs.outputFile(
path.join(tmpPath, 'userDataDir/profile/Secure Preferences'),
''
);
const { params } = prepareExtensionRunnerParams({
params: {
chromiumProfile: path.join(tmpPath, 'userDataDir/profile'),
},
});
const spy = sinon.spy(TempDir.prototype, 'path');
const runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
const usedTempPath = spy.returnValues[2];
const { reloadManagerExtension } = runnerInstance;
sinon.assert.calledOnce(params.chromiumLaunch);
sinon.assert.calledWithMatch(params.chromiumLaunch, {
ignoreDefaultFlags: true,
enableExtensions: true,
chromePath: undefined,
userDataDir: usedTempPath,
chromeFlags: [
...DEFAULT_CHROME_FLAGS,
`--load-extension=${reloadManagerExtension},/fake/sourceDir`,
'--profile-directory=profile',
],
startingUrl: undefined,
});
assert.isTrue(await isDirectory(path.join(usedTempPath, 'profile')));
assert.isTrue(
await fileExists(
path.join(usedTempPath, 'profile/Secure Preferences')
)
);
await runnerInstance.exit();
spy.restore();
})
);
describe('reloadAllExtensions', () => {
let runnerInstance: ChromiumExtensionRunner;
let wsClient: WebSocket;
beforeEach(async () => {
const { params } = prepareExtensionRunnerParams();
runnerInstance = new ChromiumExtensionRunner(params);
await runnerInstance.run();
});
const connectClient = async () => {
if (!runnerInstance.wss) {
throw new Error('WebSocker server is not running');
}
// $FlowIgnore: if runnerInstance.wss would be unexpectedly undefined the test case will fail.
const wssInfo = runnerInstance.wss.address();
const wsURL = `ws://${wssInfo.address}:${wssInfo.port}`;
wsClient = new WebSocket(wsURL);
await new Promise((resolve) => wsClient.on('open', resolve));
};
afterEach(async () => {
if (wsClient && wsClient.readyState === WebSocket.OPEN) {
wsClient.close();
// $FlowIgnore: allow to nullify wsClient even if wsClient signature doesn't allow it.
wsClient = null;
}
await runnerInstance.exit();
});
it('does not resolve before complete message from client', async () => {
let reloadMessage = false;
await connectClient();
wsClient.on('message', (message) => {
const msg = JSON.parse(message);
if (msg.type === 'webExtReloadAllExtensions') {
assert.equal(reloadMessage, false);
setTimeout(() => {
const respondMsg = JSON.stringify({
type: 'webExtReloadExtensionComplete',
});
wsClient.send(respondMsg);
reloadMessage = true;
}, 333);
}
});
await runnerInstance.reloadAllExtensions();
assert.equal(reloadMessage, true);
});
it('resolve when any client send complete message', async () => {
await connectClient();
wsClient.on('message', () => {
const msg = JSON.stringify({ type: 'webExtReloadExtensionComplete' });
wsClient.send(msg);
});
await runnerInstance.reloadAllExtensions();
});
it('resolve when all client disconnect', async () => {
await connectClient();
await new Promise((resolve) => {
wsClient.on('close', () => {
resolve(runnerInstance.reloadAllExtensions());
});
wsClient.close();
});
// $FlowIgnore: allow to nullify wsClient even if wsClient signature doesn't allow it.
wsClient = null;
});
it('resolve when not client connected', async () => {
await runnerInstance.reloadAllExtensions();
});
});
});