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()); |
+} |