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

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

Issue 882913002: Run V8 GC before detecting Document leaks in inspector_memory_unittest.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/inspector_memory_unittest.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_memory_unittest.py b/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_memory_unittest.py
index f1edea571a056afe86ca2f12a6a025be31706b59..064ad3c5855b164f048d97dacdc3b8df1f9cf681 100644
--- a/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_memory_unittest.py
+++ b/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_memory_unittest.py
@@ -9,7 +9,6 @@ from telemetry.unittest_util import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@decorators.Enabled('has tabs')
- @decorators.Disabled # http://crbug.com/422244
def testGetDOMStats(self):
# Due to an issue with CrOS, we create a new tab here rather than
# using the existing tab to get a consistent starting page on all platforms.
@@ -17,6 +16,8 @@ class InspectorMemoryTest(tab_test_case.TabTestCase):
self.Navigate('dom_counter_sample.html')
+ self._tab.ExecuteJavaScript('gc();')
+
# 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
@@ -29,3 +30,7 @@ class InspectorMemoryTest(tab_test_case.TabTestCase):
'Node leak is detected!')
self.assertEqual(counts['event_listener_count'], 2,
'EventListener leak is detected!')
+
+ @classmethod
+ def CustomizeBrowserOptions(cls, options):
+ options.AppendExtraBrowserArgs('--js-flags=--expose-gc')
« 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