e79a142cf2
There is another batch of style changes coming out in 3.8, so I'm going through and reformatting the SDK again. (Well, I didn't finish the reformat the first time, so not fully "again", I guess.) Change-Id: I83d9809fc0da71010c0ef567c208981df68c351c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425201 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com>
20 lines
647 B
Dart
20 lines
647 B
Dart
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
main() {
|
|
try {
|
|
Uri base = Uri.base;
|
|
Expect.isTrue(
|
|
Uri.base.isScheme("file") ||
|
|
Uri.base.isScheme("http") ||
|
|
// Location set in sdk/lib/_internal/js_runtime/lib/preambles/d8.js
|
|
Uri.base.isScheme('org-dartlang-d8-preamble'),
|
|
);
|
|
} on UnsupportedError catch (e) {
|
|
Expect.isTrue(e.toString().contains("'Uri.base' is not supported"));
|
|
}
|
|
}
|