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 <!-- | 3 <!-- |
4 Copyright (c) 2011 The Native Client Authors. All rights reserved. | 4 Copyright (c) 2012 The Native Client Authors. All rights reserved. |
5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
6 found in the LICENSE file. | 6 found in the LICENSE file. |
7 --> | 7 --> |
8 <html> | 8 <html> |
9 <head> | 9 <head> |
10 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> | 10 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> |
11 <META HTTP-EQUIV="Expires" CONTENT="-1" /> | 11 <META HTTP-EQUIV="Expires" CONTENT="-1" /> |
12 <title>PNACL Test Example (PPAPI Test Example Clone)</title> | 12 <title>PNACL Test Example (PPAPI Test Example Clone)</title> |
13 <script type="text/javascript" src="nacltest.js"></script> | 13 <script type="text/javascript" src="nacltest.js"></script> |
14 <script type="text/javascript" src="ppapi_test_example.js"></script> | 14 <script type="text/javascript" src="ppapi_test_example.js"></script> |
(...skipping 12 matching lines...) Expand all Loading... | |
27 | 27 |
28 var updateProgress = function() { | 28 var updateProgress = function() { |
29 var progress_div = $('progress_area'); | 29 var progress_div = $('progress_area'); |
30 progress_div.innerText += '.'; | 30 progress_div.innerText += '.'; |
31 } | 31 } |
32 var nexe_div = $('test_nexe'); | 32 var nexe_div = $('test_nexe'); |
33 nexe_div.addEventListener('loadstart', updateProgress, true); | 33 nexe_div.addEventListener('loadstart', updateProgress, true); |
34 nexe_div.addEventListener('progress', updateProgress, true); | 34 nexe_div.addEventListener('progress', updateProgress, true); |
35 nexe_div.addEventListener('load', updateProgress, true); | 35 nexe_div.addEventListener('load', updateProgress, true); |
36 nexe_div.addEventListener('loadend', updateProgress, true); | 36 nexe_div.addEventListener('loadend', updateProgress, true); |
37 nexe_div.addEventListener('loadend', updateProgress, true); | |
37 } | 38 } |
38 //]]> | 39 //]]> |
39 </script> | 40 </script> |
40 </head> | 41 </head> |
41 <body onload="pageDidLoad()"> | 42 <body onload="pageDidLoad()"> |
42 | 43 |
43 <h1>PNACL Test Example</h1> | 44 <h1>PNACL Test Example</h1> |
45 | |
46 <!-- Tests an nmf with both arch-specific and 'portable' field set, | |
47 but using an ENV flag that forces it to choose portable. --> | |
44 <embed type="application/x-nacl" id="test_nexe" | 48 <embed type="application/x-nacl" id="test_nexe" |
45 name="nacl_module" | 49 name="nacl_module" |
46 src="pnacl_test_example.nmf" | 50 src="pnacl_test_example.nmf" |
47 width="0" height="0" /> | 51 width="20" height="20" |
52 style="background-color:gray" /> | |
48 | 53 |
49 <script type="text/javascript"> | 54 <!-- Tests an with just the 'portable' field set. --> |
50 //<![CDATA[ | 55 <embed type="application/x-nacl" id="test_nexe2" |
jvoung - send to chromium...
2012/01/20 18:47:11
Well, now we are launching 6 nexes simultaneously
| |
51 var tester = new Tester(); | 56 name="nacl_module" |
52 setupTests(tester, $('test_nexe')); | 57 src="pnacl_test_example2.nmf" |
53 tester.waitFor($('test_nexe')); | 58 width="20" height="20" |
54 tester.run(); | 59 style="background-color:gray" /> |
55 //]]> | 60 |
56 </script> | 61 <script type="text/javascript"> |
62 //<![CDATA[ | |
63 var tester = new Tester(); | |
64 setupTests(tester, $('test_nexe')); | |
65 setupTests(tester, $('test_nexe2')); | |
66 tester.waitFor($('test_nexe')); | |
67 tester.waitFor($('test_nexe2')); | |
68 tester.run(); | |
69 //]]> | |
70 </script> | |
57 | 71 |
58 <p> This should tick when the UI thread is not blocked:</p> | 72 <p> This should tick when the UI thread is not blocked:</p> |
59 <div id="counter_area"> 0.0 </div> | 73 <div id="counter_area"> 0.0 </div> |
60 | 74 |
61 <p> Progress:</p> | 75 <p> Progress:</p> |
62 <div id="progress_area" style="font-size:28pt; color:#FF9900;"> </div> | 76 <div id="progress_area" style="font-size:28pt; color:#FF9900;"> </div> |
63 | 77 |
64 </body> | 78 </body> |
65 </html> | 79 </html> |
OLD | NEW |