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