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

Unified Diff: test/js-perf-test/Strings/harmony-string.js

Issue 742963002: Rename String.prototype.contains to 'includes'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test262-es6 tests Created 6 years, 1 month 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 | « src/harmony-string.js ('k') | test/mjsunit/harmony/string-contains.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/js-perf-test/Strings/harmony-string.js
diff --git a/test/js-perf-test/Strings/harmony-string.js b/test/js-perf-test/Strings/harmony-string.js
index f430ab45789d2064e7a744cfc609a6c730452bb5..c2eac4ee33d4f4578b3f34f5fbbc5c35130d9033 100644
--- a/test/js-perf-test/Strings/harmony-string.js
+++ b/test/js-perf-test/Strings/harmony-string.js
@@ -9,8 +9,8 @@ new BenchmarkSuite('StringFunctions', [1000], [
StartsWith, WithSetup, WithTearDown),
new Benchmark('StringEndsWith', false, false, 0,
EndsWith, WithSetup, WithTearDown),
- new Benchmark('StringContains', false, false, 0,
- Contains, ContainsSetup, WithTearDown),
+ new Benchmark('StringIncludes', false, false, 0,
+ Includes, IncludesSetup, WithTearDown),
new Benchmark('StringFromCodePoint', false, false, 0,
FromCodePoint, FromCodePointSetup, FromCodePointTearDown),
new Benchmark('StringCodePointAt', false, false, 0,
@@ -60,13 +60,13 @@ function EndsWith() {
result = str.endsWith(substr);
}
-function ContainsSetup() {
+function IncludesSetup() {
str = "def".repeat(100) + "abc".repeat(100) + "qqq".repeat(100);
substr = "abc".repeat(100);
}
-function Contains() {
- result = str.contains(substr);
+function Includes() {
+ result = str.includes(substr);
}
var MAX_CODE_POINT = 0xFFFFF;
« no previous file with comments | « src/harmony-string.js ('k') | test/mjsunit/harmony/string-contains.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698