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

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

Issue 21959003: Expose JSON parser through V8 API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
« src/api.cc ('K') | « src/api.cc ('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 92ab5b8546959c820af1cd46ddfd485e80e0a83a..511a9440b2c83172b61516ed6fb5121667dbdc6f 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -19863,6 +19863,16 @@ THREADED_TEST(Regress260106) {
}
+THREADED_TEST(JSONParse) {
+ LocalContext context;
+ HandleScope scope(context->GetIsolate());
+ Local<Object> obj = v8::JSON::Parse(v8_str("{\"x\":42}"));
+ Handle<Object> global = context->Global();
+ global->Set(v8_str("obj"), obj);
+ ExpectString("JSON.stringify(obj)", "{\"x\":42}");
+}
+
+
#ifndef WIN32
class ThreadInterruptTest {
public:
« src/api.cc ('K') | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698