Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 "extensions/renderer/module_system_test.h" | 5 #include "extensions/renderer/module_system_test.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 } | 214 } |
| 215 | 215 |
| 216 ModuleSystemTest::~ModuleSystemTest() { | 216 ModuleSystemTest::~ModuleSystemTest() { |
| 217 } | 217 } |
| 218 | 218 |
| 219 void ModuleSystemTest::TearDown() { | 219 void ModuleSystemTest::TearDown() { |
| 220 // All tests must assert at least once unless otherwise specified. | 220 // All tests must assert at least once unless otherwise specified. |
| 221 EXPECT_EQ(should_assertions_be_made_, | 221 EXPECT_EQ(should_assertions_be_made_, |
| 222 env_->assert_natives()->assertion_made()); | 222 env_->assert_natives()->assertion_made()); |
| 223 EXPECT_FALSE(env_->assert_natives()->failed()); | 223 EXPECT_FALSE(env_->assert_natives()->failed()); |
| 224 env_.reset(); | |
|
not at google - send to devlin
2014/08/27 19:28:58
env_ is created in the constructor, why do you nee
Sam McNally
2014/08/28 07:06:51
We need to remove the references from either Modul
| |
| 225 isolate_->RequestGarbageCollectionForTesting( | |
| 226 v8::Isolate::kFullGarbageCollection); | |
| 224 } | 227 } |
| 225 | 228 |
| 226 scoped_ptr<ModuleSystemTestEnvironment> ModuleSystemTest::CreateEnvironment() { | 229 scoped_ptr<ModuleSystemTestEnvironment> ModuleSystemTest::CreateEnvironment() { |
| 227 return make_scoped_ptr(new ModuleSystemTestEnvironment(isolate_)); | 230 return make_scoped_ptr(new ModuleSystemTestEnvironment(isolate_)); |
| 228 } | 231 } |
| 229 | 232 |
| 230 void ModuleSystemTest::ExpectNoAssertionsMade() { | 233 void ModuleSystemTest::ExpectNoAssertionsMade() { |
| 231 should_assertions_be_made_ = false; | 234 should_assertions_be_made_ = false; |
| 232 } | 235 } |
| 233 | 236 |
| 234 void ModuleSystemTest::RunResolvedPromises() { | 237 void ModuleSystemTest::RunResolvedPromises() { |
| 235 isolate_->RunMicrotasks(); | 238 isolate_->RunMicrotasks(); |
| 236 } | 239 } |
| 237 | 240 |
| 238 } // namespace extensions | 241 } // namespace extensions |
| OLD | NEW |