| 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 #include "test/unittests/test-utils.h" | 5 #include "test/unittests/test-utils.h" |
| 6 | 6 |
| 7 #include "src/base/platform/time.h" | 7 #include "src/base/platform/time.h" |
| 8 #include "src/debug.h" | 8 #include "src/debug.h" |
| 9 #include "src/flags.h" | 9 #include "src/flags.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 namespace base { | 68 namespace base { |
| 69 namespace { | 69 namespace { |
| 70 | 70 |
| 71 inline int64_t GetRandomSeedFromFlag(int random_seed) { | 71 inline int64_t GetRandomSeedFromFlag(int random_seed) { |
| 72 return random_seed ? random_seed : TimeTicks::Now().ToInternalValue(); | 72 return random_seed ? random_seed : TimeTicks::Now().ToInternalValue(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace | 75 } // namespace |
| 76 | 76 |
| 77 TestWithRandomNumberGenerator::TestWithRandomNumberGenerator() | 77 TestWithRandomNumberGenerator::TestWithRandomNumberGenerator() |
| 78 : rng_(GetRandomSeedFromFlag(internal::FLAG_random_seed)) {} | 78 : rng_(GetRandomSeedFromFlag(::v8::internal::FLAG_random_seed)) {} |
| 79 | 79 |
| 80 | 80 |
| 81 TestWithRandomNumberGenerator::~TestWithRandomNumberGenerator() {} | 81 TestWithRandomNumberGenerator::~TestWithRandomNumberGenerator() {} |
| 82 | 82 |
| 83 } // namespace base | 83 } // namespace base |
| 84 | 84 |
| 85 | 85 |
| 86 namespace internal { | 86 namespace internal { |
| 87 | 87 |
| 88 TestWithIsolate::~TestWithIsolate() {} | 88 TestWithIsolate::~TestWithIsolate() {} |
| 89 | 89 |
| 90 TestWithIsolateAndZone::~TestWithIsolateAndZone() {} | 90 TestWithIsolateAndZone::~TestWithIsolateAndZone() {} |
| 91 | 91 |
| 92 Factory* TestWithIsolate::factory() const { return isolate()->factory(); } | 92 Factory* TestWithIsolate::factory() const { return isolate()->factory(); } |
| 93 | 93 |
| 94 | 94 |
| 95 base::RandomNumberGenerator* TestWithIsolate::random_number_generator() const { | 95 base::RandomNumberGenerator* TestWithIsolate::random_number_generator() const { |
| 96 return isolate()->random_number_generator(); | 96 return isolate()->random_number_generator(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| 100 TestWithZone::~TestWithZone() {} | 100 TestWithZone::~TestWithZone() {} |
| 101 | 101 |
| 102 } // namespace internal | 102 } // namespace internal |
| 103 } // namespace v8 | 103 } // namespace v8 |
| OLD | NEW |