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

Unified Diff: ui/base/template_expressions_unittest.cc

Issue 2829833005: [i18n] unit test for commas in Polymer (Closed)
Patch Set: Created 3 years, 8 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: ui/base/template_expressions_unittest.cc
diff --git a/ui/base/template_expressions_unittest.cc b/ui/base/template_expressions_unittest.cc
index 984817c2444109bd075045a7219d2fa07fc66d1f..41d253c8e97691f5724340b82ba4a484c1823901 100644
--- a/ui/base/template_expressions_unittest.cc
+++ b/ui/base/template_expressions_unittest.cc
@@ -8,6 +8,9 @@
namespace ui {
+// Tip: ui_base_unittests --gtest_filter='TemplateExpressionsTest.*' to run
+// these tests.
+
TEST(TemplateExpressionsTest, ReplaceTemplateExpressionsPieces) {
TemplateReplacements substitutions;
substitutions["test"] = "word";
@@ -72,14 +75,14 @@ TEST(TemplateExpressionsTest, ReplaceTemplateExpressionsPolymerQuoting) {
TEST(TemplateExpressionsTest, ReplaceTemplateExpressionsPolymerMixed) {
static TemplateReplacements substitutions;
- substitutions["punctuationSample"] = "a\"b'c<d>e&f";
+ substitutions["punctuationSample"] = "a\"b'c<d>e&f,g";
substitutions["htmlSample"] = "<div>hello</div>";
- EXPECT_EQ("a\\\"b\\'c<d>e&f",
+ EXPECT_EQ("a\\\"b\\'c<d>e&f\\,g",
ReplaceTemplateExpressions("$i18nPolymer{punctuationSample}",
substitutions));
EXPECT_EQ("<div>hello</div>", ReplaceTemplateExpressions(
"$i18nPolymer{htmlSample}", substitutions));
- EXPECT_EQ("multiple: <div>hello</div>, a\\\"b\\'c<d>e&f.",
+ EXPECT_EQ("multiple: <div>hello</div>, a\\\"b\\'c<d>e&f\\,g.",
ReplaceTemplateExpressions("multiple: $i18nPolymer{htmlSample}, "
"$i18nPolymer{punctuationSample}.",
substitutions));
« 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