| Index: sdk/lib/_internal/pub/test/serve/supports_cross_origin_header_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/does_not_serve_hidden_assets_test.dart b/sdk/lib/_internal/pub/test/serve/supports_cross_origin_header_test.dart
|
| similarity index 60%
|
| copy from sdk/lib/_internal/pub/test/serve/does_not_serve_hidden_assets_test.dart
|
| copy to sdk/lib/_internal/pub/test/serve/supports_cross_origin_header_test.dart
|
| index 0429e7efd7ed91cba68a15506c1ef832e72c97ad..66b7dda301164b0b497954e3c3734ed69cffdd64 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/does_not_serve_hidden_assets_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/supports_cross_origin_header_test.dart
|
| @@ -4,26 +4,23 @@
|
|
|
| library pub_tests;
|
|
|
| +import 'package:scheduled_test/scheduled_test.dart';
|
| +
|
| import '../descriptor.dart' as d;
|
| import '../test_pub.dart';
|
| import 'utils.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration("doesn't serve hidden assets", () {
|
| + integration("sends responses that allow cross-origin requests", () {
|
| d.dir(appPath, [
|
| d.appPubspec(),
|
| - d.dir("web", [
|
| - d.file(".outer.txt", "outer contents"),
|
| - d.dir(".dir", [
|
| - d.file("inner.txt", "inner contents"),
|
| - ])
|
| - ])
|
| + d.dir("web", [d.file("index.html", "<body>")])
|
| ]).create();
|
|
|
| pubServe();
|
| - requestShould404(".outer.txt");
|
| - requestShould404(".dir/inner.txt");
|
| + requestShouldSucceed("index.html", "<body>",
|
| + headers: containsPair("access-control-allow-origin", "*"));
|
| endPubServe();
|
| });
|
| }
|
|
|