[wasm] Fix Uint8ClampedArray.From(byte[]) invalid cast (#13790)
[mono-project.git] / sdks / wasm / tests / browser / http-spec.js
blobb5ecb4dcd77570eaf83861ca4cd63adeecd22671
1 //describe, beforeAll, it, expext - are the Jasmine default methods
2 //karmaHTML is the karma-html package object with the access to all its features
3  
4 describe("The WebAssembly Browser Test Suite",function(){
5     
6     const DEFAULT_TIMEOUT = 1000;
7     const DEFAULT_WS_TIMEOUT = 5000;
9     beforeAll(function(done){
10       //load DOM custom matchers from karma-jasmine-dom package
11       jasmine.addMatchers(DOMCustomMatchers);
12       
13       //lets open our 'http-spec.html' file in the browser by 'index' tag as you specified in 'karma.conf.js'
14       karmaHTML.httpspec.open();
15       
16       //karmaHTML.httpspec.onstatechange fires when the Document is loaded
17       //now the tests can be executed on the DOM
18       karmaHTML.httpspec.onstatechange = function(ready){
19         //if the #Document is ready, fire tests
20         //the done() callback is the jasmine native async-support function
21         if(ready) {
22           karmaHTML.httpspec.document.onRuntimeDone = function ()
23           {
24             done();
25           }
27         }
28       };
30     });
31     
32     it("should be a real Document object",function(){
33       var _document = karmaHTML.httpspec.document;
34       expect(_document.constructor.name).toEqual('HTMLDocument');
35     });
37     it('should support streaming', () => {
38       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
39       var _document = karmaHTML.httpspec.document;
41       assert.equal(_document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:IsStreamingSupported", []), true);
42     });    
45     it('should have streaming enabled', () => {
46       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
47       var _document = karmaHTML.httpspec.document;
49       assert.equal(_document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:IsStreamingEnabled", []), true);
50     });    
52     it('should have base path', () => {
53       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
54       var _document = karmaHTML.httpspec.document;
56       assert.equal(_document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:BasePath", []), "http://localhost:9876/");
57     });    
59     it('RequestStream: should return size of Stream with streaming', (done) => {
60       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
61       var _document = karmaHTML.httpspec.document;
62       
63       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestStream", [true, "base/publish/NowIsTheTime.txt"]).then(
64         (result) => 
65         {
66             //console.log("we are here: " + result);
67             try {
68               assert.equal(result, 500000, "result doesn't match length");
69               done()
70             } catch (e) {
71               done.fail(e);
72             }
73         },
74         (error) => done.fail(error)
76       );
77       
78     }, DEFAULT_TIMEOUT);
80     it('RequestStream: blob should return size of Stream with streaming', (done) => {
81       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
82       var _document = karmaHTML.httpspec.document;
83       var blob = new Blob([JSON.stringify({hello: "world"}, null, 2)], {type : 'application/json'});
84       var blobUrl = URL.createObjectURL(blob);
85       
86       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestStream", [true, blobUrl]).then(
87         (result) => 
88         {
89             //console.log("we are here: " + result);
90             try {
91               assert.equal(result, 22, "result doesn't match length");
92               done()
93             } catch (e) {
94               done.fail(e);
95             }
96         },
97         (error) => done.fail(error)
99       );
100       
101       URL.revokeObjectURL(blobUrl);
102     }, DEFAULT_TIMEOUT);
104     it('RequestByteArray: should return size of ByteArray with streaming', (done) => {
105       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
106       var _document = karmaHTML.httpspec.document;
107       
108       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestByteArray", [true, "base/publish/NowIsTheTime.txt"]).then(
109         (result) => 
110         {
111             //console.log("we are here: " + result);
112             try {
113               assert.equal(result, 500000, "result doesn't match length");
114               done()
115             } catch (e) {
116               done.fail(e);
117             }
118         },
119         (error) => done.fail(error)
121       );
122       
123     }, DEFAULT_TIMEOUT);
125     it('RequestByteArray: blob should return size of ByteArray with streaming', (done) => {
126       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
127       var _document = karmaHTML.httpspec.document;
128       var blob = new Blob([JSON.stringify({hello: "world"}, null, 2)], {type : 'application/json'});
129       var blobUrl = URL.createObjectURL(blob);
131       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestByteArray", [true, blobUrl]).then(
132         (result) => 
133         {
134             //console.log("we are here: " + result);
135             try {
136               assert.equal(result, 22, "result doesn't match length");
137               done()
138             } catch (e) {
139               done.fail(e);
140             }
141         },
142         (error) => done.fail(error)
144       );
145       
146       URL.revokeObjectURL(blobUrl);
147     }, DEFAULT_TIMEOUT);
149     it('RequestStream: should return size of Stream without streaming', (done) => {
150       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
151       var _document = karmaHTML.httpspec.document;
152       
153       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestStream", [false, "base/publish/NowIsTheTime.txt"]).then(
154         (result) => 
155         {
156             //console.log("we are here: " + result);
157             try {
158               assert.equal(result, 500000, "result doesn't match length");
159               done()
160             } catch (e) {
161               done.fail(e);
162             }
163         },
164         (error) => done.fail(error)
166       );
167       
168     }, DEFAULT_TIMEOUT);    
170     it('RequestStream: blob should return size of Stream without streaming', (done) => {
171       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
172       var _document = karmaHTML.httpspec.document;
173       var blob = new Blob([JSON.stringify({hello: "world"}, null, 2)], {type : 'application/json'});
174       var blobUrl = URL.createObjectURL(blob);
176       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestStream", [false, blobUrl]).then(
177         (result) => 
178         {
179             //console.log("we are here: " + result);
180             try {
181               assert.equal(result, 22, "result doesn't match length");
182               done()
183             } catch (e) {
184               done.fail(e);
185             }
186         },
187         (error) => done.fail(error)
189       );
190       
191       URL.revokeObjectURL(blobUrl);
192     }, DEFAULT_TIMEOUT);    
194     it('RequestByteArray: should return size of ByteArray without streaming', (done) => {
195       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
196       var _document = karmaHTML.httpspec.document;
197       
198       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestByteArray", [false, "base/publish/NowIsTheTime.txt"]).then(
199         (result) => 
200         {
201             //console.log("we are here: " + result);
202             try {
203               assert.equal(result, 500000, "result doesn't match length");
204               done()
205             } catch (e) {
206               done.fail(e);
207             }
208         },
209         (error) => done.fail(error)
211       );
212       
213     }, DEFAULT_TIMEOUT);
215     it('RequestByteArray: blob should return size of ByteArray without streaming', (done) => {
216       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
217       var _document = karmaHTML.httpspec.document;
218       var blob = new Blob([JSON.stringify({hello: "world"}, null, 2)], {type : 'application/json'});
219       var blobUrl = URL.createObjectURL(blob);
221       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:RequestByteArray", [false, blobUrl]).then(
222         (result) => 
223         {
224             //console.log("we are here: " + result);
225             try {
226               assert.equal(result, 22, "result doesn't match length");
227               done()
228             } catch (e) {
229               done.fail(e);
230             }
231         },
232         (error) => done.fail(error)
234       );
235       
236       URL.revokeObjectURL(blobUrl);
237     }, DEFAULT_TIMEOUT);
239     it('GetStreamAsync_ReadZeroBytes_Success: should return 0', (done) => {
240       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
241       var _document = karmaHTML.httpspec.document;
242       
243       _document.Module.BINDING.call_static_method("[HttpTestSuite]TestSuite.Program:GetStreamAsync_ReadZeroBytes_Success", []).then(
244         (result) => 
245         {
246             //console.log("we are here: " + result);
247             try {
248               assert.equal(result, 0, "result doesn't match expected result 0");
249               done()
250             } catch (e) {
251               done.fail(e);
252             }
253         },
254         (error) => done.fail(error)
256       );
257       
258     }, DEFAULT_TIMEOUT);  
260     it('ConnectWebSocketStatus: should return Error Code 1006 because unresolved host.', (done) => {
261       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
262       var _document = karmaHTML.httpspec.document;
263       
264       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:ConnectWebSocketStatus", ["ws://localhost", ""]).then(
265         (result) => 
266         {
267             try {
268               assert.equal(result, '1006', "result doesn't match expected result 1006.");
269               done()
270             } catch (e) {
271               done.fail(e);
272             }
273         },
274         (error) => done.fail(error)
276       );
277       
278     }, DEFAULT_WS_TIMEOUT); 
279        
280     it('ConnectWebSocketStatus: should return Error Code 1006 because of invalid protocol.', (done) => {
281       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
282       var _document = karmaHTML.httpspec.document;
283       
284       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:ConnectWebSocketStatus", ["ws://localhost:8889", ""]).then(
285         (result) => 
286         {
287             try {
288               assert.equal(result, '1006', "result doesn't match expected result 1006.");
289               done()
290             } catch (e) {
291               done.fail(e);
292             }
293         },
294         (error) => done.fail(error)
296       );
297       
298     }, DEFAULT_WS_TIMEOUT); 
300     it('ConnectWebSocketStatusWithToken: should return Error Code 1006 because unresolved host.', (done) => {
301       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
302       var _document = karmaHTML.httpspec.document;
303       
304       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:ConnectWebSocketStatusWithToken", ["ws://localhost", ""]).then(
305         (result) => 
306         {
307             try {
308               assert.equal(result, '1006', "result doesn't match expected result 1006.");
309               done()
310             } catch (e) {
311               done.fail(e);
312             }
313         },
314         (error) => done.fail(error)
316       );
317       
318     }, DEFAULT_WS_TIMEOUT); 
319        
320     it('ConnectWebSocketStatusWithToken: should return Error Code 1006 because of invalid protocol.', (done) => {
321       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
322       var _document = karmaHTML.httpspec.document;
323       
324       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:ConnectWebSocketStatusWithToken", ["ws://localhost:8889", ""]).then(
325         (result) => 
326         {
327             try {
328               assert.equal(result, '1006', "result doesn't match expected result 1006.");
329               done()
330             } catch (e) {
331               done.fail(e);
332             }
333         },
334         (error) => done.fail(error)
336       );
337       
338     }, DEFAULT_WS_TIMEOUT); 
340     it('OpenWebSocket: should return Open.', (done) => {
341       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
342       var _document = karmaHTML.httpspec.document;
343       
344       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:OpenWebSocket", ["ws://localhost:8889", "echo-protocol"]).then(
345         (result) => 
346         {
347             try {
348               assert.equal(result, 'Open', "result doesn't match expected result Open.");
349               done()
350             } catch (e) {
351               done.fail(e);
352             }
353         },
354         (error) => done.fail(error)
356       );
357       
358     }, DEFAULT_TIMEOUT);  
359     
360     it('CloseWebSocket: should return Closed.', (done) => {
361       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
362       var _document = karmaHTML.httpspec.document;
363       
364       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:CloseWebSocket", ["ws://localhost:8889", "echo-protocol"]).then(
365         (result) => 
366         {
367             try {
368               assert.equal(result, 'Closed', "result doesn't match expected result Closed.");
369               done()
370             } catch (e) {
371               done.fail(e);
372             }
373         },
374         (error) => done.fail(error)
376       );
377       
378     }, DEFAULT_TIMEOUT);    
380         
381     it('RecieveHostCloseWebSocket: should return Closed.', (done) => {
382       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
383       var _document = karmaHTML.httpspec.document;
384       
385       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:RecieveHostCloseWebSocket", ["ws://localhost:8889", "echo-protocol"]).then(
386         (result) => 
387         {
388             try {
389               assert.equal(result, 'Closed', "result doesn't match expected result Closed.");
390               done()
391             } catch (e) {
392               done.fail(e);
393             }
394         },
395         (error) => done.fail(error)
397       );
398       
399     }, DEFAULT_TIMEOUT);    
401     it('CloseStatusDescCloseWebSocket: should return Close Code and Description.', (done) => {
402       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
403       var _document = karmaHTML.httpspec.document;
404       
405       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:CloseStatusDescCloseWebSocket", ["ws://localhost:8889", "echo-protocol"]).then(
406         (result) => 
407         {
408             try {
409               var resultObj = JSON.parse(result);
410               assert.equal(resultObj.code, 'NormalClosure', "code result doesn't match expected result NormalClosure.");
411               assert.equal(resultObj.desc, 'bye!', "description result doesn't match expected result 'bye!'.");
412               done()
413             } catch (e) {
414               done.fail(e);
415             }
416         },
417         (error) => done.fail(error)
419       );
420       
421     }, DEFAULT_TIMEOUT);    
423     it('WebSocketSendText: should return echoed text.', (done) => {
424       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
425       var _document = karmaHTML.httpspec.document;
426       
427       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:WebSocketSendText", ["ws://localhost:8889", "echo-protocol", "Hello WebSockets"]).then(
428         (result) => 
429         {
430             try {
431               assert.equal(result, 'Hello WebSockets', "result does not match Hello WebSockets.");
432               done()
433             } catch (e) {
434               done.fail(e);
435             }
436         },
437         (error) => done.fail(error)
439       );
440       
441     }, DEFAULT_TIMEOUT);    
443     it('WebSocketSendBinary: should return echoed text.', (done) => {
444       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
445       var _document = karmaHTML.httpspec.document;
446       var binBuffer = new Uint8Array([49,50,51,52,53,54,55,56,57])
447       _document.Module.BINDING.call_static_method("[WebSocketTestSuite]TestSuite.Program:WebSocketSendBinary", ["ws://localhost:8889", "echo-protocol", "Hello WebSockets"]).then(
448         (result) => 
449         {
450             try {
451               assert.equal(result, 'Hello WebSockets', "result does not match Hello WebSockets.");
452               done()
453             } catch (e) {
454               done.fail(e);
455             }
456         },
457         (error) => done.fail(error)
459       );
460     }, DEFAULT_WS_TIMEOUT);  
462     it('BindingTestSuite: Should return new Uint8ClampedArray from a c# byte array.', () => {
463       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
464       var _document = karmaHTML.httpspec.document;
467       var clamped = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Uint8ClampedArrayFrom", []);
468       assert.equal(clamped.length, 50, "result does not match length of 50.");
469       assert.equal(Object.prototype.toString.call(clamped), "[object Uint8ClampedArray]", "TypedArray is not of type Uint8ClampedArray" )
471     }, DEFAULT_TIMEOUT);  
473     it('BindingTestSuite: Should return new Uint8Array from a c# byte array.', () => {
474       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
475       var _document = karmaHTML.httpspec.document;
477       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Uint8ArrayFrom", []);
478       assert.equal(arr.length, 50, "result does not match length of 50.");
479       assert.equal(Object.prototype.toString.call(arr), "[object Uint8Array]", "TypedArray is not of type Uint8Array" )
481     }, DEFAULT_TIMEOUT);    
483     it('BindingTestSuite: Should return new Uint16Array from a c# ushort array.', () => {
484       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
485       var _document = karmaHTML.httpspec.document;
487       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Uint16ArrayFrom", []);
488       assert.equal(arr.length, 50, "result does not match length of 50.");
489       assert.equal(Object.prototype.toString.call(arr), "[object Uint16Array]", "TypedArray is not of type Uint16Array" )
491     }, DEFAULT_TIMEOUT);    
493     it('BindingTestSuite: Should return new Uint32Array from a c# uint array.', () => {
494       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
495       var _document = karmaHTML.httpspec.document;
497       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Uint32ArrayFrom", []);
498       assert.equal(arr.length, 50, "result does not match length of 50.");
499       assert.equal(Object.prototype.toString.call(arr), "[object Uint32Array]", "TypedArray is not of type Uint32Array" )
501     }, DEFAULT_TIMEOUT);    
503     it('BindingTestSuite: Should return new Int8Array from a c# sbyte array.', () => {
504       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
505       var _document = karmaHTML.httpspec.document;
507       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Int8ArrayFrom", []);
508       assert.equal(arr.length, 50, "result does not match length of 50.");
509       assert.equal(Object.prototype.toString.call(arr), "[object Int8Array]", "TypedArray is not of type Int8Array" )
511     }, DEFAULT_TIMEOUT);    
513     it('BindingTestSuite: Should return new Int16Array from a c# short array.', () => {
514       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
515       var _document = karmaHTML.httpspec.document;
517       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Int16ArrayFrom", []);
518       assert.equal(arr.length, 50, "result does not match length of 50.");
519       assert.equal(Object.prototype.toString.call(arr), "[object Int16Array]", "TypedArray is not of type Int16Array" )
521     }, DEFAULT_TIMEOUT);    
523     it('BindingTestSuite: Should return new Int32Array from a c# int array.', () => {
524       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
525       var _document = karmaHTML.httpspec.document;
527       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Int32ArrayFrom", []);
528       assert.equal(arr.length, 50, "result does not match length of 50.");
529       assert.equal(Object.prototype.toString.call(arr), "[object Int32Array]", "TypedArray is not of type Int32Array" )
531     }, DEFAULT_TIMEOUT);    
533     it('BindingTestSuite: Should return new Float32Array from a c# float array.', () => {
534       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
535       var _document = karmaHTML.httpspec.document;
537       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Float32ArrayFrom", []);
538       assert.equal(arr.length, 50, "result does not match length of 50.");
539       assert.equal(Object.prototype.toString.call(arr), "[object Float32Array]", "TypedArray is not of type Float32Array" )
541     }, DEFAULT_TIMEOUT);    
543     it('BindingTestSuite: Should return new Float64Array from a c# double array.', () => {
544       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
545       var _document = karmaHTML.httpspec.document;
547       var arr = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:Float64ArrayFrom", []);
548       assert.equal(arr.length, 50, "result does not match length of 50.");
549       assert.equal(Object.prototype.toString.call(arr), "[object Float64Array]", "TypedArray is not of type Float64Array" )
550     }, DEFAULT_TIMEOUT);  
551     
552     it('BindingTestSuite: Should return Int8Array type.', () => {
553       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
554       var _document = karmaHTML.httpspec.document;
556       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Int8Array()]);
557       assert.equal(type, "Int8Array", "result does not match Int8Array.");
559     }, DEFAULT_TIMEOUT);    
560     
561     it('BindingTestSuite: Should return Uint8Array type.', () => {
562       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
563       var _document = karmaHTML.httpspec.document;
565       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Uint8Array()]);
566       assert.equal(type, "Uint8Array", "result does not match Uint8Array.");
568     }, DEFAULT_TIMEOUT);    
569     
570     it('BindingTestSuite: Should return Uint8ClampedArray type.', () => {
571       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
572       var _document = karmaHTML.httpspec.document;
574       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Uint8ClampedArray()]);
575       assert.equal(type, "Uint8ClampedArray", "result does not match Uint8ClampedArray.");
577     }, DEFAULT_TIMEOUT);    
578     
579     it('BindingTestSuite: Should return Int16Array type.', () => {
580       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
581       var _document = karmaHTML.httpspec.document;
583       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Int16Array()]);
584       assert.equal(type, "Int16Array", "result does not match Int16Array.");
586     }, DEFAULT_TIMEOUT);    
587     
588     it('BindingTestSuite: Should return Uint16Array type.', () => {
589       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
590       var _document = karmaHTML.httpspec.document;
592       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Uint16Array()]);
593       assert.equal(type, "Uint16Array", "result does not match Uint16Array.");
595     }, DEFAULT_TIMEOUT);    
596     
597     it('BindingTestSuite: Should return Int32Array type.', () => {
598       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
599       var _document = karmaHTML.httpspec.document;
601       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Int32Array()]);
602       assert.equal(type, "Int32Array", "result does not match Int32Array.");
604     }, DEFAULT_TIMEOUT);    
605     
606     it('BindingTestSuite: Should return Uint32Array type.', () => {
607       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
608       var _document = karmaHTML.httpspec.document;
610       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Uint32Array()]);
611       assert.equal(type, "Uint32Array", "result does not match Uint32Array.");
613     }, DEFAULT_TIMEOUT);    
614     
615     it('BindingTestSuite: Should return Float32Array type.', () => {
616       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
617       var _document = karmaHTML.httpspec.document;
619       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Float32Array()]);
620       assert.equal(type, "Float32Array", "result does not match Float32Array.");
622     }, DEFAULT_TIMEOUT);    
623     
624     it('BindingTestSuite: Should return Float64Array type.', () => {
625       //karmaHTML.httpspec.document gives the access to the Document object of 'http-spec.html' file
626       var _document = karmaHTML.httpspec.document;
628       var type = _document.Module.BINDING.call_static_method("[BindingsTestSuite]TestSuite.Program:TypedArrayType", [new Float64Array()]);
629       assert.equal(type, "Float64Array", "result does not match Float64Array.");
631     }, DEFAULT_TIMEOUT);    
633     
634   });