From 06d70b4e2c9a9e6f0828eb47c0b59fff02e2896a Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Mon, 7 May 2018 03:58:20 -0700 Subject: [PATCH] Bug 1462564 - Remove memory DAMP tests. r=yulia MozReview-Commit-ID: BWXyPnriTcR --HG-- extra : rebase_source : 7cdc45bc1e599b5fcbc0a0c375338e63ce59512e --- .../devtools/addon/content/damp-tests.js | 8 --- .../addon/content/tests/memory/complicated.js | 24 -------- .../content/tests/memory/memory-helpers.js | 58 ------------------- .../addon/content/tests/memory/simple.js | 24 -------- 4 files changed, 114 deletions(-) delete mode 100644 testing/talos/talos/tests/devtools/addon/content/tests/memory/complicated.js delete mode 100644 testing/talos/talos/tests/devtools/addon/content/tests/memory/memory-helpers.js delete mode 100644 testing/talos/talos/tests/devtools/addon/content/tests/memory/simple.js diff --git a/testing/talos/talos/tests/devtools/addon/content/damp-tests.js b/testing/talos/talos/tests/devtools/addon/content/damp-tests.js index 4650bbee1023..23cf57818c2f 100644 --- a/testing/talos/talos/tests/devtools/addon/content/damp-tests.js +++ b/testing/talos/talos/tests/devtools/addon/content/damp-tests.js @@ -49,10 +49,6 @@ window.DAMP_TESTS = [ name: "simple.netmonitor", path: "netmonitor/simple.js", description: "Measure open/close toolbox on network monitor panel against simple document" - }, { - name: "simple.memory", - path: "memory/simple.js", - description: "Measure open/close toolbox on memory panel and save/read heap snapshot against simple document" }, // Run all tests against "complicated" document { @@ -79,10 +75,6 @@ window.DAMP_TESTS = [ name: "complicated.netmonitor", path: "netmonitor/complicated.js", description: "Measure open/close toolbox on network monitor panel against complicated document" - }, { - name: "complicated.memory", - path: "memory/complicated.js", - description: "Measure open/close toolbox on memory panel and save/read heap snapshot against complicated document" }, // Run all tests against a document specific to each tool { diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/memory/complicated.js b/testing/talos/talos/tests/devtools/addon/content/tests/memory/complicated.js deleted file mode 100644 index 493ea35b58e6..000000000000 --- a/testing/talos/talos/tests/devtools/addon/content/tests/memory/complicated.js +++ /dev/null @@ -1,24 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const { openToolboxAndLog, closeToolboxAndLog, reloadPageAndLog, testSetup, - testTeardown, COMPLICATED_URL } = require("../head"); -const { saveHeapSnapshot, readHeapSnapshot, takeCensus } = require("./memory-helpers"); - -module.exports = async function() { - await testSetup(COMPLICATED_URL); - - const toolbox = await openToolboxAndLog("complicated.memory", "memory"); - await reloadPageAndLog("complicated.memory", toolbox); - - let heapSnapshotFilePath = await saveHeapSnapshot("complicated"); - let snapshot = await readHeapSnapshot("complicated", heapSnapshotFilePath); - await takeCensus("complicated", snapshot); - - await closeToolboxAndLog("complicated.memory", toolbox); - await testTeardown(); -}; - diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/memory/memory-helpers.js b/testing/talos/talos/tests/devtools/addon/content/tests/memory/memory-helpers.js deleted file mode 100644 index fc308588a48e..000000000000 --- a/testing/talos/talos/tests/devtools/addon/content/tests/memory/memory-helpers.js +++ /dev/null @@ -1,58 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const { getToolbox, runTest } = require("../head"); - -exports.saveHeapSnapshot = async function(label) { - let toolbox = getToolbox(); - let panel = toolbox.getCurrentPanel(); - let memoryFront = panel.panelWin.gFront; - - let test = runTest(label + ".saveHeapSnapshot"); - let heapSnapshotFilePath = await memoryFront.saveHeapSnapshot(); - test.done(); - - return heapSnapshotFilePath; -}; - -exports.readHeapSnapshot = function(label, snapshotFilePath) { - const ChromeUtils = require("ChromeUtils"); - let test = runTest(label + ".readHeapSnapshot"); - let snapshot = ChromeUtils.readHeapSnapshot(snapshotFilePath); - test.done(); - - return Promise.resolve(snapshot); -}; - -exports.takeCensus = function(label, snapshot) { - let test = runTest("complicated.takeCensus"); - snapshot.takeCensus({ - breakdown: { - by: "coarseType", - objects: { - by: "objectClass", - then: { by: "count", bytes: true, count: true }, - other: { by: "count", bytes: true, count: true } - }, - strings: { - by: "internalType", - then: { by: "count", bytes: true, count: true } - }, - scripts: { - by: "internalType", - then: { by: "count", bytes: true, count: true } - }, - other: { - by: "internalType", - then: { by: "count", bytes: true, count: true } - } - } - }); - - test.done(); - - return Promise.resolve(); -}; diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/memory/simple.js b/testing/talos/talos/tests/devtools/addon/content/tests/memory/simple.js deleted file mode 100644 index e3a8f60b92d3..000000000000 --- a/testing/talos/talos/tests/devtools/addon/content/tests/memory/simple.js +++ /dev/null @@ -1,24 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const { openToolboxAndLog, closeToolboxAndLog, reloadPageAndLog, testSetup, - testTeardown, SIMPLE_URL } = require("../head"); -const { saveHeapSnapshot, readHeapSnapshot, takeCensus } = require("./memory-helpers"); - -module.exports = async function() { - await testSetup(SIMPLE_URL); - - const toolbox = await openToolboxAndLog("simple.memory", "memory"); - await reloadPageAndLog("simple.memory", toolbox); - - let heapSnapshotFilePath = await saveHeapSnapshot("simple"); - let snapshot = await readHeapSnapshot("simple", heapSnapshotFilePath); - await takeCensus("simple", snapshot); - - await closeToolboxAndLog("simple.memory", toolbox); - await testTeardown(); -}; -