| OLD | NEW |
| 1 library SerializedScriptValueTest; | 1 library SerializedScriptValueTest; |
| 2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import '../../pkg/unittest/lib/unittest.dart'; |
| 3 import '../../pkg/unittest/lib/html_config.dart'; | 3 import '../../pkg/unittest/lib/html_config.dart'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'utils.dart'; | 5 import 'utils.dart'; |
| 6 | 6 |
| 7 serializationTest(name, value) => test(name, () { | 7 serializationTest(name, value) => test(name, () { |
| 8 // To check how value is serialized and deserialized, we create a | 8 // To check how value is serialized and deserialized, we create a |
| 9 // MessageEvent. | 9 // MessageEvent. |
| 10 final event = | 10 final event = |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 var blob = new Blob( | 42 var blob = new Blob( |
| 43 ['Indescribable... Indestructible! Nothing can stop it!'], | 43 ['Indescribable... Indestructible! Nothing can stop it!'], |
| 44 'text/plain'); | 44 'text/plain'); |
| 45 serializationTest('blob', [blob]); | 45 serializationTest('blob', [blob]); |
| 46 | 46 |
| 47 var canvas = new CanvasElement(); | 47 var canvas = new CanvasElement(); |
| 48 canvas.width = 100; | 48 canvas.width = 100; |
| 49 canvas.height = 100; | 49 canvas.height = 100; |
| 50 var imageData = canvas.context2D.getImageData(0, 0, 1, 1); | 50 var imageData = canvas.context2D.getImageData(0, 0, 1, 1); |
| 51 serializationTest('imagedata', [imageData]); | 51 serializationTest('imagedata', [imageData]); |
| 52 | |
| 53 expect(() { | |
| 54 new MessageEvent('', data: new DivElement(), origin: '', lastEventId: ''); | |
| 55 }, throws); | |
| 56 } | 52 } |
| OLD | NEW |