Bug 1391352 - browser_aboutnewtab_process_selection.js can keep an extra process alive. r=me

If before the test the process count cap was 1, then we might have ended up with an extra
content process because the preloaded browser might kept alive one of the process we
created during the test.
This commit is contained in:
Gabor Krizsanits 2017-08-22 12:30:26 +02:00
Родитель e8797465ff
Коммит 167cda75c2
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -69,8 +69,10 @@ add_task(async function(){
await BrowserTestUtils.removeTab(tab1);
await BrowserTestUtils.removeTab(tab2);
// Make sure the preload browser does not keep any of the new processes alive.
gBrowser.removePreloadedBrowser();
// Since we kept alive all the processes, we can shut down the ones that do
// not host any tabs reliably.
ppmm.releaseCachedProcesses();
is(ppmm.childCount, originalChildCount, "We're back to the original process count.");
});