OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.test_support; | 8 library engine.test_support; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 throw new UnsupportedOperationException(); | 608 throw new UnsupportedOperationException(); |
609 } | 609 } |
610 Uri resolveRelativeUri(Uri uri) { | 610 Uri resolveRelativeUri(Uri uri) { |
611 return new Uri(scheme: 'file', path: _name).resolveUri(uri); | 611 return new Uri(scheme: 'file', path: _name).resolveUri(uri); |
612 } | 612 } |
613 void setContents(String value) { | 613 void setContents(String value) { |
614 modificationStamp = new DateTime.now().millisecondsSinceEpoch; | 614 modificationStamp = new DateTime.now().millisecondsSinceEpoch; |
615 _contents = value; | 615 _contents = value; |
616 } | 616 } |
617 } | 617 } |
| 618 |
| 619 class TestSourceWithUri extends TestSource { |
| 620 final Uri uri; |
| 621 |
| 622 TestSourceWithUri(String path, this.uri, [String content]) |
| 623 : super(path, content); |
| 624 |
| 625 UriKind get uriKind { |
| 626 if (uri == null) { |
| 627 return UriKind.FILE_URI; |
| 628 } else if (uri.scheme == 'dart') { |
| 629 return UriKind.DART_URI; |
| 630 } else if (uri.scheme == 'package') { |
| 631 return UriKind.PACKAGE_URI; |
| 632 } |
| 633 return UriKind.FILE_URI; |
| 634 } |
| 635 |
| 636 bool operator ==(Object other) { |
| 637 if (other is TestSource) { |
| 638 return other.uri == uri; |
| 639 } |
| 640 return false; |
| 641 } |
| 642 |
| 643 Uri resolveRelativeUri(Uri uri) { |
| 644 return this.uri.resolveUri(uri); |
| 645 } |
| 646 } |
OLD | NEW |