diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /devtools/server/tests/chrome/test_framerate_05.html | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/server/tests/chrome/test_framerate_05.html')
-rw-r--r-- | devtools/server/tests/chrome/test_framerate_05.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/devtools/server/tests/chrome/test_framerate_05.html b/devtools/server/tests/chrome/test_framerate_05.html new file mode 100644 index 0000000000..574b86719a --- /dev/null +++ b/devtools/server/tests/chrome/test_framerate_05.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML> +<html> +<!-- +Bug 1034648 - Tests whether a framerate recording can be cancelled. +--> +<head> + <meta charset="utf-8"> + <title>Framerate actor test</title> + <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="framerate-helpers.js"></script> + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"> +</head> +<body> +<pre id="test"> +<script> +"use strict"; + +window.onload = async function() { + const target = await getTargetForSelectedTab(); + const front = await target.getFront("framerate"); + const TICK = 1000; + + await front.startRecording(); + await waitFor(TICK); + + await front.cancelRecording(); + await waitFor(TICK); + + const rawTicks = await front.getPendingTicks(); + ok(rawTicks, + "The returned pending ticks should be empty (1)."); + is(rawTicks.length, 0, + "The returned pending ticks should be empty (2)."); + + const newRawData = await front.stopRecording(); + ok(newRawData, + "The returned raw data should be an empty array (1)."); + is(newRawData.length, 0, + "The returned raw data should be an empty array (2)."); + + await target.destroy(); + SimpleTest.finish(); +}; +</script> +</pre> +</body> +</html> |