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

Unified Diff: tests/selenium/tests/serialization-test.html

Issue 149236: Add o3djs.DestinationBuffer to converter.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 5 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
« serializer/cross/serializer.cc ('K') | « tests/build.scons ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/selenium/tests/serialization-test.html
===================================================================
--- tests/selenium/tests/serialization-test.html (revision 19848)
+++ tests/selenium/tests/serialization-test.html (working copy)
@@ -929,6 +929,44 @@
g_test.assertEquals(12, field.size);
};
+g_suite.testShouldSetDestinationBufferData = function() {
+ var json = {
+ version: o3djs.serialization.supportedVersion,
+ objects: {
+ 'o3djs.DestinationBuffer': [
+ {
+ 'custom':{
+ 'numElements':1398,
+ 'fields':[
+ {
+ 'id':197809,
+ 'type':'o3d.FloatField',
+ 'numComponents':3},
+ {
+ 'id':197813,
+ 'type':'o3d.FloatField',
+ 'numComponents':3}],
+ }
+ }
+ ]
+ }
+ };
+
+ var pack = g_client.createPack();
+ var deserializer = o3djs.serialization.createDeserializer(pack, json);
+ deserializer.archiveInfo = g_archiveInfo;
+ deserializer.run();
+
+ g_test.assertEquals(1, pack.objects.length);
+ var buffer = pack.objects[0];
+ g_test.assertEquals(1398, buffer.numElements);
+ g_test.assertEquals(2, buffer.fields.length);
+ var field = buffer.fields[0];
+ g_test.assertEquals('o3d.FloatField', field.className);
+ g_test.assertEquals(3, field.numComponents);
+ g_test.assertEquals(12, field.size);
+};
+
g_suite.testShouldSetSourceBufferData = function() {
var json = {
version: o3djs.serialization.supportedVersion,
« serializer/cross/serializer.cc ('K') | « tests/build.scons ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698