Fix spawnHybridUri on windows (#1384) (#1391)

diff --git a/pkgs/test/CHANGELOG.md b/pkgs/test/CHANGELOG.md
index 941164d..35f00b6 100644
--- a/pkgs/test/CHANGELOG.md
+++ b/pkgs/test/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.15.7 (Backport)
+
+* Fix `spawnHybridUri` on windows.
+
 ## 1.15.6 (Backport)
 
 * Support `package:analyzer` version `0.41.x`.
diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml
index a578c35..20cb2df 100644
--- a/pkgs/test/pubspec.yaml
+++ b/pkgs/test/pubspec.yaml
@@ -1,5 +1,5 @@
 name: test
-version: 1.15.6
+version: 1.15.7
 description: A full featured library for writing and running Dart tests.
 homepage: https://github.com/dart-lang/test/blob/master/pkgs/test
 
@@ -33,7 +33,7 @@
   yaml: ^2.0.0
   # Use an exact version until the test_api and test_core package are stable.
   test_api: 0.2.18+1
-  test_core: 0.3.11+3
+  test_core: 0.3.11+4
 
 dev_dependencies:
   fake_async: ^1.0.0
diff --git a/pkgs/test/test/io.dart b/pkgs/test/test/io.dart
index 3094380..b11af10 100644
--- a/pkgs/test/test/io.dart
+++ b/pkgs/test/test/io.dart
@@ -15,7 +15,11 @@
 /// The path to the root directory of the `test` package.
 final Future<String> packageDir =
     Isolate.resolvePackageUri(Uri(scheme: 'package', path: 'test/'))
-        .then((uri) => p.dirname(uri.path));
+        .then((uri) {
+  var dir = p.dirname(uri.path);
+  if (dir.startsWith('/C:')) dir = dir.substring(1);
+  return dir;
+});
 
 /// The path to the `pub` executable in the current Dart SDK.
 final _pubPath = p.absolute(p.join(p.dirname(Platform.resolvedExecutable),
@@ -76,7 +80,7 @@
 
   var allArgs = [
     ...?vmArgs,
-    p.absolute(p.join(await packageDir, 'bin/test.dart')),
+    Uri.file(p.url.join(await packageDir, 'bin', 'test.dart')).toString(),
     '--concurrency=$concurrency',
     if (reporter != null) '--reporter=$reporter',
     if (fileReporter != null) '--file-reporter=$fileReporter',
diff --git a/pkgs/test_core/CHANGELOG.md b/pkgs/test_core/CHANGELOG.md
index a21061c..3588e64 100644
--- a/pkgs/test_core/CHANGELOG.md
+++ b/pkgs/test_core/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.3.11+4 (Backport)
+
+* Fix `spawnHybridUri` on windows.
+
 ## 0.3.11+3 (Backport)
 
 * Support `package:analyzer` version `0.41.x`.
diff --git a/pkgs/test_core/lib/src/runner/spawn_hybrid.dart b/pkgs/test_core/lib/src/runner/spawn_hybrid.dart
index 76e448a..b66a5ec 100644
--- a/pkgs/test_core/lib/src/runner/spawn_hybrid.dart
+++ b/pkgs/test_core/lib/src/runner/spawn_hybrid.dart
@@ -84,7 +84,7 @@
 /// Normalizes [url] to an absolute url, or returns it as is if it has a
 /// scheme.
 ///
-/// Follows the rules for relatives/absolute paths outlit
+/// Follows the rules for relative/absolute paths outlined in [spawnHybridUri].
 String _normalizeUrl(String url, Suite suite) {
   final parsedUri = Uri.parse(url);
 
@@ -123,7 +123,7 @@
   // Returns the explicit language version comment if one exists.
   var result = parseString(
       content: await _readUri(parsedUri),
-      path: parsedUri.path,
+      path: parsedUri.scheme == 'data' ? null : p.fromUri(parsedUri),
       throwIfDiagnostics: false);
   var languageVersionComment = result.unit.languageVersionToken?.value();
   if (languageVersionComment != null) return languageVersionComment.toString();
diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml
index 71a92ff..3df149f 100644
--- a/pkgs/test_core/pubspec.yaml
+++ b/pkgs/test_core/pubspec.yaml
@@ -1,5 +1,5 @@
 name: test_core
-version: 0.3.11+3
+version: 0.3.11+4
 description: A basic library for writing tests and running them on the VM.
 homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_core