| OLD | NEW |
| 1 #library('DOMIsolatesTest'); | 1 #library('DOMIsolatesTest'); |
| 2 #import('../../lib/unittest/unittest.dart'); | 2 #import('../../lib/unittest/unittest.dart'); |
| 3 #import('../../lib/unittest/html_config.dart'); | 3 #import('../../lib/unittest/html_config.dart'); |
| 4 #import('dart:html'); | 4 #import('dart:html'); |
| 5 #import('dart:isolate'); | 5 #import('dart:isolate'); |
| 6 | 6 |
| 7 isolateMain(port) { | 7 isolateMain(port) { |
| 8 port.receive((msg, replyTo) { | 8 port.receive((msg, replyTo) { |
| 9 if (msg != 'check') { | 9 if (msg != 'check') { |
| 10 replyTo.send('wrong msg: $msg'); | 10 replyTo.send('wrong msg: $msg'); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 spawnDomIsolate(iframe.contentWindow, 'isolateMainTrampoline').then( | 46 spawnDomIsolate(iframe.contentWindow, 'isolateMainTrampoline').then( |
| 47 expectAsync1((sendPort) { | 47 expectAsync1((sendPort) { |
| 48 sendPort.call('check').then( | 48 sendPort.call('check').then( |
| 49 expectAsync1((msg) { | 49 expectAsync1((msg) { |
| 50 Expect.equals('about:blank', msg); | 50 Expect.equals('about:blank', msg); |
| 51 })); | 51 })); |
| 52 })); | 52 })); |
| 53 }); | 53 }); |
| 54 | 54 |
| 55 test('Null as target window', () { | 55 test('Null as target window', () { |
| 56 expectThrow(() => spawnDomIsolate(null, 'isolateMain')); | 56 expect(() => spawnDomIsolate(null, 'isolateMain'), throws); |
| 57 }); | 57 }); |
| 58 | 58 |
| 59 test('Not window as target window', () { | 59 test('Not window as target window', () { |
| 60 expectThrow(() => spawnDomIsolate(document, 'isolateMain')); | 60 expect(() => spawnDomIsolate(document, 'isolateMain'), throws); |
| 61 }); | 61 }); |
| 62 } | 62 } |
| OLD | NEW |