Title: [198355] trunk/LayoutTests
Revision
198355
Author
[email protected]
Date
2016-03-17 15:17:37 -0700 (Thu, 17 Mar 2016)

Log Message

Unreviewed follow-up fix to test after r198353.

* inspector/unit-tests/heap-snapshot.html:
Account for <root> in a few places.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (198354 => 198355)


--- trunk/LayoutTests/ChangeLog	2016-03-17 21:04:49 UTC (rev 198354)
+++ trunk/LayoutTests/ChangeLog	2016-03-17 22:17:37 UTC (rev 198355)
@@ -1,3 +1,10 @@
+2016-03-17  Joseph Pecoraro  <[email protected]>
+
+        Unreviewed follow-up fix to test after r198353.
+
+        * inspector/unit-tests/heap-snapshot.html:
+        Account for <root> in a few places.
+
 2016-03-17  Sam Weinig  <[email protected]>
 
         Implement document.queryCommandSupported("copy")

Modified: trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html (198354 => 198355)


--- trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html	2016-03-17 21:04:49 UTC (rev 198354)
+++ trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html	2016-03-17 22:17:37 UTC (rev 198355)
@@ -43,7 +43,7 @@
             this.nodes = nodes;
             this.nodeMap = nodeMap;
             this.totalSize = nodes.reduce((sum, node) => sum += node.size, 0);
-            this.totalObjectCount = nodes.length;
+            this.totalObjectCount = nodes.length - 1; // <root>.
         }
 
         static fromPayload(payload)
@@ -103,7 +103,8 @@
         instancesWithClassName(className)
         {
             let results = [];
-            for (let i = 0; i < this.nodes.length; ++i) {
+            // Skip <root>.
+            for (let i = 1; i < this.nodes.length; ++i) {
                 let node = this.nodes[i];
                 if (node.className === className)
                     results.push(node);
@@ -200,7 +201,9 @@
         test: (resolve, reject) => {
             let testSmall = 0, testMedium = 0, testLarge = 0;
             const smallSize = 32, mediumSize = 128;
-            for (let {size} of testSnapshot.nodes) {
+            // Skip <root>.
+            for (let i = 1; i < testSnapshot.nodes.length; ++i) {
+                let {size} = testSnapshot.nodes[i];
                 if (size < smallSize)
                     testSmall++;
                 else if (size < mediumSize)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to