OLD | NEW |
(Empty) | |
| 1 library dom_compat_test; |
| 2 |
| 3 import 'dart:async'; |
| 4 import 'dart:io'; |
| 5 import 'package:unittest/unittest.dart'; |
| 6 import 'package:unittest/compact_vm_config.dart'; |
| 7 import 'package:html5lib/dom.dart'; |
| 8 |
| 9 part 'dom_compat_test_definitions.dart'; |
| 10 |
| 11 main() { |
| 12 useCompactVMConfiguration(); |
| 13 |
| 14 registerDomCompatTests(); |
| 15 |
| 16 test('content_shell', () { |
| 17 _runDrt('test/browser/browser_test.html'); |
| 18 }); |
| 19 } |
| 20 |
| 21 void _runDrt(String htmlFile) { |
| 22 final allPassedRegExp = new RegExp('All \\d+ tests passed'); |
| 23 |
| 24 final future = Process.run('content_shell', ['--dump-render-tree', htmlFile]) |
| 25 .then((ProcessResult pr) { |
| 26 expect(pr.exitCode, 0); |
| 27 expect(pr.stdout, matches(allPassedRegExp), reason: pr.stdout); |
| 28 }); |
| 29 |
| 30 expect(future, completion(isNull)); |
| 31 } |
OLD | NEW |