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

Unified Diff: content/browser/webui/i18n_source_stream_unittest.cc

Issue 2601313002: [MD settings] stream i18n replacement without large accumulation buffer (Closed)
Patch Set: review changes Created 3 years, 12 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
Index: content/browser/webui/i18n_source_stream_unittest.cc
diff --git a/content/browser/webui/i18n_source_stream_unittest.cc b/content/browser/webui/i18n_source_stream_unittest.cc
index 76ebf694ddace05c6c1be40942e429b9f8bca551..05c6087672126b5f3be8cb5c7c248a47b19ded61 100644
--- a/content/browser/webui/i18n_source_stream_unittest.cc
+++ b/content/browser/webui/i18n_source_stream_unittest.cc
@@ -218,4 +218,18 @@ TEST_P(I18nSourceStreamTest, I18nInMultipleReads) {
EXPECT_EQ("i18n", stream()->Description());
}
+TEST_P(I18nSourceStreamTest, I18nTagAtEndOfLine) {
+ Init();
+ const char source_data[] = "test with tag at end of line $";
mmenke 2017/01/03 20:47:32 nit: kSourceData
dschuyler 2017/01/03 21:51:40 Done.
+ const size_t source_size = strlen(source_data);
+ source()->AddReadResult(source_data, source_size, net::OK, GetParam().mode);
+ source()->AddReadResult(source_data + source_size, 0, net::OK,
mmenke 2017/01/03 20:47:32 Know it's what the other tests do, but the first a
dschuyler 2017/01/03 21:51:40 Done.
+ GetParam().mode);
+ std::string actual_output;
+ int rv = ReadStream(&actual_output);
+ EXPECT_EQ(static_cast<int>(source_size), rv);
+ EXPECT_EQ(std::string(source_data, source_size), actual_output);
mmenke 2017/01/03 20:47:32 std::string(source_data, source_size) -> source_da
dschuyler 2017/01/03 21:51:40 Done.
+ EXPECT_EQ("i18n", stream()->Description());
+}
+
} // namespace content
« content/browser/webui/i18n_source_stream.cc ('K') | « content/browser/webui/i18n_source_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698