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

Side by Side Diff: tests/html/canvasrenderingcontext2d_test.dart

Issue 27983005: Make getLineDash return [] instead of null if it has not yet been set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // TODO(antonm): in Dartium ArgumentError should be thrown too. 236 // TODO(antonm): in Dartium ArgumentError should be thrown too.
237 expect(() => context.putImageData(expectedData, 0, 0, 1), 237 expect(() => context.putImageData(expectedData, 0, 0, 1),
238 throws); 238 throws);
239 expect(() => context.putImageData(expectedData, 0, 0, 1, 1), 239 expect(() => context.putImageData(expectedData, 0, 0, 1, 1),
240 throws); 240 throws);
241 expect(() => context.putImageData(expectedData, 0, 0, 1, 1, 5), 241 expect(() => context.putImageData(expectedData, 0, 0, 1, 1, 5),
242 throws); 242 throws);
243 }); 243 });
244 }); 244 });
245 245
246 group('linedash', () {
247 setUp(setupFunc);
248 tearDown(tearDownFunc);
249
250 test('setLineDash', () {
251 expect(context.getLineDash(), equals([]));
252 var old = context.getLineDash();
253 context.setLineDash(old);
254 });
255 });
256
246 group('arc', () { 257 group('arc', () {
247 setUp(setupFunc); 258 setUp(setupFunc);
248 tearDown(tearDownFunc); 259 tearDown(tearDownFunc);
249 260
250 test('default arc should be clockwise', () { 261 test('default arc should be clockwise', () {
251 context.beginPath(); 262 context.beginPath();
252 final r = 10; 263 final r = 10;
253 264
254 // Center of arc. 265 // Center of arc.
255 final cx = 20; 266 final cx = 20;
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 749
739 // The box does not draw after 20 pixels. 750 // The box does not draw after 20 pixels.
740 expectPixelUnfilled(x - 10, y); 751 expectPixelUnfilled(x - 10, y);
741 expectPixelUnfilled(x + maxWidth + 1, y); 752 expectPixelUnfilled(x + maxWidth + 1, y);
742 expectPixelUnfilled(x + maxWidth + 20, y); 753 expectPixelUnfilled(x + maxWidth + 20, y);
743 expectPixelFilled(x, y); 754 expectPixelFilled(x, y);
744 expectPixelFilled(x + 10, y); 755 expectPixelFilled(x + 10, y);
745 }); 756 });
746 }); 757 });
747 } 758 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698