31 v8::Context::Scope context_scope(current_engine->GetV8Context());
32 v8::Local<v8::Object> This = current_engine->GetThisObj();
33 v8::Local<v8::Value> fred = current_engine->GetObjectProperty(This,
"fred");
34 EXPECT_TRUE(fred->IsNumber());
35 EXPECT_EQ(expected, current_engine->ToDouble(fred));
50 v8::Isolate::Scope isolate_scope(isolate());
51 v8::HandleScope handle_scope(isolate());
59 v8::Context::Scope context_scope(GetV8Context());
62 engine()->Execute(WideString(kScript0));
64 CheckAssignmentInEngineContext(engine(), kExpected0);
68 v8::Context::Scope context_scope1(engine1.GetV8Context());
70 engine1.Execute(WideString(kScript1));
72 CheckAssignmentInEngineContext(engine(), kExpected0);
77 v8::Context::Scope context_scope2(engine2.GetV8Context());
79 engine1.Execute(WideString(kScript2));
81 CheckAssignmentInEngineContext(engine(), kExpected0);
90 v8::Isolate::Scope isolate_scope(isolate());
91 v8::HandleScope handle_scope(isolate());
92 v8::Context::Scope context_scope(GetV8Context());
95 engine()->Execute(L"functoon(x) { return x+1; }");
97 EXPECT_EQ(L"SyntaxError: Unexpected token '{'", err->exception);
98 EXPECT_EQ(1, err->line);
99 EXPECT_EQ(12, err->column);
103 v8::Isolate::Scope isolate_scope(isolate());
104 v8::HandleScope handle_scope(isolate());
105 v8::Context::Scope context_scope(GetV8Context());
108 engine()->Execute(L"let a = 3;\nundefined.colour");
111 L"TypeError: Cannot read properties of undefined (reading 'colour')",
113 EXPECT_EQ(2, err->line);
114 EXPECT_EQ(10, err->column);