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

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

Issue 1378403004: [api] expose Array Iterators to API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased u_u Created 5 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 | « src/contexts.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index a116e1762de47a8f73986786ad8d20499aba2d30..213ff52add27d86d4f4459334d7ef82ecff7bf6b 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -21900,3 +21900,18 @@ TEST(AccessCheckedIsConcatSpreadable) {
ExpectTrue("result.length === 1");
ExpectTrue("object[Symbol.isConcatSpreadable] === undefined");
}
+
+
+TEST(ArrayIteratorMethods) {
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
+ LocalContext env;
+
+ env->Global()->Set(v8_str("keys"), v8::Array::GetKeysIterator(isolate));
+ env->Global()->Set(v8_str("values"), v8::Array::GetValuesIterator(isolate));
+ env->Global()->Set(v8_str("entries"), v8::Array::GetEntriesIterator(isolate));
+
+ ExpectString("typeof keys", "function");
+ ExpectString("typeof values", "function");
+ ExpectString("typeof entries", "function");
+}
« no previous file with comments | « src/contexts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698