Fix canvas test for Chrome 37

TBR=terry@google.com,blois@google.com

Review URL: https://codereview.chromium.org//423303005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38723 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
vsm@google.com 2014-07-30 07:35:19 +00:00
parent 90e352f3a3
commit 509cf9f72d

View file

@ -678,7 +678,7 @@ main() {
// Draw a blue box.
context.fillText('', x, y);
var width = context.measureText('').width.toInt();
var width = context.measureText('').width.ceil();
checkPixel(readPixel(x, y), [0, 0, 255, 255]);
checkPixel(readPixel(x + 10, y), [0, 0, 255, 255]);
@ -699,7 +699,7 @@ main() {
// Draw a blue box with null maxWidth.
context.fillText('', x, y, null);
var width = context.measureText('').width.toInt();
var width = context.measureText('').width.ceil();
checkPixel(readPixel(x, y), [0, 0, 255, 255]);
checkPixel(readPixel(x + 10, y), [0, 0, 255, 255]);