Bug 1312883 - Update test_ThreadHangStats.js for the new format for nativeStacks. r=snorp
authorMike Conley <mconley@mozilla.com>
Fri, 24 Feb 2017 10:31:51 -0500
changeset 489428 392ec4e96ddbcdce859627462849ea0d2dcace8b
parent 489427 3b85c9efa7ddca58d8d62e3838fc47b471ce35a0
child 489429 281b088f98eb15bb6946c002673a128af7194ebf
push id46822
push userbmo:emilio+bugs@crisal.io
push dateFri, 24 Feb 2017 20:50:08 +0000
reviewerssnorp
bugs1312883
milestone54.0a1
Bug 1312883 - Update test_ThreadHangStats.js for the new format for nativeStacks. r=snorp MozReview-Commit-ID: DUnq1TNHqcX
toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
--- a/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
+++ b/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
@@ -82,19 +82,21 @@ function run_test() {
 
       ok(Array.isArray(endHangs.hangs[0].stack));
       notEqual(endHangs.hangs[0].stack.length, 0);
       equal(typeof endHangs.hangs[0].stack[0], "string");
 
       // Make sure one of the hangs is a permanent
       // hang containing a native stack.
       ok(endHangs.hangs.some((hang) => (
-        Array.isArray(hang.nativeStack) &&
-        hang.nativeStack.length !== 0 &&
-        typeof hang.nativeStack[0] === "string"
+        hang.nativeStack &&
+        Array.isArray(hang.nativeStack.memoryMap) &&
+        hang.nativeStack.memoryMap.length !== 0 &&
+        Array.isArray(hang.nativeStack.stacks) &&
+        hang.nativeStack.stacks.length !== 0
       )));
 
       check_histogram(endHangs.hangs[0].histogram);
 
       do_test_finished();
     };
 
     check_results();