Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: client/tests/client/dom/CanvasTest.dart

Issue 10140025: Adjust tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/tests/client/dom/CanvasTest.dart
diff --git a/client/tests/client/dom/CanvasTest.dart b/client/tests/client/dom/CanvasTest.dart
index 5a4293326a0e387108dc37a761dfcfc10ed83643..4850b639294c9dee39ac1629f13e69ddd0c2895c 100644
--- a/client/tests/client/dom/CanvasTest.dart
+++ b/client/tests/client/dom/CanvasTest.dart
@@ -21,7 +21,7 @@ main() {
context.fillStyle = "red";
context.fillRect(10, 10, 20, 20);
- CanvasPixelArray data = context.getImageData(0, 0, width, height).data;
+ Uint8ClampedArray data = context.getImageData(0, 0, width, height).data;
checkPixel(data, 0, [0, 0, 0, 0]);
checkPixel(data, 9 + width * 10, [0, 0, 0, 0]);
checkPixel(data, 10 + width * 10, [255, 0, 0, 255]);
@@ -60,7 +60,7 @@ main() {
test('CreateImageData', () {
ImageData image = context.createImageData(canvas.width,
canvas.height);
- CanvasPixelArray data = image.data;
+ Uint8ClampedArray data = image.data;
Expect.equals(40000, data.length);
checkPixel(data, 0, [0, 0, 0, 0]);
@@ -81,7 +81,7 @@ main() {
});
}
-void checkPixel(CanvasPixelArray data, int offset, List<int> rgba)
+void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba)
{
offset *= 4;
for (var i = 0; i < 4; ++i) {
« no previous file with comments | « no previous file | client/tests/client/dom/CanvasUsingHtmlTest.dart » ('j') | client/tests/client/dom/InstanceOfTest.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698