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

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: 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..579b43dbb44c140c2432b3958df6071c85b12b43 100644
--- a/tests/language/library_env_test.dart
+++ b/tests/language/library_env_test.dart
@@ -12,6 +12,13 @@ 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.
+ print(const bool.fromEnvironment("dart.library._internal"));
Johnni Winther 2016/02/05 12:59:39 Remove debug print?
floitsch 2016/02/05 16:36:42 Done.
+ Expect.equals(NOT_PRESENT,
+ const bool.fromEnvironment("dart.library._internal",
+ defaultValue: NOT_PRESENT));
bool hasHtmlSupport;
@@ -46,14 +53,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