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 |