Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
-
CI results over the last 21 days
- Manifest: gfx/tests/chrome/chrome.toml
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test that killing the GPU process for tests does not disable it</title>
</head>
<body>
<script>
const { TestUtils } = ChromeUtils.importESModule(
);
add_task(async function test_kill_gpu_process_repeatedly() {
const gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
if (!gfxInfo.usingGPUProcess) {
ok(true, "Not using GPU process");
return;
}
const layerManagerType = window.windowUtils.layerManagerType;
const maxRestarts = Services.prefs.getIntPref(
"layers.gpu-process.max_restarts"
);
const attempts = maxRestarts + 2;
for (let i = 0; i < attempts; ++i) {
const reinitialized = TestUtils.topicObserved(
"compositor-reinitialized"
);
gfxInfo.killGPUProcessForTests();
await reinitialized;
ok(
gfxInfo.usingGPUProcess,
`Should still use GPU process after kill ${i + 1} of ${attempts}`
);
is(
window.windowUtils.layerManagerType,
layerManagerType,
`Should not fall back after kill ${i + 1} of ${attempts}`
);
}
});
</script>
</body>
</html>