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

Unified Diff: tests/language/library_env_test.dart

Issue 1674613002: Don't expose private libraries with dart.library.X. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove debug print. Created 4 years, 10 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 | « pkg/compiler/lib/src/apiimpl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/library_env_test.dart
diff --git a/tests/language/library_env_test.dart b/tests/language/library_env_test.dart
index d076ede53610f733112e634913e9b482453af7f2..7095d839e5e956c55b5ef8120c42dc190e414e56 100644
--- a/tests/language/library_env_test.dart
+++ b/tests/language/library_env_test.dart
@@ -12,6 +12,12 @@ main() {
Expect.isTrue(const bool.fromEnvironment("dart.library.convert"));
Expect.isTrue(const bool.fromEnvironment("dart.library.core"));
Expect.isTrue(const bool.fromEnvironment("dart.library.typed_data"));
+ Expect.isTrue(const bool.fromEnvironment("dart.library.developer"));
+
+ // Internal libraries should not be exposed.
+ Expect.equals(NOT_PRESENT,
+ const bool.fromEnvironment("dart.library._internal",
+ defaultValue: NOT_PRESENT));
bool hasHtmlSupport;
@@ -46,14 +52,12 @@ main() {
hasIoSupport = false; /// has_no_io_support: ok
if (hasIoSupport != null) {
- bool expectedResult = hasIoSupport ? true : NOT_PRESENT;
-
- Expect.equals(expectedResult,
+ // Dartium overrides 'dart.library.io' to return "false".
+ // We don't test for the non-existance, but just make sure that
+ // dart.library.io is not set to true.
+ Expect.equals(hasIoSupport,
const bool.fromEnvironment("dart.library.io",
- defaultValue: NOT_PRESENT));
- Expect.equals(expectedResult,
- const bool.fromEnvironment("dart.library.developer",
- defaultValue: NOT_PRESENT));
+ defaultValue: false));
}
bool hasMirrorSupport;
« no previous file with comments | « pkg/compiler/lib/src/apiimpl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698