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

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

Issue 34733007: Add back unseparated out version of method overloads in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 web_gl_test; 5 library web_gl_test;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_individual_config.dart'; 7 import '../../pkg/unittest/lib/html_individual_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:typed_data'; 9 import 'dart:typed_data';
10 import 'dart:web_gl'; 10 import 'dart:web_gl';
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 context = canvas.getContext3d(depth: false); 53 context = canvas.getContext3d(depth: false);
54 expect(context, isNotNull); 54 expect(context, isNotNull);
55 expect(context, new isInstanceOf<RenderingContext>()); 55 expect(context, new isInstanceOf<RenderingContext>());
56 }); 56 });
57 57
58 test('texImage2D', () { 58 test('texImage2D', () {
59 var canvas = new CanvasElement(); 59 var canvas = new CanvasElement();
60 var context = canvas.getContext3d(); 60 var context = canvas.getContext3d();
61 var pixels = new Uint8List.fromList([0,0,3,255,0,0,0,0,0,0]); 61 var pixels = new Uint8List.fromList([0,0,3,255,0,0,0,0,0,0]);
62 context.texImage2D(1, 1, 1, 1, 10, 10, 1, 1, pixels); 62 context.texImage2DUntyped(1, 1, 1, 1, 10, 10, 1, 1, pixels);
63 63
64 canvas = new CanvasElement(); 64 canvas = new CanvasElement();
65 document.body.children.add(canvas); 65 document.body.children.add(canvas);
66 var context2 = canvas.getContext('2d'); 66 var context2 = canvas.getContext('2d');
67 context.texImage2DData(1, 1, 1, 1, 10, 67 context.texImage2DData(1, 1, 1, 1, 10,
68 context2.getImageData(10, 10, 10, 10)); 68 context2.getImageData(10, 10, 10, 10));
69 69
70 context.texImage2DImage(1, 1, 1, 1, 10, new ImageElement()); 70 context.texImage2DImage(1, 1, 1, 1, 10, new ImageElement());
71 context.texImage2DCanvas(1, 1, 1, 1, 10, new CanvasElement()); 71 context.texImage2DCanvas(1, 1, 1, 1, 10, new CanvasElement());
72 context.texImage2DVideo(1, 1, 1, 1, 10, new VideoElement()); 72 context.texImage2DVideo(1, 1, 1, 1, 10, new VideoElement());
73 }); 73 });
74 74
75 test('texSubImage2D', () { 75 test('texSubImage2D', () {
76 var canvas = new CanvasElement(); 76 var canvas = new CanvasElement();
77 var context = canvas.getContext3d(); 77 var context = canvas.getContext3d();
78 var pixels = new Uint8List.fromList([0,0,3,255,0,0,0,0,0,0]); 78 var pixels = new Uint8List.fromList([0,0,3,255,0,0,0,0,0,0]);
79 context.texSubImage2D(1, 1, 1, 1, 10, 10, 1, 1, pixels); 79 context.texSubImage2DUntyped(1, 1, 1, 1, 10, 10, 1, 1, pixels);
80 80
81 canvas = new CanvasElement(); 81 canvas = new CanvasElement();
82 document.body.children.add(canvas); 82 document.body.children.add(canvas);
83 var context2 = canvas.getContext('2d'); 83 var context2 = canvas.getContext('2d');
84 context.texSubImage2DData(1, 1, 1, 1, 1, 10, 84 context.texSubImage2DData(1, 1, 1, 1, 1, 10,
85 context2.getImageData(10, 10, 10, 10)); 85 context2.getImageData(10, 10, 10, 10));
86 86
87 context.texSubImage2DImage(1, 1, 1, 1, 1, 10, new ImageElement()); 87 context.texSubImage2DImage(1, 1, 1, 1, 1, 10, new ImageElement());
88 context.texSubImage2DCanvas(1, 1, 1, 1, 1, 10, new CanvasElement()); 88 context.texSubImage2DCanvas(1, 1, 1, 1, 1, 10, new CanvasElement());
89 context.texSubImage2DVideo(1, 1, 1, 1, 1, 10, new VideoElement()); 89 context.texSubImage2DVideo(1, 1, 1, 1, 1, 10, new VideoElement());
90 }); 90 });
91 } 91 }
92 }); 92 });
93 } 93 }
94 94
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698