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

Unified Diff: test/cctest/test-strings.cc

Issue 631743002: Fix no-i18n tests after adding counter (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/test-strings.cc
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc
index 88aa72fb00800e064091429aea05acb6d24ecc64..ef3d98866f7e94ba1c9bb36545e81ec6255a82d2 100644
--- a/test/cctest/test-strings.cc
+++ b/test/cctest/test-strings.cc
@@ -1312,12 +1312,16 @@ TEST(CountBreakIterator) {
CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
CHECK_EQ(0, use_counts[v8::Isolate::kBreakIterator]);
v8::Local<v8::Value> result = CompileRun(
- "var iterator = Intl.v8BreakIterator(['en']);"
- "iterator.adoptText('Now is the time');"
- "iterator.next();"
- "iterator.next();");
+ "(function() {"
+ " if (!this.Intl) return 0;"
+ " var iterator = Intl.v8BreakIterator(['en']);"
+ " iterator.adoptText('Now is the time');"
+ " iterator.next();"
+ " return iterator.next();"
+ "})();");
CHECK(result->IsNumber());
- CHECK_EQ(1, use_counts[v8::Isolate::kBreakIterator]);
+ int uses = result->ToInt32()->Value() == 0 ? 0 : 1;
+ CHECK_EQ(uses, use_counts[v8::Isolate::kBreakIterator]);
}
« 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