| OLD | NEW |
| 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/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(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 | 97 |
| 98 class TestWithZone : public virtual ::testing::Test { | 98 class TestWithZone : public virtual ::testing::Test { |
| 99 public: | 99 public: |
| 100 TestWithZone() : zone_(&allocator_) {} | 100 TestWithZone() : zone_(&allocator_) {} |
| 101 virtual ~TestWithZone(); | 101 virtual ~TestWithZone(); |
| 102 | 102 |
| 103 Zone* zone() { return &zone_; } | 103 Zone* zone() { return &zone_; } |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 base::AccountingAllocator allocator_; | 106 v8::internal::AccountingAllocator allocator_; |
| 107 Zone zone_; | 107 Zone zone_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(TestWithZone); | 109 DISALLOW_COPY_AND_ASSIGN(TestWithZone); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 | 112 |
| 113 class TestWithIsolateAndZone : public virtual TestWithIsolate { | 113 class TestWithIsolateAndZone : public virtual TestWithIsolate { |
| 114 public: | 114 public: |
| 115 TestWithIsolateAndZone() : zone_(&allocator_) {} | 115 TestWithIsolateAndZone() : zone_(&allocator_) {} |
| 116 virtual ~TestWithIsolateAndZone(); | 116 virtual ~TestWithIsolateAndZone(); |
| 117 | 117 |
| 118 Zone* zone() { return &zone_; } | 118 Zone* zone() { return &zone_; } |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 base::AccountingAllocator allocator_; | 121 v8::internal::AccountingAllocator allocator_; |
| 122 Zone zone_; | 122 Zone zone_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone); | 124 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace internal | 127 } // namespace internal |
| 128 } // namespace v8 | 128 } // namespace v8 |
| 129 | 129 |
| 130 #endif // V8_UNITTESTS_TEST_UTILS_H_ | 130 #endif // V8_UNITTESTS_TEST_UTILS_H_ |
| OLD | NEW |