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

Unified Diff: tests/html/webgl_1_test.dart

Issue 18577002: Reapply expanding overloaded functions into separate functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « tests/html/url_test.dart ('k') | tools/dom/dom.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/webgl_1_test.dart
diff --git a/tests/html/webgl_1_test.dart b/tests/html/webgl_1_test.dart
index 098df0674a6cb813b72f7b9d5b8eece2a7fadd56..80b70eaad6903fb56881bf117ffeb24ab380521b 100644
--- a/tests/html/webgl_1_test.dart
+++ b/tests/html/webgl_1_test.dart
@@ -6,6 +6,7 @@ library web_gl_test;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
+import 'dart:typed_data';
import 'dart:web_gl';
import 'dart:web_gl' as gl;
@@ -53,6 +54,40 @@ main() {
expect(context, isNotNull);
expect(context, new isInstanceOf<RenderingContext>());
});
+
+ test('texImage2D', () {
+ var canvas = new CanvasElement();
+ var context = canvas.getContext3d();
+ var pixels = new Uint8List.fromList([0,0,3,255,0,0,0,0,0,0]);
+ context.texImage2D(1, 1, 1, 1, 10, 10, 1, 1, pixels);
+
+ canvas = new CanvasElement();
+ document.body.children.add(canvas);
+ var context2 = canvas.getContext('2d');
+ context.texImage2DData(1, 1, 1, 1, 10,
+ context2.getImageData(10, 10, 10, 10));
+
+ context.texImage2DImage(1, 1, 1, 1, 10, new ImageElement());
+ context.texImage2DCanvas(1, 1, 1, 1, 10, new CanvasElement());
+ context.texImage2DVideo(1, 1, 1, 1, 10, new VideoElement());
+ });
+
+ test('texSubImage2D', () {
+ var canvas = new CanvasElement();
+ var context = canvas.getContext3d();
+ var pixels = new Uint8List.fromList([0,0,3,255,0,0,0,0,0,0]);
+ context.texSubImage2D(1, 1, 1, 1, 10, 10, 1, 1, pixels);
+
+ canvas = new CanvasElement();
+ document.body.children.add(canvas);
+ var context2 = canvas.getContext('2d');
+ context.texSubImage2DData(1, 1, 1, 1, 1, 10,
+ context2.getImageData(10, 10, 10, 10));
+
+ context.texSubImage2DImage(1, 1, 1, 1, 1, 10, new ImageElement());
+ context.texSubImage2DCanvas(1, 1, 1, 1, 1, 10, new CanvasElement());
+ context.texSubImage2DVideo(1, 1, 1, 1, 1, 10, new VideoElement());
+ });
}
});
}
« no previous file with comments | « tests/html/url_test.dart ('k') | tools/dom/dom.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698