OLD | NEW |
1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "testing/js_embedder_test.h" | 6 #include "testing/js_embedder_test.h" |
7 | 7 |
8 namespace { | 8 namespace { |
9 | 9 |
10 const wchar_t kScript[] = L"fred = 7"; | 10 const wchar_t kScript[] = L"fred = 7"; |
(...skipping 11 matching lines...) Expand all Loading... |
22 v8::Context::Scope context_scope(GetV8Context()); | 22 v8::Context::Scope context_scope(GetV8Context()); |
23 | 23 |
24 FXJSErr error; | 24 FXJSErr error; |
25 int sts = FXJS_Execute(isolate(), nullptr, kScript, &error); | 25 int sts = FXJS_Execute(isolate(), nullptr, kScript, &error); |
26 EXPECT_EQ(0, sts); | 26 EXPECT_EQ(0, sts); |
27 | 27 |
28 v8::Local<v8::Object> This = FXJS_GetThisObj(isolate()); | 28 v8::Local<v8::Object> This = FXJS_GetThisObj(isolate()); |
29 v8::Local<v8::Value> fred = FXJS_GetObjectElement(isolate(), This, L"fred"); | 29 v8::Local<v8::Value> fred = FXJS_GetObjectElement(isolate(), This, L"fred"); |
30 EXPECT_TRUE(fred->IsNumber()); | 30 EXPECT_TRUE(fred->IsNumber()); |
31 } | 31 } |
OLD | NEW |