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