OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'dart:convert'; |
| 6 |
| 7 import '../descriptor.dart' as d; |
| 8 import '../test_pub.dart'; |
| 9 |
| 10 /// Runs the hosted test server and serves a valid "browser" package that |
| 11 /// contains the same files (but not their contents) as the real browser |
| 12 /// package. |
| 13 void serveBrowserPackage() { |
| 14 serve([d.dir('api', [d.dir('packages', [d.file('browser', JSON.encode({ |
| 15 'versions': [packageVersionApiMap(packageMap('browser', '1.0.0'))] |
| 16 })), |
| 17 d.dir( |
| 18 'browser', |
| 19 [ |
| 20 d.dir( |
| 21 'versions', |
| 22 [ |
| 23 d.file( |
| 24 '1.0.0', |
| 25 JSON.encode( |
| 26 packageVersionApiMap(packageMap('browser', '
1.0.0'), full: true)))])])])]), |
| 27 d.dir( |
| 28 'packages', |
| 29 [ |
| 30 d.dir( |
| 31 'browser', |
| 32 [ |
| 33 d.dir( |
| 34 'versions', |
| 35 [ |
| 36 d.tar( |
| 37 '1.0.0.tar.gz', |
| 38 [ |
| 39 d.file('pubspec.yaml', yaml(packageM
ap("browser", "1.0.0"))), |
| 40 d.dir( |
| 41 'lib', |
| 42 [ |
| 43 d.file('dart.js', 'contents
of dart.js'), |
| 44 d.file('interop.js', 'conten
ts of interop.js')])])])])])]); |
| 45 } |
OLD | NEW |