| OLD | NEW |
| 1 library SerializedScriptValueTest; | 1 library SerializedScriptValueTest; |
| 2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import 'package:unittest/unittest.dart'; |
| 3 import '../../pkg/unittest/lib/html_config.dart'; | 3 import 'package:unittest/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 = |
| 11 new MessageEvent('', data: value, origin: '', lastEventId: ''); | 11 new MessageEvent('', data: value, origin: '', lastEventId: ''); |
| 12 verifyGraph(value, event.data); | 12 verifyGraph(value, event.data); |
| 13 }); | 13 }); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 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 } | 52 } |
| OLD | NEW |