forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1729026 - Test that GPU-process FOG metrics work r=Dexter,nical
Differential Revision: https://phabricator.services.mozilla.com/D132406
- Loading branch information
Showing
13 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[DEFAULT] | ||
support-files = | ||
|
||
[browser_fog_gpu.js] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ */ | ||
|
||
"use strict"; | ||
|
||
// Glean's here on `window`, but eslint doesn't know that. bug 1715542. | ||
/* global Glean:false */ | ||
|
||
add_task(async () => { | ||
if ( | ||
!(await ChromeUtils.requestProcInfo()).children.some(p => p.type == "gpu") | ||
) { | ||
ok( | ||
true, | ||
'No GPU process? No test. Try again with --setpref "layers.gpu-process.force-enabled=true".' | ||
); | ||
return; | ||
} | ||
ok(true, "GPU Process found: Let's test."); | ||
|
||
is( | ||
undefined, | ||
Glean.testOnlyIpc.aCounter.testGetValue(), | ||
"Ensure we begin without value." | ||
); | ||
|
||
let FOG = Cc["@mozilla.org/toolkit/glean;1"].createInstance(Ci.nsIFOG); | ||
FOG.testTriggerGPUMetrics(); | ||
await FOG.testFlushAllChildren(); | ||
|
||
is( | ||
45326, // See gfx/ipc/GPUParent.cpp's RecvTestTriggerMetrics(). | ||
Glean.testOnlyIpc.aCounter.testGetValue(), | ||
"Ensure the GPU-process-set value shows up in the parent process." | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters