Bug 1492700 - Fix ADB stop() in case ADB start() was called several times;r=daisuke

Differential Revision: https://phabricator.services.mozilla.com/D12758

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2018-11-27 12:48:48 +00:00
Родитель 3e62071545
Коммит db59e29448
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -89,7 +89,6 @@ const ADB = {
const isAdbRunning = await check();
if (isAdbRunning) {
this.didRunInitially = false;
dumpn("Found ADB process running, not restarting");
onSuccessfulStart();
return;

Просмотреть файл

@ -175,13 +175,24 @@ add_task({
await extension.startup();
// Call start() once and call stop() afterwards.
await ADB.start();
ok(ADB.ready);
ok(await check(), "adb is now running");
await ADB.stop();
ok(!ADB.ready);
ok(!(await check()), "adb is no longer running");
// Call start() twice and call stop() afterwards.
await ADB.start();
await ADB.start();
ok(ADB.ready);
ok(await check(), "adb is now running");
await ADB.stop();
ok(!ADB.ready);
ok(!(await check()), "adb is no longer running");
await extension.unload();
});