diff options
Diffstat (limited to 'toolkit/components/processtools/tests/xpcshell/test_total_cpu_time_child.js')
-rw-r--r-- | toolkit/components/processtools/tests/xpcshell/test_total_cpu_time_child.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/toolkit/components/processtools/tests/xpcshell/test_total_cpu_time_child.js b/toolkit/components/processtools/tests/xpcshell/test_total_cpu_time_child.js new file mode 100644 index 0000000000..88ac480a09 --- /dev/null +++ b/toolkit/components/processtools/tests/xpcshell/test_total_cpu_time_child.js @@ -0,0 +1,10 @@ +const MESSAGE_CHILD_TEST_DONE = "ChildTest:Done"; + +function run_test() { + const kBusyWaitForMs = 50; + let startTime = Date.now(); + while (Date.now() - startTime < kBusyWaitForMs) { + // Burn CPU time... + } + do_send_remote_message(MESSAGE_CHILD_TEST_DONE, kBusyWaitForMs); +} |