Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 664f905105e7ca0a1f708c58d68eef22e5265bec..92ab5b8546959c820af1cd46ddfd485e80e0a83a 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -4388,7 +4388,7 @@ TEST(APIThrowMessageOverwrittenToString) { |
} |
-static void check_custom_error_tostring( |
+static void check_custom_error_message( |
v8::Handle<v8::Message> message, |
v8::Handle<v8::Value> data) { |
const char* uncaught_error = "Uncaught MyError toString"; |
@@ -4399,7 +4399,7 @@ static void check_custom_error_tostring( |
TEST(CustomErrorToString) { |
LocalContext context; |
v8::HandleScope scope(context->GetIsolate()); |
- v8::V8::AddMessageListener(check_custom_error_tostring); |
+ v8::V8::AddMessageListener(check_custom_error_message); |
CompileRun( |
"function MyError(name, message) { " |
" this.name = name; " |
@@ -4410,58 +4410,6 @@ TEST(CustomErrorToString) { |
" return 'MyError toString'; " |
"}; " |
"throw new MyError('my name', 'my message'); "); |
- v8::V8::RemoveMessageListeners(check_custom_error_tostring); |
-} |
- |
- |
-static void check_custom_error_message( |
- v8::Handle<v8::Message> message, |
- v8::Handle<v8::Value> data) { |
- const char* uncaught_error = "Uncaught MyError: my message"; |
- printf("%s\n", *v8::String::Utf8Value(message->Get())); |
- CHECK(message->Get()->Equals(v8_str(uncaught_error))); |
-} |
- |
- |
-TEST(CustomErrorMessage) { |
- LocalContext context; |
- v8::HandleScope scope(context->GetIsolate()); |
- v8::V8::AddMessageListener(check_custom_error_message); |
- |
- // Handlebars. |
- CompileRun( |
- "function MyError(msg) { " |
- " this.name = 'MyError'; " |
- " this.message = msg; " |
- "} " |
- "MyError.prototype = new Error(); " |
- "throw new MyError('my message'); "); |
- |
- // Closure. |
- CompileRun( |
- "function MyError(msg) { " |
- " this.name = 'MyError'; " |
- " this.message = msg; " |
- "} " |
- "inherits = function(childCtor, parentCtor) { " |
- " function tempCtor() {}; " |
- " tempCtor.prototype = parentCtor.prototype; " |
- " childCtor.superClass_ = parentCtor.prototype; " |
- " childCtor.prototype = new tempCtor(); " |
- " childCtor.prototype.constructor = childCtor; " |
- "}; " |
- "inherits(MyError, Error); " |
- "throw new MyError('my message'); "); |
- |
- // Object.create. |
- CompileRun( |
- "function MyError(msg) { " |
- " this.name = 'MyError'; " |
- " this.message = msg; " |
- "} " |
- "MyError.prototype = Object.create(Error.prototype); " |
- "throw new MyError('my message'); "); |
- |
v8::V8::RemoveMessageListeners(check_custom_error_message); |
} |
@@ -19915,16 +19863,6 @@ 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: |