summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es5
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/webkit/PerformanceTests/six-speed/tests/map-set.es5')
-rw-r--r--third_party/webkit/PerformanceTests/six-speed/tests/map-set.es516
1 files changed, 16 insertions, 0 deletions
diff --git a/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es5 b/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es5
new file mode 100644
index 0000000000..b99ec7ad04
--- /dev/null
+++ b/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es5
@@ -0,0 +1,16 @@
+function fn() {
+ var map = {},
+ set = [];
+
+ for (var i = 0; i < 250; i++) {
+ map[i] = i;
+ set.push(i);
+ }
+
+ map.foo = 'bar';
+ set.push('bar');
+ return ('foo' in map) && set.indexOf('bar') >= 0;
+}
+
+assertEqual(fn(), true);
+test(fn);