OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "extensions/renderer/module_system_test.h" |
| 6 #include "extensions/renderer/script_context.h" |
| 7 #include "gin/per_context_data.h" |
| 8 #include "gin/runner.h" |
| 9 |
| 10 namespace extensions { |
| 11 |
| 12 using ScriptContextTest = ModuleSystemTest; |
| 13 |
| 14 TEST_F(ScriptContextTest, GinRunnerLifetime) { |
| 15 ExpectNoAssertionsMade(); |
| 16 base::WeakPtr<gin::Runner> weak_runner = |
| 17 gin::PerContextData::From(env()->context()->v8_context()) |
| 18 ->runner() |
| 19 ->GetWeakPtr(); |
| 20 env()->ShutdownModuleSystem(); |
| 21 EXPECT_FALSE(weak_runner); |
| 22 } |
| 23 |
| 24 } // namespace extensions |
OLD | NEW |