OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library canvas_rendering_context_2d_test; import '../../pkg/unittest/lib/unittes
t.dart'; | 5 library canvas_rendering_context_2d_test; import '../../pkg/unittest/lib/unittes
t.dart'; |
6 import '../../pkg/unittest/lib/html_individual_config.dart'; | 6 import '../../pkg/unittest/lib/html_individual_config.dart'; |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'dart:math'; | 8 import 'dart:math'; |
9 | 9 |
10 // Some rounding errors in the browsers. | 10 // Some rounding errors in the browsers. |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 | 661 |
662 test('createImageData', () { | 662 test('createImageData', () { |
663 var imageData = context.createImageData(15, 15); | 663 var imageData = context.createImageData(15, 15); |
664 expect(imageData.width, 15); | 664 expect(imageData.width, 15); |
665 expect(imageData.height, 15); | 665 expect(imageData.height, 15); |
666 | 666 |
667 var other = context.createImageDataFromImageData(imageData); | 667 var other = context.createImageDataFromImageData(imageData); |
668 expect(other.width, 15); | 668 expect(other.width, 15); |
669 expect(other.height, 15); | 669 expect(other.height, 15); |
670 }); | 670 }); |
| 671 |
| 672 test('createPattern', () { |
| 673 var pattern = context.createPattern(new CanvasElement(), ''); |
| 674 var pattern2 = context.createPatternFromImage(new ImageElement(), ''); |
| 675 }); |
671 }); | 676 }); |
672 } | 677 } |
OLD | NEW |