Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: extensions/renderer/script_context_unittest.cc

Issue 831423005: Split out the extensions gin::Runner implementation into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/script_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context_unittest.cc
diff --git a/extensions/renderer/script_context_unittest.cc b/extensions/renderer/script_context_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b0a846c6b66dd7ff3465154f9c8c062061dabf58
--- /dev/null
+++ b/extensions/renderer/script_context_unittest.cc
@@ -0,0 +1,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
« no previous file with comments | « extensions/renderer/script_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698