diff options
Diffstat (limited to '')
-rw-r--r-- | devtools/shared/heapsnapshot/tests/xpcshell/test_HeapAnalyses_deleteHeapSnapshot_02.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/devtools/shared/heapsnapshot/tests/xpcshell/test_HeapAnalyses_deleteHeapSnapshot_02.js b/devtools/shared/heapsnapshot/tests/xpcshell/test_HeapAnalyses_deleteHeapSnapshot_02.js new file mode 100644 index 0000000000..6960081afd --- /dev/null +++ b/devtools/shared/heapsnapshot/tests/xpcshell/test_HeapAnalyses_deleteHeapSnapshot_02.js @@ -0,0 +1,19 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + +// Test deleteHeapSnapshot is a noop if the provided path matches no snapshot + +add_task(async function () { + const client = new HeapAnalysesClient(); + + let threw = false; + try { + await client.deleteHeapSnapshot("path-does-not-exist"); + } catch (_) { + threw = true; + } + ok(threw, "deleteHeapSnapshot on non-existant path should throw an error"); + + client.destroy(); +}); |