| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| 3 <html> | |
| 4 <!-- Copyright 2009 Google Inc. All rights reserved. --> | |
| 5 <head> | |
| 6 <title> Browser Test Page </title> | |
| 7 <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> | |
| 8 <META HTTP-EQUIV="Expires" CONTENT="-1"> | |
| 9 <script type="text/javascript"> | |
| 10 //<![CDATA[ | |
| 11 // test_table descriptor consists of a number of rows. | |
| 12 // Each row contains a two element array. | |
| 13 // The first element is a "class" of test, which becomes a column heading. | |
| 14 // The second element is a list of test descriptors. | |
| 15 // Each test descriptor is a two element array containing a description and a | |
| 16 // link. | |
| 17 var test_table_descriptor = [ | |
| 18 [ 'Examples', | |
| 19 [ [ 'SRPC hello world example', 'srpc_hw.html' ], ] ], | |
| 20 [ 'Functionality Tests', | |
| 21 [ [ 'SRPC parameter passing test', 'srpc_basic.html' ], | |
| 22 [ 'SRPC plugin properties test', 'srpc_plugin.html' ], | |
| 23 [ 'SRPC socket address API test', 'srpc_sockaddr.html' ], | |
| 24 [ 'SRPC shared memory API test', 'srpc_shm.html' ], | |
| 25 [ 'SRPC resource descriptor transfer test', 'srpc_nrd_xfer.html' ], ] ], | |
| 26 [ 'NPAPI examples', | |
| 27 [ [ 'Hello world example', 'npapi_hw.html' ], ], ], | |
| 28 [ 'Manual tests - NO AUTOMATIC STATUS', | |
| 29 [ [ 'Pepper plugin', 'pepper_plugin.html' ], ], ], | |
| 30 | |
| 31 ]; | |
| 32 | |
| 33 var buildTable = function() { | |
| 34 var num_test_classes = test_table_descriptor.length; | |
| 35 var i; | |
| 36 var table = '<table border="10" cellpadding="5%" summary="Tests"><tr>'; | |
| 37 // Build the table heading row. | |
| 38 for (i = 0; i < num_test_classes; ++i) { | |
| 39 var test_class_descriptor = test_table_descriptor[i]; | |
| 40 var heading = test_class_descriptor[0]; | |
| 41 table += '<th>' + heading + '</th>'; | |
| 42 } | |
| 43 table += '</tr><tr>'; | |
| 44 // Build the tests row as a set of nested tables. | |
| 45 for (i = 0; i < num_test_classes; ++i) { | |
| 46 var test_class_descriptor = test_table_descriptor[i]; | |
| 47 var test_list = test_class_descriptor[1]; | |
| 48 var num_tests = test_list.length; | |
| 49 var j; | |
| 50 table += '<td valign="top"><table summary="Individual tests">'; | |
| 51 for (j = 0; j < num_tests; ++j) { | |
| 52 var test_descriptor = test_list[j]; | |
| 53 var test_name = test_descriptor[0]; | |
| 54 var test_link = test_descriptor[1]; | |
| 55 table += | |
| 56 '<tr><td>' + | |
| 57 '<button type="button" onclick="self.location=\'' + test_link + | |
| 58 '\'"> Go </button> ' + | |
| 59 test_name + | |
| 60 '</td></tr>'; | |
| 61 } | |
| 62 table += '</table></td>'; | |
| 63 } | |
| 64 table += '</tr></table>'; | |
| 65 // Install the table in the div element. | |
| 66 var table_div_element = document.getElementById('table_div'); | |
| 67 table_div_element.innerHTML = table; | |
| 68 } | |
| 69 //]]> | |
| 70 </script> | |
| 71 </head> | |
| 72 <body onload="buildTable()"> | |
| 73 <h1> Native Client Browser Examples and Tests </h1> | |
| 74 <div id="table_div"> </div> | |
| 75 </body> | |
| 76 </html> | |
| OLD | NEW |