| OLD | NEW |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 <html> | 3 <html> |
| 4 <!-- Copyright 2009 Google Inc. All rights reserved. --> | 4 <!-- Copyright 2009 Google Inc. All rights reserved. --> |
| 5 <head> | 5 <head> |
| 6 <title> SRPC Parameter Passing Test </title> | 6 <title> SRPC Parameter Passing Test </title> |
| 7 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> | 7 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> |
| 8 <META HTTP-EQUIV="Expires" CONTENT="-1" /> | 8 <META HTTP-EQUIV="Expires" CONTENT="-1" /> |
| 9 <style type="text/css"> | 9 <style type="text/css"> |
| 10 td.notrun { background-color: skyblue } | 10 td.notrun { background-color: skyblue } |
| 11 td.pass { background-color: lime } | 11 td.pass { background-color: lime } |
| 12 td.fail { background-color: red } | 12 td.fail { background-color: red } |
| 13 </style> | 13 </style> |
| 14 <script type="application/x-javascript"> | 14 <script type="application/x-javascript"> |
| 15 //<![CDATA[ | 15 //<![CDATA[ |
| 16 var SetTestResult = function(element_id, result) { | 16 var SetTestResult = function(element_id, result) { |
| 17 var element = document.getElementById(element_id); | 17 var element = document.getElementById(element_id); |
| 18 element.className = result; | 18 element.className = result; |
| 19 } | 19 } |
| 20 | 20 |
| 21 // The NaCl module. | 21 // The NaCl module. |
| 22 var server; | 22 var server; |
| 23 // The default socket address for the plugin. | 23 // The default socket address for the plugin. |
| 24 var default_addr; | 24 var default_addr; |
| 25 // The address string of the default socket address for the plugin. | |
| 26 var addr_str; | |
| 27 // The count of failing tests. Set from the queue length, and decremented | 25 // The count of failing tests. Set from the queue length, and decremented |
| 28 // whenever a test passes. | 26 // whenever a test passes. |
| 29 var failing_count; | 27 var failing_count; |
| 30 | 28 |
| 31 // The queue of small tests. | 29 // The queue of small tests. |
| 32 var testQueue = [ ]; | 30 var testQueue = [ ]; |
| 33 var appendTest = function(test_descr) { | 31 var appendTest = function(test_descr) { |
| 34 testQueue[testQueue.length] = test_descr; | 32 testQueue[testQueue.length] = test_descr; |
| 35 } | 33 } |
| 36 | 34 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 document.cookie = 'status=OK'; | 329 document.cookie = 'status=OK'; |
| 332 } | 330 } |
| 333 } | 331 } |
| 334 | 332 |
| 335 var EnqueueAndRunTests = function() { | 333 var EnqueueAndRunTests = function() { |
| 336 // Setup -- abort entire test if this fails. | 334 // Setup -- abort entire test if this fails. |
| 337 try { | 335 try { |
| 338 // If these fail at the beginning, all the tests will abort. | 336 // If these fail at the beginning, all the tests will abort. |
| 339 // Otherwise more specific tests are done on them. | 337 // Otherwise more specific tests are done on them. |
| 340 default_addr = server.__defaultSocketAddress(); | 338 default_addr = server.__defaultSocketAddress(); |
| 341 addr_str = default_addr.toString(); | |
| 342 } catch (string) { | 339 } catch (string) { |
| 343 window.alert('Socket address test setup failed.'); | 340 window.alert('Socket address test setup failed.'); |
| 344 return; | 341 return; |
| 345 } | 342 } |
| 346 // Enqueue the tests. | 343 // Enqueue the tests. |
| 347 ScalarTypes(); | 344 ScalarTypes(); |
| 348 ArrayTypes(); | 345 ArrayTypes(); |
| 349 SpecialTypes(); | 346 SpecialTypes(); |
| 350 // Run them all. | 347 // Run them all. |
| 351 RunAllTests(); | 348 RunAllTests(); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } else if (0 != failing_count) { | 692 } else if (0 != failing_count) { |
| 696 return "Tests failed."; | 693 return "Tests failed."; |
| 697 } else { | 694 } else { |
| 698 return ""; | 695 return ""; |
| 699 } | 696 } |
| 700 } | 697 } |
| 701 //]]> | 698 //]]> |
| 702 </script> | 699 </script> |
| 703 </body> | 700 </body> |
| 704 </html> | 701 </html> |
| OLD | NEW |