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

Unified Diff: test/cctest/parsing/test-scanner-streams.cc

Issue 2663883002: Regression test for Utf-8 BOM handling (crbug.com/685618). (Closed)
Patch Set: Created 3 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: test/cctest/parsing/test-scanner-streams.cc
diff --git a/test/cctest/parsing/test-scanner-streams.cc b/test/cctest/parsing/test-scanner-streams.cc
index 8d84dc8f06cd6224589e4c4f80f85f1a58ce6be3..b4b28f1fc5b67cc07e9f6e29720cd7567a272a07 100644
--- a/test/cctest/parsing/test-scanner-streams.cc
+++ b/test/cctest/parsing/test-scanner-streams.cc
@@ -132,6 +132,13 @@ TEST(Utf8StreamBOM) {
stream->Seek(5);
CHECK_EQ(unicode_ucs2[5], stream->Advance());
+
+ // Try again, but make sure we have to seek 'backwards'.
+ while (v8::internal::Utf16CharacterStream::kEndOfInput != stream->Advance()) {
+ // Do nothing. We merely advance the stream to the end of its input.
+ }
+ stream->Seek(5);
+ CHECK_EQ(unicode_ucs2[5], stream->Advance());
}
TEST(Utf8SplitBOM) {
« 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