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

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

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 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/javascript/Field.cpp ('k') | fpdfsdk/pdfwindow/PWL_Edit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 double kExpected0 = 6.0; 10 const double kExpected0 = 6.0;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 FXJS_InitializeRuntime(isolate(), nullptr, &global_context2, 57 FXJS_InitializeRuntime(isolate(), nullptr, &global_context2,
58 &static_objects2); 58 &static_objects2);
59 59
60 v8::Context::Scope context_scope(GetV8Context()); 60 v8::Context::Scope context_scope(GetV8Context());
61 ExecuteInCurrentContext(kScript0); 61 ExecuteInCurrentContext(kScript0);
62 CheckAssignmentInCurrentContext(kExpected0); 62 CheckAssignmentInCurrentContext(kExpected0);
63 63
64 { 64 {
65 v8::Local<v8::Context> context1 = 65 v8::Local<v8::Context> context1 =
66 v8::Local<v8::Context>::New(isolate(), global_context1); 66 v8::Local<v8::Context>::New(isolate(), global_context1);
67 v8::Context::Scope context_scope(context1); 67 v8::Context::Scope context_scope1(context1);
68 ExecuteInCurrentContext(kScript1); 68 ExecuteInCurrentContext(kScript1);
69 CheckAssignmentInCurrentContext(kExpected1); 69 CheckAssignmentInCurrentContext(kExpected1);
70 } 70 }
71 FXJS_ReleaseRuntime(isolate(), &global_context1, &static_objects1); 71 FXJS_ReleaseRuntime(isolate(), &global_context1, &static_objects1);
72 72
73 { 73 {
74 v8::Local<v8::Context> context2 = 74 v8::Local<v8::Context> context2 =
75 v8::Local<v8::Context>::New(isolate(), global_context2); 75 v8::Local<v8::Context>::New(isolate(), global_context2);
76 v8::Context::Scope context_scope(context2); 76 v8::Context::Scope context_scope2(context2);
77 ExecuteInCurrentContext(kScript2); 77 ExecuteInCurrentContext(kScript2);
78 CheckAssignmentInCurrentContext(kExpected2); 78 CheckAssignmentInCurrentContext(kExpected2);
79 } 79 }
80 FXJS_ReleaseRuntime(isolate(), &global_context2, &static_objects2); 80 FXJS_ReleaseRuntime(isolate(), &global_context2, &static_objects2);
81 81
82 CheckAssignmentInCurrentContext(kExpected0); 82 CheckAssignmentInCurrentContext(kExpected0);
83 } 83 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/Field.cpp ('k') | fpdfsdk/pdfwindow/PWL_Edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698