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

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

Issue 172045: Added API for getting object mirrors (Closed)
Patch Set: Created 11 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
« no previous file with comments | « 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-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 9e2c38dbeeda4eae13a9fd83bc7df966e9eaefea..a86317ad3861582b9a0e62fc4fe41018f8dd7d9c 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -5357,3 +5357,20 @@ TEST(NoDebugBreakInAfterCompileMessageHandler) {
v8::Debug::SetMessageHandler2(NULL);
CheckDebuggerUnloaded();
}
+
+
+TEST(GetMirror) {
+ v8::HandleScope scope;
+ DebugLocalContext env;
+ v8::Handle<v8::Value> obj = v8::Debug::GetMirror(v8::String::New("hodja"));
+ v8::Handle<v8::Function> run_test = v8::Handle<v8::Function>::Cast(
+ v8::Script::New(
+ v8::String::New(
+ "function runTest(mirror) {"
+ " return mirror.isString() && (mirror.length() == 5);"
+ "}"
+ ""
+ "runTest;"))->Run());
+ v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj);
+ CHECK(result->IsTrue());
+}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698