 Chromium Code Reviews
 Chromium Code Reviews Issue 203673003:
  Allow [path.fromUri] to take a string as well as a URI.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
    
  
    Issue 203673003:
  Allow [path.fromUri] to take a string as well as a URI.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart| Index: pkg/path/test/windows_test.dart | 
| diff --git a/pkg/path/test/windows_test.dart b/pkg/path/test/windows_test.dart | 
| index e5dcac490ef3f133bc28dba2029156fbda5b8afa..34aca1f31e6a81877f876de206d30064d8fa764c 100644 | 
| --- a/pkg/path/test/windows_test.dart | 
| +++ b/pkg/path/test/windows_test.dart | 
| @@ -590,27 +590,33 @@ main() { | 
| expect(context.withoutExtension(r'a\b.c\'), r'a\b\'); | 
| }); | 
| - test('fromUri', () { | 
| - expect(context.fromUri(Uri.parse('file:///C:/path/to/foo')), | 
| - r'C:\path\to\foo'); | 
| - expect(context.fromUri(Uri.parse('file://server/share/path/to/foo')), | 
| - r'\\server\share\path\to\foo'); | 
| - expect(context.fromUri(Uri.parse('file:///C:/')), r'C:\'); | 
| - expect(context.fromUri(Uri.parse('file://server/share')), | 
| - r'\\server\share'); | 
| - expect(context.fromUri(Uri.parse('foo/bar')), r'foo\bar'); | 
| - expect(context.fromUri(Uri.parse('/C:/path/to/foo')), r'C:\path\to\foo'); | 
| - expect(context.fromUri(Uri.parse('///C:/path/to/foo')), r'C:\path\to\foo'); | 
| - expect(context.fromUri(Uri.parse('//server/share/path/to/foo')), | 
| - r'\\server\share\path\to\foo'); | 
| - expect(context.fromUri(Uri.parse('file:///C:/path/to/foo%23bar')), | 
| - r'C:\path\to\foo#bar'); | 
| - expect(context.fromUri(Uri.parse('file://server/share/path/to/foo%23bar')), | 
| - r'\\server\share\path\to\foo#bar'); | 
| - expect(context.fromUri(Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_')), | 
| - r'_{_}_`_^_ _"_%_'); | 
| - expect(() => context.fromUri(Uri.parse('http://dartlang.org')), | 
| - throwsArgumentError); | 
| + group('fromUri', () { | 
| + test('with a URI', () { | 
| + expect(context.fromUri(Uri.parse('file:///C:/path/to/foo')), | 
| + r'C:\path\to\foo'); | 
| + expect(context.fromUri(Uri.parse('file://server/share/path/to/foo')), | 
| + r'\\server\share\path\to\foo'); | 
| + expect(context.fromUri(Uri.parse('file:///C:/')), r'C:\'); | 
| + expect(context.fromUri(Uri.parse('file://server/share')), | 
| + r'\\server\share'); | 
| + expect(context.fromUri(Uri.parse('foo/bar')), r'foo\bar'); | 
| + expect(context.fromUri(Uri.parse('/C:/path/to/foo')), r'C:\path\to\foo'); | 
| + expect(context.fromUri(Uri.parse('///C:/path/to/foo')), r'C:\path\to\foo'); | 
| 
Bob Nystrom
2014/03/18 20:31:09
Long lines.
 
nweiz
2014/03/18 22:02:19
Done.
 | 
| + expect(context.fromUri(Uri.parse('//server/share/path/to/foo')), | 
| + r'\\server\share\path\to\foo'); | 
| + expect(context.fromUri(Uri.parse('file:///C:/path/to/foo%23bar')), | 
| + r'C:\path\to\foo#bar'); | 
| + expect(context.fromUri(Uri.parse('file://server/share/path/to/foo%23bar')), | 
| + r'\\server\share\path\to\foo#bar'); | 
| + expect(context.fromUri(Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_')), | 
| + r'_{_}_`_^_ _"_%_'); | 
| + expect(() => context.fromUri(Uri.parse('http://dartlang.org')), | 
| + throwsArgumentError); | 
| + }); | 
| + | 
| + test('with a string', () { | 
| + expect(context.fromUri('file:///C:/path/to/foo'), r'C:\path\to\foo'); | 
| + }); | 
| }); | 
| test('toUri', () { |