Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index c39c2f8f9e319b4016620c6350389c5b5430a855..6306db91fd1971a959b6084bb54d60c529ef824f 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -4598,6 +4598,8 @@ TEST(MessageHandler2) { |
static void check_message_3(v8::Handle<v8::Message> message, |
v8::Handle<Value> data) { |
CHECK(message->IsSharedCrossOrigin()); |
+ CHECK(message->GetScriptOrigin().ResourceIsSharedCrossOrigin()->Value()); |
+ CHECK(message->GetScriptOrigin().ResourceIsEmbedderDebugScript()->Value()); |
CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue()); |
message_received = true; |
} |
@@ -4611,10 +4613,9 @@ TEST(MessageHandler3) { |
v8::V8::AddMessageListener(check_message_3); |
LocalContext context; |
v8::ScriptOrigin origin = |
- v8::ScriptOrigin(v8_str("6.75"), |
- v8::Integer::New(isolate, 1), |
- v8::Integer::New(isolate, 2), |
- v8::True(isolate)); |
+ v8::ScriptOrigin(v8_str("6.75"), v8::Integer::New(isolate, 1), |
+ v8::Integer::New(isolate, 2), v8::True(isolate), |
+ Handle<v8::Integer>(), v8::True(isolate)); |
v8::Handle<v8::Script> script = Script::Compile(v8_str("throw 'error'"), |
&origin); |
script->Run(); |
@@ -19327,8 +19328,11 @@ TEST(Regress528) { |
THREADED_TEST(ScriptOrigin) { |
LocalContext env; |
v8::HandleScope scope(env->GetIsolate()); |
- v8::ScriptOrigin origin = |
- v8::ScriptOrigin(v8::String::NewFromUtf8(env->GetIsolate(), "test")); |
+ v8::ScriptOrigin origin = v8::ScriptOrigin( |
+ v8::String::NewFromUtf8(env->GetIsolate(), "test"), |
+ v8::Integer::New(env->GetIsolate(), 1), |
+ v8::Integer::New(env->GetIsolate(), 1), v8::True(env->GetIsolate()), |
+ v8::Handle<v8::Integer>(), v8::True(env->GetIsolate())); |
v8::Handle<v8::String> script = v8::String::NewFromUtf8( |
env->GetIsolate(), "function f() {}\n\nfunction g() {}"); |
v8::Script::Compile(script, &origin)->Run(); |
@@ -19339,11 +19343,15 @@ THREADED_TEST(ScriptOrigin) { |
v8::ScriptOrigin script_origin_f = f->GetScriptOrigin(); |
CHECK_EQ("test", *v8::String::Utf8Value(script_origin_f.ResourceName())); |
- CHECK_EQ(0, script_origin_f.ResourceLineOffset()->Int32Value()); |
+ CHECK_EQ(1, script_origin_f.ResourceLineOffset()->Int32Value()); |
+ CHECK(script_origin_f.ResourceIsSharedCrossOrigin()->Value()); |
+ CHECK(script_origin_f.ResourceIsEmbedderDebugScript()->Value()); |
v8::ScriptOrigin script_origin_g = g->GetScriptOrigin(); |
CHECK_EQ("test", *v8::String::Utf8Value(script_origin_g.ResourceName())); |
- CHECK_EQ(0, script_origin_g.ResourceLineOffset()->Int32Value()); |
+ CHECK_EQ(1, script_origin_g.ResourceLineOffset()->Int32Value()); |
+ CHECK(script_origin_g.ResourceIsSharedCrossOrigin()->Value()); |
+ CHECK(script_origin_g.ResourceIsEmbedderDebugScript()->Value()); |
} |