| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 @TestOn("browser") |
| 5 library usage.web_test; | 6 library usage.web_test; |
| 6 | 7 |
| 7 import 'dart:async'; | 8 import 'dart:async'; |
| 8 | 9 |
| 9 import 'package:grinder/src/webtest.dart'; | 10 import 'package:test/test.dart'; |
| 10 import 'package:usage/src/usage_impl_html.dart'; | 11 import 'package:usage/src/usage_impl_html.dart'; |
| 11 import 'package:unittest/unittest.dart'; | |
| 12 | 12 |
| 13 import 'hit_types_test.dart' as hit_types_test; | 13 import 'hit_types_test.dart' as hit_types_test; |
| 14 import 'usage_impl_test.dart' as usage_impl_test; |
| 14 import 'usage_test.dart' as usage_test; | 15 import 'usage_test.dart' as usage_test; |
| 15 import 'usage_impl_test.dart' as usage_impl_test; | |
| 16 import 'uuid_test.dart' as uuid_test; | 16 import 'uuid_test.dart' as uuid_test; |
| 17 | 17 |
| 18 void main() { | 18 void main() { |
| 19 // Set up the test environment. | |
| 20 WebTestConfiguration.setupTestEnvironment(); | |
| 21 | |
| 22 // Define the tests. | 19 // Define the tests. |
| 23 hit_types_test.defineTests(); | 20 hit_types_test.defineTests(); |
| 24 usage_test.defineTests(); | 21 usage_test.defineTests(); |
| 25 usage_impl_test.defineTests(); | 22 usage_impl_test.defineTests(); |
| 26 uuid_test.defineTests(); | 23 uuid_test.defineTests(); |
| 27 | 24 |
| 28 // Define some web specfic tests. | 25 // Define some web specfic tests. |
| 29 defineWebTests(); | 26 defineWebTests(); |
| 30 } | 27 } |
| 31 | 28 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 61 |
| 65 Future request(String url, {String method, String sendData}) { | 62 Future request(String url, {String method, String sendData}) { |
| 66 expect(url, isNotEmpty); | 63 expect(url, isNotEmpty); |
| 67 expect(method, isNotEmpty); | 64 expect(method, isNotEmpty); |
| 68 expect(sendData, isNotEmpty); | 65 expect(sendData, isNotEmpty); |
| 69 | 66 |
| 70 sendCount++; | 67 sendCount++; |
| 71 return new Future.value(); | 68 return new Future.value(); |
| 72 } | 69 } |
| 73 } | 70 } |
| OLD | NEW |