From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- toolkit/components/aboutmemory/tests/.eslintrc.js | 5 + toolkit/components/aboutmemory/tests/chrome.ini | 34 ++ .../aboutmemory/tests/crash-dump-diff1.json | 11 + .../aboutmemory/tests/crash-dump-diff2.json | 11 + .../aboutmemory/tests/crash-dump-good.json | 14 + .../components/aboutmemory/tests/fiss-diff1.json | 18 + .../components/aboutmemory/tests/fiss-diff2.json | 18 + .../aboutmemory/tests/memory-reports-bad.json | 3 + .../aboutmemory/tests/memory-reports-diff1.json | 49 ++ .../aboutmemory/tests/memory-reports-diff2.json | 49 ++ .../aboutmemory/tests/memory-reports-good.json | 27 + toolkit/components/aboutmemory/tests/remote.xhtml | 12 + .../aboutmemory/tests/test_aboutmemory.xhtml | 599 +++++++++++++++++++++ .../aboutmemory/tests/test_aboutmemory2.xhtml | 420 +++++++++++++++ .../aboutmemory/tests/test_aboutmemory3.xhtml | 558 +++++++++++++++++++ .../aboutmemory/tests/test_aboutmemory4.xhtml | 176 ++++++ .../aboutmemory/tests/test_aboutmemory5.xhtml | 169 ++++++ .../aboutmemory/tests/test_aboutmemory6.xhtml | 85 +++ .../aboutmemory/tests/test_aboutmemory7.xhtml | 215 ++++++++ .../tests/test_dumpGCAndCCLogsToFile.xhtml | 91 ++++ .../aboutmemory/tests/test_memoryReporters.xhtml | 429 +++++++++++++++ .../aboutmemory/tests/test_memoryReporters2.xhtml | 109 ++++ .../tests/test_sqliteMultiReporter.xhtml | 46 ++ .../aboutmemory/tests/xpcshell/test_gpuprocess.js | 39 ++ .../aboutmemory/tests/xpcshell/xpcshell.ini | 5 + 25 files changed, 3192 insertions(+) create mode 100644 toolkit/components/aboutmemory/tests/.eslintrc.js create mode 100644 toolkit/components/aboutmemory/tests/chrome.ini create mode 100644 toolkit/components/aboutmemory/tests/crash-dump-diff1.json create mode 100644 toolkit/components/aboutmemory/tests/crash-dump-diff2.json create mode 100644 toolkit/components/aboutmemory/tests/crash-dump-good.json create mode 100644 toolkit/components/aboutmemory/tests/fiss-diff1.json create mode 100644 toolkit/components/aboutmemory/tests/fiss-diff2.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-bad.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-diff1.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-diff2.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-good.json create mode 100644 toolkit/components/aboutmemory/tests/remote.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml create mode 100644 toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js create mode 100644 toolkit/components/aboutmemory/tests/xpcshell/xpcshell.ini (limited to 'toolkit/components/aboutmemory/tests') diff --git a/toolkit/components/aboutmemory/tests/.eslintrc.js b/toolkit/components/aboutmemory/tests/.eslintrc.js new file mode 100644 index 0000000000..f667a57bf5 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/.eslintrc.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + extends: ["plugin:mozilla/chrome-test"], +}; diff --git a/toolkit/components/aboutmemory/tests/chrome.ini b/toolkit/components/aboutmemory/tests/chrome.ini new file mode 100644 index 0000000000..164836d180 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/chrome.ini @@ -0,0 +1,34 @@ +[DEFAULT] +skip-if = os == 'android' +support-files = + crash-dump-diff1.json + crash-dump-diff2.json + crash-dump-good.json + fiss-diff1.json + fiss-diff2.json + memory-reports-bad.json + memory-reports-diff1.json + memory-reports-diff2.json + memory-reports-good.json + remote.xhtml + +[test_aboutmemory.xhtml] +[test_aboutmemory2.xhtml] +[test_aboutmemory3.xhtml] +[test_aboutmemory4.xhtml] +skip-if = + os == "linux" && bits == 64 && debug # Bug 1683002 +[test_aboutmemory5.xhtml] +skip-if = + asan # Bug 1116230 + socketprocess_networking # Bug 1116230 + os == "linux" && bits == 64 && debug # Bug 1683002 +[test_aboutmemory6.xhtml] +[test_aboutmemory7.xhtml] +[test_memoryReporters.xhtml] +skip-if = socketprocess_networking +[test_memoryReporters2.xhtml] +skip-if = socketprocess_networking +[test_sqliteMultiReporter.xhtml] +[test_dumpGCAndCCLogsToFile.xhtml] +skip-if = (verify && debug && (os == 'mac')) diff --git a/toolkit/components/aboutmemory/tests/crash-dump-diff1.json b/toolkit/components/aboutmemory/tests/crash-dump-diff1.json new file mode 100644 index 0000000000..d41bbcc61e --- /dev/null +++ b/toolkit/components/aboutmemory/tests/crash-dump-diff1.json @@ -0,0 +1,11 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."} + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/crash-dump-diff2.json b/toolkit/components/aboutmemory/tests/crash-dump-diff2.json new file mode 100644 index 0000000000..8f9451f625 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/crash-dump-diff2.json @@ -0,0 +1,11 @@ +{ + "foo": 3, + "blah": 4, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144001, "description": "Heap allocated."} + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/crash-dump-good.json b/toolkit/components/aboutmemory/tests/crash-dump-good.json new file mode 100644 index 0000000000..6bee54d591 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/crash-dump-good.json @@ -0,0 +1,14 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."}, + {"process": "Main Process (pid NNN)", "path": "other/b", "kind": 2, "units": 0, "amount": 104857, "description": "Other b."}, + {"process": "Main Process (pid NNN)", "path": "other/a", "kind": 2, "units": 0, "amount": 209715, "description": "Other a."}, + {"process": "Main Process (pid NNN)", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 52428800, "description": "A b."} + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/fiss-diff1.json b/toolkit/components/aboutmemory/tests/fiss-diff1.json new file mode 100644 index 0000000000..e4fa2bd954 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/fiss-diff1.json @@ -0,0 +1,18 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "P (pid 12345)", "path": "explicit/foobar", "kind": 1, "units": 0, "amount": 100, "description": "Desc."}, + {"process": "P (pid 12345)", "path": "explicit/zero1", "kind": 1, "units": 0, "amount": 0, "description": "Desc."}, + {"process": "P (pid 12345)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 10000000, "description": "Heap allocated."}, + + {"process": "web (pid 12345)", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 2000000, "description": "Desc."}, + {"process": "web (pid 12345)", "path": "explicit/a/c/d", "kind": 1, "units": 0, "amount": 2000000, "description": "Desc."}, + {"process": "web (pid 12345)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 10000000, "description": "Heap allocated."} + ] + } +} + diff --git a/toolkit/components/aboutmemory/tests/fiss-diff2.json b/toolkit/components/aboutmemory/tests/fiss-diff2.json new file mode 100644 index 0000000000..884e434748 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/fiss-diff2.json @@ -0,0 +1,18 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "P (pid 12345)", "path": "explicit/foobar", "kind": 1, "units": 0, "amount": 400, "description": "Desc."}, + {"process": "P (pid 12345)", "path": "explicit/zero1", "kind": 1, "units": 0, "amount": 0, "description": "Desc."}, + {"process": "P (pid 12345)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 13000000, "description": "Heap allocated."}, + + {"process": "webIsolated=https://example.com (pid 12345)", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 2000000, "description": "Desc."}, + {"process": "webIsolated=https://example.com (pid 12345)", "path": "explicit/a/c/d", "kind": 1, "units": 0, "amount": 3000000, "description": "Desc."}, + {"process": "webIsolated=https://example.com (pid 12345)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 12000000, "description": "Heap allocated."} + ] + } +} + diff --git a/toolkit/components/aboutmemory/tests/memory-reports-bad.json b/toolkit/components/aboutmemory/tests/memory-reports-bad.json new file mode 100644 index 0000000000..61a2092b1b --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-bad.json @@ -0,0 +1,3 @@ +{ + "version": 1 +} diff --git a/toolkit/components/aboutmemory/tests/memory-reports-diff1.json b/toolkit/components/aboutmemory/tests/memory-reports-diff1.json new file mode 100644 index 0000000000..0a7e55c323 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-diff1.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "P", "path": "explicit/xpcom/category-manager", "kind": 1, "units": 0, "amount": 56848, "description": "Desc."}, + {"process": "P", "path": "explicit/storage/prefixset/goog-phish-shavar", "kind": 1, "units": 0, "amount": 680000, "description": "Desc."}, + + {"process": "P", "path": "explicit/spell-check", "kind": 1, "units": 0, "amount": 4, "description": "Desc."}, + {"process": "P", "path": "explicit/spell-check", "kind": 1, "units": 0, "amount": 5, "description": "Desc."}, + + {"process": "P", "path": "page-faults-soft", "kind": 2, "units": 2, "amount": 61013, "description": "Desc."}, + + {"process": "P", "path": "foobar", "kind": 2, "units": 0, "amount": 100, "description": "Desc."}, + {"process": "P", "path": "zero1", "kind": 2, "units": 0, "amount": 0, "description": "Desc."}, + + {"process": "P", "path": "a/b", "kind": 2, "units": 0, "amount": 1000000, "description": "Desc."}, + {"process": "P", "path": "a/c/d", "kind": 2, "units": 0, "amount": 2000000, "description": "Desc."}, + {"process": "P", "path": "a/c/e", "kind": 2, "units": 0, "amount": 2000000, "description": "Desc."}, + {"process": "P", "path": "a/c/f", "kind": 2, "units": 0, "amount": 3000000, "description": "Desc."}, + {"process": "P", "path": "a/c/g", "kind": 2, "units": 0, "amount": 3000000, "description": "Desc."}, + {"process": "P", "path": "a/h", "kind": 2, "units": 0, "amount": 1000, "description": "Desc."}, + + {"process": "P2 (pid 22)", "path": "p1 (pid 123)", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p2 (blah, pid=123)", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p3/zone(0x1234)/p3", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p4/js-zone(0x1234)/p4", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p5/worker(foo.com, 0x1234)/p5", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "explicit/window-objects/top(bar.com, id=123)/...", "kind": 0, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p6/z-moz-nullprincipal:{85e250f3-57ae-46c4-a11e-4176dd39d9c5}/p6", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p7/js-main-runtime-compartments/system/jar:file:\\\\\\temp_xyz\\firefox\\omni.ja!/p7", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "explicit/js-non-window/runtime/script-sources/source(scripts=1011, )/misc", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + + {"process": "P3", "path": "p3", "kind": 2, "units": 0, "amount": 55, "description": "Desc."}, + + {"process": "P5", "path": "p5", "kind": 2, "units": 0, "amount": 0, "description": "Desc."}, + + {"process": "P7", "path": "p7", "kind": 2, "units": 0, "amount": 5, "description": "Desc."}, + + {"process": "P8", "path": "p8/a/b/c/d", "kind": 2, "units": 0, "amount": 3, "description": "Desc."}, + {"process": "P8", "path": "p8/a/b/c/e", "kind": 2, "units": 0, "amount": 4, "description": "Desc."}, + {"process": "P8", "path": "p8/a/b/f", "kind": 2, "units": 0, "amount": 5, "description": "Desc."}, + {"process": "P8", "path": "p8/a/g/h", "kind": 2, "units": 0, "amount": 6, "description": "Desc."}, + {"process": "P8", "path": "p8/a/g/i", "kind": 2, "units": 0, "amount": 7, "description": "Desc."}, + + {"process": "P9", "path": "explicit/threads/stacks/DNS Resolver #1 (tid=11)", "kind": 0, "units": 0, "amount": 2000, "description": "Desc."}, + {"process": "P9", "path": "explicit/threads/stacks/DNS Resolver #2 (tid=22)", "kind": 0, "units": 0, "amount": 4000, "description": "Desc."} + ] +} + diff --git a/toolkit/components/aboutmemory/tests/memory-reports-diff2.json b/toolkit/components/aboutmemory/tests/memory-reports-diff2.json new file mode 100644 index 0000000000..df9899c709 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-diff2.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "P", "path": "explicit/xpcom/category-manager", "kind": 1, "units": 0, "amount": 56849, "description": "Desc."}, + {"process": "P", "path": "explicit/storage/prefixset/goog-phish-shavar", "kind": 1, "units": 0, "amount": 670000, "description": "Desc."}, + + {"process": "P", "path": "explicit/spell-check", "kind": 1, "units": 0, "amount": 3, "description": "Desc."}, + + {"process": "P", "path": "page-faults-soft", "kind": 2, "units": 2, "amount": 61013, "description": "Desc."}, + + {"process": "P", "path": "canvas-2d-pixel-bytes", "kind": 2, "units": 0, "amount": 1000, "description": "Desc."}, + {"process": "P", "path": "canvas-2d-pixel-bytes", "kind": 2, "units": 0, "amount": 2000, "description": "Desc."}, + + {"process": "P", "path": "foobaz", "kind": 2, "units": 0, "amount": 0, "description": "Desc."}, + + {"process": "P", "path": "a/b", "kind": 2, "units": 0, "amount": 2000000, "description": "Desc."}, + {"process": "P", "path": "a/c/d", "kind": 2, "units": 0, "amount": 2998000, "description": "Desc."}, + {"process": "P", "path": "a/c/e", "kind": 2, "units": 0, "amount": 1001000, "description": "Desc."}, + {"process": "P", "path": "a/c/f", "kind": 2, "units": 0, "amount": 3001000, "description": "Desc."}, + {"process": "P", "path": "a/c/g", "kind": 2, "units": 0, "amount": 3001000, "description": "Desc."}, + {"process": "P", "path": "a/h", "kind": 2, "units": 0, "amount": 2000, "description": "Desc."}, + + {"process": "P2 (pid 22)", "path": "p1 (pid 456)", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p2 (blah, pid=456)", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p3/zone(0x5678)/p3", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p4/js-zone(0x5678)/p4", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p5/worker(foo.com, 0x5678)/p5", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "explicit/window-objects/top(bar.com, id=456)/...", "kind": 0, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p6/z-moz-nullprincipal:{161effaa-c1f7-4010-a08e-e7c9aea01aed}/p6", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "p7/js-main-runtime-compartments/system/jar:file:\\\\\\temp_abc\\firefox\\omni.ja!/p7", "kind": 2, "units": 0, "amount": 44, "description": "Desc."}, + {"process": "P2 (pid 22)", "path": "explicit/js-non-window/runtime/script-sources/source(scripts=1, )/misc", "kind": 2, "units": 0, "amount": 33, "description": "Desc."}, + + {"process": "P4", "path": "p4", "kind": 2, "units": 0, "amount": 66, "description": "Desc."}, + + {"process": "P6", "path": "p6", "kind": 2, "units": 0, "amount": 0, "description": "Desc."}, + + {"process": "P7", "path": "p7/b", "kind": 2, "units": 0, "amount": 3, "description": "Desc."}, + {"process": "P7", "path": "p7/c", "kind": 2, "units": 0, "amount": 4, "description": "Desc."}, + + {"process": "P8", "path": "p8/a/b", "kind": 2, "units": 0, "amount": 1, "description": "Desc."}, + {"process": "P8", "path": "p8/a/g", "kind": 2, "units": 0, "amount": 2, "description": "Desc."}, + + {"process": "P9", "path": "explicit/threads/stacks/DNS Resolver #1 (tid=33)", "kind": 0, "units": 0, "amount": 2000, "description": "Desc."}, + {"process": "P9", "path": "explicit/threads/stacks/DNS Resolver #2 (tid=44)", "kind": 0, "units": 0, "amount": 4000, "description": "Desc."}, + {"process": "P9", "path": "explicit/threads/stacks/DNS Resolver #3 (tid=45)", "kind": 0, "units": 0, "amount": 5000, "description": "Desc."} + ] +} + diff --git a/toolkit/components/aboutmemory/tests/memory-reports-good.json b/toolkit/components/aboutmemory/tests/memory-reports-good.json new file mode 100644 index 0000000000..ecfcddc5f7 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-good.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."}, + {"process": "Main Process (pid NNN)", "path": "other/b", "kind": 2, "units": 0, "amount": 104857, "description": "Other b."}, + {"process": "Main Process (pid NNN)", "path": "other/a", "kind": 2, "units": 0, "amount": 209715, "description": "Other a."}, + {"process": "Main Process (pid NNN)", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 52428800, "description": "A b."}, + + {"process": "Main Process (pid NNN)", "path": "size/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"}, + {"process": "Main Process (pid NNN)", "path": "rss/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"}, + {"process": "Main Process (pid NNN)", "path": "pss/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"}, + {"process": "Main Process (pid NNN)", "path": "swap/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"}, + {"process": "Main Process (pid NNN)", "path": "compartments/system/a", "kind": 1, "units": 0, "amount": 1024, "description": ""}, + {"process": "Main Process (pid NNN)", "path": "ghost-windows/a", "kind": 1, "units": 0, "amount": 1024, "description": ""}, + + {"process": "Heap-unclassified process", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."}, + {"process": "Heap-unclassified process", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 52428800, "description": "A b."}, + {"process": "Heap-unclassified process", "path": "explicit/heap-unclassified", "kind": 1, "units": 0, "amount": 209715200, "description": "Heap unclassified"}, + + {"process": "Explicit-only process", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 100000, "description": "A b."}, + + {"process": "Other-only process", "path": "a/b", "kind": 1, "units": 0, "amount": 100000, "description": "A b."}, + {"process": "Other-only process", "path": "a/c", "kind": 1, "units": 0, "amount": 100000, "description": "A c."}, + {"process": "Other-only process", "path": "heap-allocated", "kind": 1, "units": 0, "amount": 500000, "description": "D."} + ] +} diff --git a/toolkit/components/aboutmemory/tests/remote.xhtml b/toolkit/components/aboutmemory/tests/remote.xhtml new file mode 100644 index 0000000000..7d69101305 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/remote.xhtml @@ -0,0 +1,12 @@ + + + + + + +

Remote browser

+ + +
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml new file mode 100644 index 0000000000..4617a019ad --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml new file mode 100644 index 0000000000..28c8f7fa4f --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml new file mode 100644 index 0000000000..50112f1330 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml @@ -0,0 +1,558 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml new file mode 100644 index 0000000000..91edc7cbb3 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml new file mode 100644 index 0000000000..dfc0b3e359 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml new file mode 100644 index 0000000000..a3a76532e7 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml new file mode 100644 index 0000000000..28872cd516 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml new file mode 100644 index 0000000000..513df7667b --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml @@ -0,0 +1,91 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml b/toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml new file mode 100644 index 0000000000..ff80e3b393 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml @@ -0,0 +1,429 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml new file mode 100644 index 0000000000..ecae960fea --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml @@ -0,0 +1,109 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml new file mode 100644 index 0000000000..206cee5434 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml @@ -0,0 +1,46 @@ + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js b/toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js new file mode 100644 index 0000000000..1e55f9c024 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js @@ -0,0 +1,39 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + +function run_test() { + let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); + let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].getService( + Ci.nsIMemoryReporterManager + ); + + let ok = gfxInfo.controlGPUProcessForXPCShell(true); + Assert.equal(ok, true); + + let endTesting = function() { + gfxInfo.controlGPUProcessForXPCShell(false); + do_test_finished(); + }; + + let foundGPUProcess = false; + let onHandleReport = function( + aProcess, + aPath, + aKind, + aUnits, + aAmount, + aDescription + ) { + if (/GPU \(pid \d+\)/.test(aProcess)) { + foundGPUProcess = true; + } + }; + let onFinishReporting = function() { + Assert.equal(foundGPUProcess, true); + endTesting(); + }; + + mgr.getReports(onHandleReport, null, onFinishReporting, null, false); + do_test_pending(); +} diff --git a/toolkit/components/aboutmemory/tests/xpcshell/xpcshell.ini b/toolkit/components/aboutmemory/tests/xpcshell/xpcshell.ini new file mode 100644 index 0000000000..3a0598bf49 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/xpcshell/xpcshell.ini @@ -0,0 +1,5 @@ +[DEFAULT] +head = +skip-if = toolkit != 'windows' + +[test_gpuprocess.js] -- cgit v1.2.3