Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py

Issue 393123003: Add warnings to inspector DOM count unittest baselines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add msg Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py b/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
index 710db05b1732157e3c4c7a9fa899ed028208e265..59d1ce898826927bf0b6034ffcd99855c8e1a64a 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
@@ -16,7 +16,15 @@ class InspectorMemoryTest(tab_test_case.TabTestCase):
self.Navigate('dom_counter_sample.html')
+ # Document_count > 1 indicates that WebCore::Document loaded in Chrome
+ # is leaking! The baseline should exactly match the numbers on:
+ # unittest_data/dom_counter_sample.html
+ # Please contact kouhei@, hajimehoshi@ when rebaselining.
counts = self._tab.dom_stats
- self.assertEqual(counts['document_count'], 1)
- self.assertEqual(counts['node_count'], 14)
- self.assertEqual(counts['event_listener_count'], 2)
+ self.assertEqual(counts['document_count'], 1,
+ 'Document leak is detected! '+
+ 'The previous document is likely retained unexpectedly.')
+ self.assertEqual(counts['node_count'], 14,
+ 'Node leak is detected!')
+ self.assertEqual(counts['event_listener_count'], 2,
+ 'EventListener leak is detected!')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698