From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- toolkit/components/aboutmemory/tests/.eslintrc.js | 7 + toolkit/components/aboutmemory/tests/chrome.ini | 28 + .../aboutmemory/tests/crash-dump-diff1.json | 11 + .../aboutmemory/tests/crash-dump-diff2.json | 11 + .../aboutmemory/tests/crash-dump-good.json | 14 + .../aboutmemory/tests/memory-reports-bad.json | 3 + .../aboutmemory/tests/memory-reports-diff1.json | 45 ++ .../aboutmemory/tests/memory-reports-diff2.json | 44 ++ .../aboutmemory/tests/memory-reports-good.json | 29 + toolkit/components/aboutmemory/tests/remote.xul | 12 + .../aboutmemory/tests/test_aboutmemory.xul | 602 +++++++++++++++++++++ .../aboutmemory/tests/test_aboutmemory2.xul | 423 +++++++++++++++ .../aboutmemory/tests/test_aboutmemory3.xul | 515 ++++++++++++++++++ .../aboutmemory/tests/test_aboutmemory4.xul | 179 ++++++ .../aboutmemory/tests/test_aboutmemory5.xul | 167 ++++++ .../aboutmemory/tests/test_aboutmemory6.xul | 88 +++ .../tests/test_dumpGCAndCCLogsToFile.xul | 98 ++++ .../aboutmemory/tests/test_memoryReporters.xul | 424 +++++++++++++++ .../aboutmemory/tests/test_memoryReporters2.xul | 108 ++++ .../aboutmemory/tests/test_sqliteMultiReporter.xul | 54 ++ 20 files changed, 2862 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/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.xul create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory.xul create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory2.xul create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory3.xul create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory4.xul create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory5.xul create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory6.xul create mode 100644 toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul create mode 100644 toolkit/components/aboutmemory/tests/test_memoryReporters.xul create mode 100644 toolkit/components/aboutmemory/tests/test_memoryReporters2.xul create mode 100644 toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul (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 000000000..2c669d844 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "../../../../testing/mochitest/chrome.eslintrc.js" + ] +}; diff --git a/toolkit/components/aboutmemory/tests/chrome.ini b/toolkit/components/aboutmemory/tests/chrome.ini new file mode 100644 index 000000000..c25bc30a0 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/chrome.ini @@ -0,0 +1,28 @@ +[DEFAULT] +skip-if = os == 'android' +support-files = + crash-dump-diff1.json + crash-dump-diff2.json + crash-dump-good.json + memory-reports-bad.json + memory-reports-diff1.json + memory-reports-diff2.json + memory-reports-good.json + remote.xul + +[test_aboutmemory.xul] +subsuite = clipboard +[test_aboutmemory2.xul] +subsuite = clipboard +[test_aboutmemory3.xul] +subsuite = clipboard +[test_aboutmemory4.xul] +subsuite = clipboard +[test_aboutmemory5.xul] +subsuite = clipboard +skip-if = asan # Bug 1116230 +[test_aboutmemory6.xul] +[test_memoryReporters.xul] +[test_memoryReporters2.xul] +[test_sqliteMultiReporter.xul] +[test_dumpGCAndCCLogsToFile.xul] 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 000000000..d41bbcc61 --- /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 000000000..8f9451f62 --- /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 000000000..6bee54d59 --- /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/memory-reports-bad.json b/toolkit/components/aboutmemory/tests/memory-reports-bad.json new file mode 100644 index 000000000..61a2092b1 --- /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 000000000..0bfe0b26b --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-diff1.json @@ -0,0 +1,45 @@ +{ + "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": "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."} + ] +} + 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 000000000..e2ef4caa7 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-diff2.json @@ -0,0 +1,44 @@ +{ + "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": "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."} + ] +} + 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 000000000..013b4b125 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-good.json @@ -0,0 +1,29 @@ +{ + "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": "Main Process (pid NNN)", "path": "redundant/should-be-ignored", "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.xul b/toolkit/components/aboutmemory/tests/remote.xul new file mode 100644 index 000000000..7d6910130 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/remote.xul @@ -0,0 +1,12 @@ + + + + + + +

Remote browser

+ + +
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory.xul new file mode 100644 index 000000000..bfeab4c7b --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory.xul @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory2.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xul new file mode 100644 index 000000000..8cf197e6d --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xul @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory3.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xul new file mode 100644 index 000000000..c712070cc --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xul @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory4.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xul new file mode 100644 index 000000000..f2c752ac5 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xul @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory5.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xul new file mode 100644 index 000000000..2fec803b9 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xul @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul new file mode 100644 index 000000000..365f99091 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul new file mode 100644 index 000000000..a39869b7d --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul @@ -0,0 +1,98 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters.xul b/toolkit/components/aboutmemory/tests/test_memoryReporters.xul new file mode 100644 index 000000000..9d56890b3 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_memoryReporters.xul @@ -0,0 +1,424 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters2.xul b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xul new file mode 100644 index 000000000..0e8ba2e81 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xul @@ -0,0 +1,108 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul new file mode 100644 index 000000000..3452bbbc7 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul @@ -0,0 +1,54 @@ + + + + + + + + + + + + -- cgit v1.2.3