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

Unified Diff: tools/perf/measurements/v8_detached_context_age_in_gc_unittest.py

Issue 2694163003: [tools/perf] Prepare V8DetachedContextAgeInGCTests for JS API migration (Closed)
Patch Set: Created 3 years, 10 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/perf/measurements/v8_detached_context_age_in_gc_unittest.py
diff --git a/tools/perf/measurements/v8_detached_context_age_in_gc_unittest.py b/tools/perf/measurements/v8_detached_context_age_in_gc_unittest.py
index 42e53305d8f8c34f9acd524590e334ecfbbfa5dc..215edaa346eed277f95dc59f2ef56371ab92929f 100644
--- a/tools/perf/measurements/v8_detached_context_age_in_gc_unittest.py
+++ b/tools/perf/measurements/v8_detached_context_age_in_gc_unittest.py
@@ -27,12 +27,17 @@ class FakeTab(object):
self.histograms = histograms
self.current_histogram_index = 0
- def EvaluateJavaScript(self, script):
- if 'V8.DetachedContextAgeInGC' in script:
+ def EvaluateJavaScript(self, script, **kwargs):
+ histogram_name = 'V8.DetachedContextAgeInGC'
+ if kwargs.get('name') == histogram_name or histogram_name in script:
perezju 2017/02/14 11:42:04 Tweaked to work both before and after applying the
self.current_histogram_index += 1
return self.histograms[self.current_histogram_index - 1]
return '{}'
+ # TODO(catapult:3028): Remove after migration to new JS API completed.
+ def EvaluateJavaScript2(self, script, **kwargs):
+ return self.EvaluateJavaScript(script, **kwargs)
+
def CollectGarbage(self):
pass
« 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