| OLD | NEW |
| 1 #library('DOMIsolatesTest'); | 1 #library('DOMIsolatesTest'); |
| 2 #import('../../../../lib/unittest/unittest.dart'); | 2 #import('../../lib/unittest/unittest.dart'); |
| 3 #import('../../../../lib/unittest/dom_config.dart'); | 3 #import('../../lib/unittest/dom_config.dart'); |
| 4 #import('dart:dom'); | 4 #import('dart:dom'); |
| 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'); |
| 11 } | 11 } |
| 12 replyTo.send(window.location.toString()); | 12 replyTo.send(window.location.toString()); |
| 13 port.close(); | 13 port.close(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 }); | 51 }); |
| 52 | 52 |
| 53 test('Null as target window', () { | 53 test('Null as target window', () { |
| 54 expectThrow(() => spawnDomIsolate(null, 'isolateMain')); | 54 expectThrow(() => spawnDomIsolate(null, 'isolateMain')); |
| 55 }); | 55 }); |
| 56 | 56 |
| 57 test('Not window as target window', () { | 57 test('Not window as target window', () { |
| 58 expectThrow(() => spawnDomIsolate(document, 'isolateMain')); | 58 expectThrow(() => spawnDomIsolate(document, 'isolateMain')); |
| 59 }); | 59 }); |
| 60 } | 60 } |
| OLD | NEW |