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

Unified Diff: sdk/lib/_internal/pub_generated/test/serve/supports_cross_origin_header_test.dart

Issue 786223006: Support cross-origin requests to pub serve. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « sdk/lib/_internal/pub_generated/lib/src/barback/barback_server.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub_generated/test/serve/supports_cross_origin_header_test.dart
diff --git a/sdk/lib/_internal/pub_generated/test/serve/web_socket/unserve_directory_not_served_test.dart b/sdk/lib/_internal/pub_generated/test/serve/supports_cross_origin_header_test.dart
similarity index 55%
copy from sdk/lib/_internal/pub_generated/test/serve/web_socket/unserve_directory_not_served_test.dart
copy to sdk/lib/_internal/pub_generated/test/serve/supports_cross_origin_header_test.dart
index 528f0511ecbf565d61758a11cf121f89f4c8f7b8..9059393657131a540e0ba70cb02672e1d4ba3eb1 100644
--- a/sdk/lib/_internal/pub_generated/test/serve/web_socket/unserve_directory_not_served_test.dart
+++ b/sdk/lib/_internal/pub_generated/test/serve/supports_cross_origin_header_test.dart
@@ -4,24 +4,24 @@
library pub_tests;
-import '../../descriptor.dart' as d;
-import '../../test_pub.dart';
-import '../utils.dart';
+import 'package:scheduled_test/scheduled_test.dart';
+
+import '../descriptor.dart' as d;
+import '../test_pub.dart';
+import 'utils.dart';
main() {
initConfig();
- integration("errors if the directory is not served", () {
+ integration("sends responses that allow cross-origin requests", () {
d.dir(
appPath,
[d.appPubspec(), d.dir("web", [d.file("index.html", "<body>")])]).create();
pubServe();
-
- // Unbind the directory.
- expectWebSocketError("unserveDirectory", {
- "path": "test"
- }, NOT_SERVED, 'Directory "test" is not bound to a server.');
-
+ requestShouldSucceed(
+ "index.html",
+ "<body>",
+ headers: containsPair("access-control-allow-origin", "*"));
endPubServe();
});
}
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/barback/barback_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698