@@ -19,10 +19,13 @@ class TestStrategy extends FakeStrategy {
1919 String ? serverPathForAppUri (String appUrl) {
2020 final appUri = Uri .parse (appUrl);
2121 if (appUri.isScheme ('org-dartlang-app' )) {
22- return 'foo' ;
22+ return appUri.path ;
2323 }
2424 if (appUri.isScheme ('package' )) {
25- return '/packages/${appUri .path }' ;
25+ return 'packages/${appUri .path }' ;
26+ }
27+ if (appUri.isScheme ('google3' )) {
28+ return appUri.path;
2629 }
2730 return null ;
2831 }
@@ -42,8 +45,13 @@ void main() {
4245 });
4346
4447 test ('parses org-dartlang-app paths' , () {
45- final uri = DartUri ('org-dartlang-app:////blah/main.dart' );
46- expect (uri.serverPath, 'foo' );
48+ final uri = DartUri ('org-dartlang-app:///blah/main.dart' );
49+ expect (uri.serverPath, '/blah/main.dart' );
50+ });
51+
52+ test ('parses google3 paths' , () {
53+ final uri = DartUri ('google3:///blah/main.dart' );
54+ expect (uri.serverPath, '/blah/main.dart' );
4755 });
4856
4957 test ('parses packages paths' , () {
@@ -86,7 +94,7 @@ void main() {
8694 expect (resolved, 'org-dartlang-sdk:///sdk/lib/io/io.dart' );
8795 }, skip: 'https://github.com/dart-lang/webdev/issues/1584' );
8896
89- test ('can unresolve uris' , () {
97+ test ('can un-resolve uris' , () {
9098 final unresolved =
9199 DartUri .toPackageUri ('org-dartlang-sdk:///sdk/lib/io/io.dart' );
92100 expect (unresolved, 'dart:io' );
0 commit comments