Files
sdk/pkg/http/test/html/utils.dart
T
nweiz@google.com 97e95bb956 Rip out the last dart:io dependency from pkg/http.
It now loads dart:io via mirrors if it's available. This allows it to be
compatible with the browser, so a new library "package:http/browser_client.dart"
is added to support that.

The use of mirrors was tested to ensure that it doesn't add any additional
filesize to dart2js compilations over what would be used if "dart:io" support
didn't exist.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//261763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35756 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 19:36:22 +00:00

20 lines
579 B
Dart

// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library http.test.html_utils;
import 'dart:async';
import 'dart:convert';
import 'dart:html';
import 'package:http/http.dart';
import 'package:http/src/utils.dart';
import 'package:unittest/unittest.dart';
export '../utils.dart';
/// The test server's echo URL.
Uri get echoUrl => Uri.parse(
'${window.location.protocol}//${window.location.host}/echo');