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

Side by Side Diff: testing/embedder_test_shared_isolate_delegate.h

Issue 1377293004: Run FXJS_V8 embedder tests against a shared isolate. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Alphabetize Created 5 years, 2 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
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 #ifndef TESTING_EMBEDDER_TEST_SHARED_ISOLATE_DELEGATE_H_
6 #define TESTING_EMBEDDER_TEST_SHARED_ISOLATE_DELEGATE_H_
7
8 #include <map>
9 #include <utility>
10
11 #include "../fpdfsdk/include/jsapi/fxjs_v8.h"
12 #include "../third_party/base/nonstd_unique_ptr.h"
13 #include "embedder_test.h"
14 #include "embedder_test_timer_handling_delegate.h"
15
16 class EmbedderTestSharedIsolateDelegate
17 : public EmbedderTestTimerHandlingDelegate {
18 public:
19 EmbedderTestSharedIsolateDelegate()
20 : m_pArrayBufferAllocator(new FXJS_ArrayBufferAllocator) {
21 v8::Isolate::CreateParams params;
22 params.array_buffer_allocator = m_pArrayBufferAllocator.get();
23 m_pIsolate = v8::Isolate::New(params);
24 }
25
26 ~EmbedderTestSharedIsolateDelegate() { m_pIsolate->Dispose(); }
27
28 v8::Isolate* GetSharedIsolate() const override { return m_pIsolate; }
29
30 protected:
31 nonstd::unique_ptr<FXJS_ArrayBufferAllocator> m_pArrayBufferAllocator;
32 v8::Isolate* m_pIsolate;
33 };
34
35 #endif // TESTING_EMBEDDER_TEST_SHARED_ISOLATE_DELEGATE_H_
OLDNEW
« fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp ('K') | « testing/embedder_test.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698