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

Side by Side Diff: tests/compiler/dart2js_extra/unconditional_dartio_import_test.dart

Issue 2675023002: Temporarily allow to import dart:io in client apps. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5
6 /// Tests that dart2js allows to import dart:io for web clients, but it
7 /// continues to indicate that it is not supported (so config-specific imports
8 /// continue to have the same semantics as before).
9 library unconditional_dartio_import_test;
10
11 import 'dart:io' as io; // import is allowed!
12 import 'package:expect/expect.dart';
13
14 main() {
15 // their APIs throw:
16 Expect.throws(() => new io.File('name').existsSync());
17
18 // ... but environment variable will indicate it is not supported.
19 Expect.isFalse(const bool.fromEnvironment('dart.library.io'));
20 }
OLDNEW
« pkg/compiler/lib/src/apiimpl.dart ('K') | « tests/compiler/dart2js_extra/dart2js_extra.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698