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

Side by Side Diff: test/unittests/test-utils.h

Issue 2101413002: Provide a convenience array buffer allocator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 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 | « test/fuzzer/fuzzer-support.cc ('k') | test/unittests/test-utils.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 #ifndef V8_UNITTESTS_TEST_UTILS_H_ 5 #ifndef V8_UNITTESTS_TEST_UTILS_H_
6 #define V8_UNITTESTS_TEST_UTILS_H_ 6 #define V8_UNITTESTS_TEST_UTILS_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/base/macros.h" 9 #include "src/base/macros.h"
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
11 #include "src/zone.h" 11 #include "src/zone.h"
12 #include "testing/gtest-support.h" 12 #include "testing/gtest-support.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 15
16 class ArrayBufferAllocator; 16 class ArrayBufferAllocator;
17 17
18 18
19 class TestWithIsolate : public virtual ::testing::Test { 19 class TestWithIsolate : public virtual ::testing::Test {
20 public: 20 public:
21 TestWithIsolate(); 21 TestWithIsolate();
22 virtual ~TestWithIsolate(); 22 virtual ~TestWithIsolate();
23 23
24 Isolate* isolate() const { return isolate_; } 24 Isolate* isolate() const { return isolate_; }
25 25
26 static void SetUpTestCase(); 26 static void SetUpTestCase();
27 static void TearDownTestCase(); 27 static void TearDownTestCase();
28 28
29 private: 29 private:
30 static ArrayBufferAllocator* array_buffer_allocator_; 30 static v8::ArrayBuffer::Allocator* array_buffer_allocator_;
31 static Isolate* isolate_; 31 static Isolate* isolate_;
32 Isolate::Scope isolate_scope_; 32 Isolate::Scope isolate_scope_;
33 HandleScope handle_scope_; 33 HandleScope handle_scope_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(TestWithIsolate); 35 DISALLOW_COPY_AND_ASSIGN(TestWithIsolate);
36 }; 36 };
37 37
38 38
39 class TestWithContext : public virtual TestWithIsolate { 39 class TestWithContext : public virtual TestWithIsolate {
40 public: 40 public:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 base::AccountingAllocator allocator_; 117 base::AccountingAllocator allocator_;
118 Zone zone_; 118 Zone zone_;
119 119
120 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone); 120 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone);
121 }; 121 };
122 122
123 } // namespace internal 123 } // namespace internal
124 } // namespace v8 124 } // namespace v8
125 125
126 #endif // V8_UNITTESTS_TEST_UTILS_H_ 126 #endif // V8_UNITTESTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « test/fuzzer/fuzzer-support.cc ('k') | test/unittests/test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698