| 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" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 class TestWithIsolate : public virtual ::v8::TestWithIsolate { | 77 class TestWithIsolate : public virtual ::v8::TestWithIsolate { |
| 78 public: | 78 public: |
| 79 TestWithIsolate() {} | 79 TestWithIsolate() {} |
| 80 virtual ~TestWithIsolate(); | 80 virtual ~TestWithIsolate(); |
| 81 | 81 |
| 82 Factory* factory() const; | 82 Factory* factory() const; |
| 83 Isolate* isolate() const { | 83 Isolate* isolate() const { |
| 84 return reinterpret_cast<Isolate*>(::v8::TestWithIsolate::isolate()); | 84 return reinterpret_cast<Isolate*>(::v8::TestWithIsolate::isolate()); |
| 85 } | 85 } |
| 86 base::RandomNumberGenerator* random_number_generator() const; |
| 86 | 87 |
| 87 private: | 88 private: |
| 88 DISALLOW_COPY_AND_ASSIGN(TestWithIsolate); | 89 DISALLOW_COPY_AND_ASSIGN(TestWithIsolate); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 | 92 |
| 92 class TestWithZone : public TestWithIsolate { | 93 class TestWithZone : public TestWithIsolate { |
| 93 public: | 94 public: |
| 94 TestWithZone() : zone_(isolate()) {} | 95 TestWithZone() : zone_(isolate()) {} |
| 95 virtual ~TestWithZone(); | 96 virtual ~TestWithZone(); |
| 96 | 97 |
| 97 Zone* zone() { return &zone_; } | 98 Zone* zone() { return &zone_; } |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 Zone zone_; | 101 Zone zone_; |
| 101 | 102 |
| 102 DISALLOW_COPY_AND_ASSIGN(TestWithZone); | 103 DISALLOW_COPY_AND_ASSIGN(TestWithZone); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace internal | 106 } // namespace internal |
| 106 } // namespace v8 | 107 } // namespace v8 |
| 107 | 108 |
| 108 #endif // V8_UNITTESTS_TEST_UTILS_H_ | 109 #endif // V8_UNITTESTS_TEST_UTILS_H_ |
| OLD | NEW |