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

Unified Diff: extensions/renderer/module_system_unittest.cc

Issue 1938123002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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/module_system.cc ('k') | extensions/renderer/resources/event.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/module_system_unittest.cc
diff --git a/extensions/renderer/module_system_unittest.cc b/extensions/renderer/module_system_unittest.cc
index f49b3b97a419dfa5e455417e602dfe5e2d4e6004..5803ad0d694cb6bef51b844659486acb785f5ae8 100644
--- a/extensions/renderer/module_system_unittest.cc
+++ b/extensions/renderer/module_system_unittest.cc
@@ -505,4 +505,14 @@ TEST_F(ModuleSystemTest, TestRequireAsyncFromContextWithNoModuleSystem) {
RunResolvedPromises();
}
+TEST_F(ModuleSystemTest, TestPrivatesIsPrivate) {
+ ModuleSystem::NativesEnabledScope natives_enabled_scope(
+ env()->module_system());
+ env()->RegisterModule(
+ "test",
+ "var v = privates({});"
+ "requireNative('assert').AssertFalse(v instanceof Object);");
+ env()->module_system()->Require("test");
+}
+
} // namespace extensions
« no previous file with comments | « extensions/renderer/module_system.cc ('k') | extensions/renderer/resources/event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698