Chromium Code Reviews| Index: client/tests/client/dom/CanvasPixelArrayTypeAliasTest.dart |
| diff --git a/client/tests/client/dom/CanvasPixelArrayTypeAliasTest.dart b/client/tests/client/dom/CanvasPixelArrayTypeAliasTest.dart |
| index 5aeffb46d01b98854bb1d864f7579eecfa5f3e91..e7bdd43107eb7a4d355aed8c4474a409d16d2ed5 100644 |
| --- a/client/tests/client/dom/CanvasPixelArrayTypeAliasTest.dart |
| +++ b/client/tests/client/dom/CanvasPixelArrayTypeAliasTest.dart |
| @@ -1,7 +1,7 @@ |
| #library('CanvasTest'); |
| #import('../../../../lib/unittest/unittest.dart'); |
| -#import('../../../../lib/unittest/dom_config.dart'); |
| -#import('dart:dom'); |
| +#import('../../../../lib/unittest/html_config.dart'); |
| +#import('dart:html'); |
| // We have aliased the legacy type CanvasPixelArray with the new type |
| // Uint8ClampedArray by mapping the CanvasPixelArray type tag to |
| @@ -11,19 +11,19 @@ |
| Object confuseType(x) => [1, x, [x], 's'] [1]; // returns 'x' |
| main() { |
| - HTMLCanvasElement canvas; |
| + CanvasElement canvas; |
| CanvasRenderingContext2D context; |
| int width = 100; |
| int height = 100; |
| - canvas = document.createElement('canvas'); |
| - canvas.setAttribute('width', '$width'); |
| - canvas.setAttribute('height', '$height'); |
| - document.body.appendChild(canvas); |
| + canvas = new Element.tag('canvas'); |
| + canvas.attributes['width'] = '$width'; |
|
Anton Muhin
2012/04/26 18:47:36
do you need to stingify width/height here?
podivilov
2012/04/27 11:59:47
Done.
|
| + canvas.attributes['height'] = '$height'; |
| + document.body.nodes.add(canvas); |
| context = canvas.getContext('2d'); |
| - useDomConfiguration(); |
| + useHtmlConfiguration(); |
| test('CreateImageData', () { |
| ImageData image = context.createImageData(canvas.width, |