Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1467)

Unified Diff: lib/src/runner/browser/server.dart

Issue 1098763004: Fix running browser tests in subdirectories and release 0.12.0-beta.10. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/server.dart
diff --git a/lib/src/runner/browser/server.dart b/lib/src/runner/browser/server.dart
index 17862ebcb7fa4b844b4d49782f8f2a60442c7361..9c58885e1f404e794c461a85a730934a383975a4 100644
--- a/lib/src/runner/browser/server.dart
+++ b/lib/src/runner/browser/server.dart
@@ -206,10 +206,11 @@ void main() {
// Link to the Dart wrapper on Dartium and the compiled JS version
// elsewhere.
+ var scriptBase =
+ "${HTML_ESCAPE.convert(p.basename(test))}.browser_test.dart";
var script = request.headers['user-agent'].contains('(Dart)')
- ? 'type="application/dart" '
- 'src="${HTML_ESCAPE.convert(test)}.browser_test.dart"'
- : 'src="${HTML_ESCAPE.convert(test)}.browser_test.dart.js"';
+ ? 'type="application/dart" src="$scriptBase"'
+ : 'src="$scriptBase.js"';
return new shelf.Response.ok('''
<!DOCTYPE html>
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698