Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <head> | 7 <head> |
| 8 <title>PNaCl Debug URL test</title> | 8 <title>PNaCl Debug URL test</title> |
| 9 <script type="text/javascript" src="load_util.js"></script> | 9 <script type="text/javascript" src="load_util.js"></script> |
| 10 <script type="text/javascript" src="nacltest.js"></script> | 10 <script type="text/javascript" src="nacltest.js"></script> |
| 11 </head> | 11 </head> |
| 12 <body> | 12 <body> |
| 13 <h2>PNaCl Debug URL Test</h2> | 13 <h2>PNaCl Debug URL Test</h2> |
| 14 </body> | 14 </body> |
| 15 <script> | 15 <script> |
| 16 | 16 |
| 17 function create(nmf_url) { | 17 function create(nmf_url) { |
| 18 var embed = document.createElement("embed"); | 18 var embed = document.createElement("embed"); |
| 19 embed.src = nmf_url; | 19 embed.src = nmf_url; |
| 20 embed.type = "application/x-pnacl"; | 20 embed.type = "application/x-pnacl"; |
| 21 embed.addEventListener("load", function(evt) { | 21 embed.addEventListener("load", function(evt) { |
| 22 load_util.shutdown("1 test passed.", true); | 22 load_util.shutdown("1 test passed.", true); |
| 23 // Remove the embed so that the debugger will shut down. | |
| 24 embed.parentNode.removeChild(embed); | |
|
bradn
2014/03/27 16:57:14
FWIW I've observed that the debug stub ends up kee
| |
| 23 }, true); | 25 }, true); |
| 24 embed.addEventListener("error", function(evt) { | 26 embed.addEventListener("error", function(evt) { |
| 25 load_util.log("Load error: " + embed.lastError); | 27 load_util.log("Load error: " + embed.lastError); |
| 26 load_util.shutdown("1 test failed.", false); | 28 load_util.shutdown("1 test failed.", false); |
| 29 // Remove the embed so that the debugger will shut down. | |
| 30 embed.parentNode.removeChild(embed); | |
| 27 }, true); | 31 }, true); |
| 28 document.body.appendChild(embed); | 32 document.body.appendChild(embed); |
| 29 } | 33 } |
| 30 | 34 |
| 31 var nmf_file = getTestArguments()['nmf_file']; | 35 var nmf_file = getTestArguments()['nmf_file']; |
| 32 create(nmf_file); | 36 create(nmf_file); |
| 33 | 37 |
| 34 </script> | 38 </script> |
| 35 </html> | 39 </html> |
| OLD | NEW |