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

Unified Diff: extensions/renderer/module_system_unittest.cc

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for failing tests 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 38756fd3857ccaa8aa13172d0f803496bd76e1b9..b91715b1a336431db517ee8120b5e6adf500ea6f 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