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

Unified Diff: pkg/unittest/lib/html_config.dart

Issue 11641005: Add cross-origin test with credentials. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed comments Created 7 years, 12 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: pkg/unittest/lib/html_config.dart
diff --git a/pkg/unittest/lib/html_config.dart b/pkg/unittest/lib/html_config.dart
index 3d87f98a77b9ea89c1cb406646c93778d2ad583d..b0225e0376a73799e4884168800e305e606771f9 100644
--- a/pkg/unittest/lib/html_config.dart
+++ b/pkg/unittest/lib/html_config.dart
@@ -143,6 +143,19 @@ class HtmlConfiguration extends Configuration {
}
}
+/**
+ * Examine the url for this test to determine what the cross-origin port is for
+ * this test.
+ */
+int getCrossOriginPortNumber() {
+ var searchUrl = window.location.search;
+ var crossOriginStr = 'crossOriginPort=';
+ var index = searchUrl.indexOf(crossOriginStr);
+ var nextArg = searchUrl.indexOf('&', index);
+ return int.parse(searchUrl.substring(index + crossOriginStr.length,
+ nextArg == -1 ? searchUrl.length : nextArg));
+}
+
void useHtmlConfiguration([bool isLayoutTest = false]) {
configure(new HtmlConfiguration(isLayoutTest));
}

Powered by Google App Engine
This is Rietveld 408576698