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

Unified Diff: tests/html/webgl_1_test.dart

Issue 35863006: Fix for getContextAttributes which wraps bare dictionary into a Dart type. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/docs/docs.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 f09db72b4d7f6556dfe087ae8e8f847ca4b59295..ae276ebff4f875957b0d20445940743ad0f15dfd 100644
--- a/tests/html/webgl_1_test.dart
+++ b/tests/html/webgl_1_test.dart
@@ -88,7 +88,24 @@ main() {
context.texSubImage2DCanvas(1, 1, 1, 1, 1, 10, new CanvasElement());
context.texSubImage2DVideo(1, 1, 1, 1, 1, 10, new VideoElement());
});
+
+ test('getContextAttributes', () {
+ var canvas = new CanvasElement();
+ var context = canvas.getContext3d();
+ var attributes = context.getContextAttributes();
+
+ expect(attributes, isNotNull);
+ expect(attributes, new isInstanceOf<gl.ContextAttributes>());
+
+ expect(attributes.alpha, isBoolean);
+ expect(attributes.antialias, isBoolean);
+ expect(attributes.depth, isBoolean);
+ expect(attributes.premultipliedAlpha, isBoolean);
+ expect(attributes.preserveDrawingBuffer, isBoolean);
+ expect(attributes.stencil, isBoolean);
+ });
}
});
}
+Matcher isBoolean = anyOf(isTrue, isFalse);
« no previous file with comments | « sdk/lib/web_gl/dartium/web_gl_dartium.dart ('k') | tools/dom/docs/docs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698