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

Unified Diff: telemetry/telemetry/util/js_template_unittest.py

Issue 2693923005: Reland of [Telemetry] Switch clients to new JavaScript API (batch 5) (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 | « telemetry/telemetry/util/js_template.py ('k') | telemetry/telemetry/value/histogram_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/util/js_template_unittest.py
diff --git a/telemetry/telemetry/util/js_template_unittest.py b/telemetry/telemetry/util/js_template_unittest.py
index c3d698aef975bfcb585b513f3ce6a14e759be19c..b233a8ab1a256a818dbe465aaf5590398a7b0be1 100644
--- a/telemetry/telemetry/util/js_template_unittest.py
+++ b/telemetry/telemetry/util/js_template_unittest.py
@@ -29,6 +29,12 @@
var_name='foo', x='bar', y=None),
'var foo = "bar" + null;')
+ def testRenderWithArgumentExpansion(self):
+ self.assertEquals(
+ js_template.Render(
+ '{{ @f }}({{ *args }})', f='foo', args=(1, 'hi!', None)),
+ 'foo(1, "hi!", null)')
+
def testRenderRaisesWithUnknownIdentifier(self):
with self.assertRaises(KeyError):
js_template.Render('foo({{ some_name }})', another_name='bar')
« no previous file with comments | « telemetry/telemetry/util/js_template.py ('k') | telemetry/telemetry/value/histogram_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698