Bug 1369801 - dt-addon-xpcshell: move memory xpcshell test to avoid loading devtools preferences draft
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 16 Jun 2017 17:26:21 +0200
changeset 606667 353f1053a23ee0e1b3285614f7397621cea88e63
parent 606666 78982c0608e2e9d31397c813364dd1f8dcfe591b
child 606668 e6639998f206d5caa58abbe61331c8343c3d3e6c
push id67765
push userjdescottes@mozilla.com
push dateTue, 11 Jul 2017 08:07:43 +0000
bugs1369801
milestone56.0a1
Bug 1369801 - dt-addon-xpcshell: move memory xpcshell test to avoid loading devtools preferences MozReview-Commit-ID: JXcXI9kpPpt
devtools/shared/heapsnapshot/moz.build
devtools/shared/heapsnapshot/tests/unit/test_saveHeapSnapshot_e10s_01.js
devtools/shared/heapsnapshot/tests/unit/xpcshell.ini
devtools/shared/heapsnapshot/tests/unit_ipc/.eslintrc.js
devtools/shared/heapsnapshot/tests/unit_ipc/head.js
devtools/shared/heapsnapshot/tests/unit_ipc/test_saveHeapSnapshot_e10s_01.js
devtools/shared/heapsnapshot/tests/unit_ipc/xpcshell.ini
--- a/devtools/shared/heapsnapshot/moz.build
+++ b/devtools/shared/heapsnapshot/moz.build
@@ -5,17 +5,20 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Developer Tools: Memory')
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
 
-XPCSHELL_TESTS_MANIFESTS += [ 'tests/unit/xpcshell.ini' ]
+XPCSHELL_TESTS_MANIFESTS += [
+    'tests/unit/xpcshell.ini',
+    'tests/unit_ipc/xpcshell.ini',
+]
 MOCHITEST_MANIFESTS += [ 'tests/mochitest/mochitest.ini' ]
 MOCHITEST_CHROME_MANIFESTS += [ 'tests/mochitest/chrome.ini' ]
 
 EXPORTS.mozilla.devtools += [
     'AutoMemMap.h',
     'CoreDump.pb.h',
     'DeserializedNode.h',
     'DominatorTree.h',
deleted file mode 100644
--- a/devtools/shared/heapsnapshot/tests/unit/test_saveHeapSnapshot_e10s_01.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-// Test saving a heap snapshot in the sandboxed e10s child process.
-
-function run_test() {
-  run_test_in_child("../unit/test_SaveHeapSnapshot.js");
-}
--- a/devtools/shared/heapsnapshot/tests/unit/xpcshell.ini
+++ b/devtools/shared/heapsnapshot/tests/unit/xpcshell.ini
@@ -89,9 +89,8 @@ support-files =
 [test_HeapSnapshot_takeCensus_11.js]
 [test_HeapSnapshot_takeCensus_12.js]
 [test_ReadHeapSnapshot.js]
 [test_ReadHeapSnapshot_with_allocations.js]
 skip-if = os == 'linux' # Bug 1176173
 [test_ReadHeapSnapshot_worker.js]
 skip-if = os == 'linux' # Bug 1176173
 [test_SaveHeapSnapshot.js]
-[test_saveHeapSnapshot_e10s_01.js]
new file mode 100644
--- /dev/null
+++ b/devtools/shared/heapsnapshot/tests/unit_ipc/.eslintrc.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = {
+  // Extend from the common devtools xpcshell eslintrc config.
+  "extends": "../../../../.eslintrc.xpcshell.js"
+};
new file mode 100644
--- /dev/null
+++ b/devtools/shared/heapsnapshot/tests/unit_ipc/head.js
@@ -0,0 +1,10 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+/* exported Cu, CC */
+
+// Simplistic head.js simply gathering dependencies needed for test_SaveHeapSnapshot.js
+var Cu = Components.utils;
+var CC = Components.Constructor;
new file mode 100644
--- /dev/null
+++ b/devtools/shared/heapsnapshot/tests/unit_ipc/test_saveHeapSnapshot_e10s_01.js
@@ -0,0 +1,9 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+// Test saving a heap snapshot in the sandboxed e10s child process.
+
+function run_test() {
+  run_test_in_child("../unit/test_SaveHeapSnapshot.js");
+}
new file mode 100644
--- /dev/null
+++ b/devtools/shared/heapsnapshot/tests/unit_ipc/xpcshell.ini
@@ -0,0 +1,7 @@
+[DEFAULT]
+tags = devtools heapsnapshot devtools-memory
+head = head.js
+firefox-appdir = browser
+skip-if = toolkit == 'android'
+
+[test_saveHeapSnapshot_e10s_01.js]