| 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));
|
| }
|
|
|