Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp

Issue 1799773002: Move fpdfsdk/src up to fpdfsdk/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/jsapi/fxjs_v8.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Button.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "testing/js_embedder_test.h"
7
8 namespace {
9
10 const wchar_t kScript[] = L"fred = 7";
11
12 } // namespace
13
14 class FXJSV8EmbedderTest : public JSEmbedderTest {};
15
16 TEST_F(FXJSV8EmbedderTest, Getters) {
17 v8::Isolate::Scope isolate_scope(isolate());
18 #ifdef PDF_ENABLE_XFA
19 v8::Locker locker(isolate());
20 #endif // PDF_ENABLE_XFA
21 v8::HandleScope handle_scope(isolate());
22 v8::Context::Scope context_scope(GetV8Context());
23
24 FXJSErr error;
25 int sts = FXJS_Execute(isolate(), nullptr, kScript, &error);
26 EXPECT_EQ(0, sts);
27
28 v8::Local<v8::Object> This = FXJS_GetThisObj(isolate());
29 v8::Local<v8::Value> fred = FXJS_GetObjectElement(isolate(), This, L"fred");
30 EXPECT_TRUE(fred->IsNumber());
31 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/jsapi/fxjs_v8.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Button.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698