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

Unified Diff: lib/pub_serve.dart

Issue 1076803003: Change the URL-space exposed by the browser server. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Changelog + pubspec 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
Index: lib/pub_serve.dart
diff --git a/lib/pub_serve.dart b/lib/pub_serve.dart
index f7cf373224829a29cb3e78ad8c2785eae9674032..71fa1cffd516dcbf100a655fd519381b757a9366 100644
--- a/lib/pub_serve.dart
+++ b/lib/pub_serve.dart
@@ -19,16 +19,16 @@ class PubServeTransformer extends Transformer implements DeclaringTransformer {
void declareOutputs(DeclaringTransform transform) {
var id = transform.primaryId;
- transform.declareOutput(id.changeExtension('.vm_test.dart'));
- transform.declareOutput(id.changeExtension('.browser_test.dart'));
- transform.declareOutput(id.changeExtension('.browser_test.html'));
+ transform.declareOutput(id.addExtension('.vm_test.dart'));
+ transform.declareOutput(id.addExtension('.browser_test.dart'));
+ transform.declareOutput(id.addExtension('.browser_test.html'));
}
void apply(Transform transform) {
var id = transform.primaryInput.id;
transform.addOutput(
- new Asset.fromString(id.changeExtension('.vm_test.dart'), '''
+ new Asset.fromString(id.addExtension('.vm_test.dart'), '''
import "package:test/src/runner/vm/isolate_listener.dart";
import "${p.url.basename(id.path)}" as test;
@@ -39,7 +39,7 @@ void main(_, Map message) {
}
'''));
- var browserId = id.changeExtension('.browser_test.dart');
+ var browserId = id.addExtension('.browser_test.dart');
transform.addOutput(new Asset.fromString(browserId, '''
import "package:test/src/runner/browser/iframe_listener.dart";
@@ -51,7 +51,7 @@ void main(_) {
'''));
transform.addOutput(
- new Asset.fromString(browserId.changeExtension('.html'), '''
+ new Asset.fromString(id.addExtension('.browser_test.html'), '''
<!DOCTYPE html>
<html>
<head>
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/runner/browser/server.dart » ('j') | test/runner/loader_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698