diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 17:32:39 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:50:57 +0200 |
commit | 36fc5f674ef1a02d1498484c563a7108f4de44ed (patch) | |
tree | 120483cd8fc0decd189d5118941a9b23d6156ad5 /devtools/shared/heapsnapshot/tests/mochitest | |
parent | 7b30664f59e65cadb7d5eb2e42591e90a32871f8 (diff) | |
download | UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar.gz UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar.lz UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.tar.xz UXP-36fc5f674ef1a02d1498484c563a7108f4de44ed.zip |
Reclassify heapsnapshot and nsJSInspector as not part of devtools
This resolves Issue #316
Diffstat (limited to 'devtools/shared/heapsnapshot/tests/mochitest')
5 files changed, 0 insertions, 158 deletions
diff --git a/devtools/shared/heapsnapshot/tests/mochitest/chrome.ini b/devtools/shared/heapsnapshot/tests/mochitest/chrome.ini deleted file mode 100644 index 497b6fe37..000000000 --- a/devtools/shared/heapsnapshot/tests/mochitest/chrome.ini +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -tags = devtools devtools-memory -skip-if = os == 'android' -support-files = - -[test_DominatorTree_01.html] -[test_SaveHeapSnapshot.html] - diff --git a/devtools/shared/heapsnapshot/tests/mochitest/mochitest.ini b/devtools/shared/heapsnapshot/tests/mochitest/mochitest.ini deleted file mode 100644 index 5e7aa8d10..000000000 --- a/devtools/shared/heapsnapshot/tests/mochitest/mochitest.ini +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] -tags = devtools devtools-memory -support-files = - -[test_saveHeapSnapshot_e10s_01.html] - diff --git a/devtools/shared/heapsnapshot/tests/mochitest/test_DominatorTree_01.html b/devtools/shared/heapsnapshot/tests/mochitest/test_DominatorTree_01.html deleted file mode 100644 index 1f9d8c080..000000000 --- a/devtools/shared/heapsnapshot/tests/mochitest/test_DominatorTree_01.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -Sanity test that we can compute dominator trees from a heap snapshot in a web window. ---> -<head> - <meta charset="utf-8"> - <title>ChromeUtils.saveHeapSnapshot test</title> - <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"> -</head> -<body> -<pre id="test"> -<script> -SimpleTest.waitForExplicitFinish(); -window.onload = function() { - const path = ChromeUtils.saveHeapSnapshot({ runtime: true }); - const snapshot = ChromeUtils.readHeapSnapshot(path); - - const dominatorTree = snapshot.computeDominatorTree(); - ok(dominatorTree); - ok(dominatorTree instanceof DominatorTree); - - let threw = false; - try { - new DominatorTree(); - } catch (e) { - threw = true; - } - ok(threw, "Constructor shouldn't be usable"); - - SimpleTest.finish(); -}; -</script> -</pre> -</body> -</html> diff --git a/devtools/shared/heapsnapshot/tests/mochitest/test_SaveHeapSnapshot.html b/devtools/shared/heapsnapshot/tests/mochitest/test_SaveHeapSnapshot.html deleted file mode 100644 index f150a99c7..000000000 --- a/devtools/shared/heapsnapshot/tests/mochitest/test_SaveHeapSnapshot.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -Bug 1024774 - Sanity test that we can take a heap snapshot in a web window. ---> -<head> - <meta charset="utf-8"> - <title>ChromeUtils.saveHeapSnapshot test</title> - <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"> -</head> -<body> -<pre id="test"> -<script> -SimpleTest.waitForExplicitFinish(); -window.onload = function() { - ok(ChromeUtils, "The ChromeUtils interface should be exposed in chrome windows."); - ChromeUtils.saveHeapSnapshot({ runtime: true }); - ok(true, "Should save a heap snapshot and shouldn't throw."); - SimpleTest.finish(); -}; -</script> -</pre> -</body> -</html> diff --git a/devtools/shared/heapsnapshot/tests/mochitest/test_saveHeapSnapshot_e10s_01.html b/devtools/shared/heapsnapshot/tests/mochitest/test_saveHeapSnapshot_e10s_01.html deleted file mode 100644 index 15f88f8e0..000000000 --- a/devtools/shared/heapsnapshot/tests/mochitest/test_saveHeapSnapshot_e10s_01.html +++ /dev/null @@ -1,82 +0,0 @@ -<!DOCTYPE HTML> -<!-- -Bug 1201597 - Sanity test that we can take a heap snapshot in an e10s child process. ---> -<html> -<head> - <title>saveHeapSnapshot in e10s child processes</title> - <script type="application/javascript" - src="/tests/SimpleTest/SimpleTest.js"> - </script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> -</head> -<body> - <script type="application/javascript"> - window.onerror = function (msg, url, line, col, err) { - ok(false, "@" + url + ":" + line + ":" + col + ": " + msg + "\n" + err.stack); - }; - - SimpleTest.waitForExplicitFinish(); - - var childFrameURL = "data:text/html,<!DOCTYPE HTML><html><body></body></html>"; - - // This function is stringified and loaded in the child process as a frame - // script. - function childFrameScript() { - try { - ChromeUtils.saveHeapSnapshot({ runtime: true }); - } catch (err) { - sendAsyncMessage("testSaveHeapSnapshot:error", - { error: err.toString() }); - return; - } - - sendAsyncMessage("testSaveHeapSnapshot:done", {}); - } - - // Kick everything off on load. - window.onload = function () { - info("window.onload fired"); - SpecialPowers.addPermission("browser", true, document); - SpecialPowers.pushPrefEnv({ - "set": [ - ["dom.ipc.browser_frames.oop_by_default", true], - ["dom.mozBrowserFramesEnabled", true], - ["browser.pagethumbnails.capturing_disabled", true] - ] - }, function () { - var iframe = document.createElement("iframe"); - SpecialPowers.wrap(iframe).mozbrowser = true; - iframe.id = "iframe"; - iframe.src = childFrameURL; - - - iframe.addEventListener("mozbrowserloadend", function onLoadEnd() { - iframe.removeEventListener("mozbrowserloadend", onLoadEnd); - info("iframe done loading"); - - var mm = SpecialPowers.getBrowserFrameMessageManager(iframe); - - function onError(e) { - ok(false, e.data.error); - } - mm.addMessageListener("testSaveHeapSnapshot:error", onError); - - mm.addMessageListener("testSaveHeapSnapshot:done", function onMsg() { - mm.removeMessageListener("testSaveHeapSnapshot:done", onMsg); - mm.removeMessageListener("testSaveHeapSnapshot:error", onError); - ok(true, "Saved heap snapshot in child process"); - SimpleTest.finish(); - }); - - info("Loading frame script to save heap snapshot"); - mm.loadFrameScript("data:,(" + encodeURI(childFrameScript.toString()) + ")();", - false); - }); - - info("Loading iframe"); - document.body.appendChild(iframe); - }); - }; - </script> -</window> |