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 <!-- |
| 5 Copyright 2014 The Chromium Authors. All rights reserved. |
| 6 Use of this source code is governed by a BSD-style license that can be |
| 7 found in the LICENSE file. |
| 8 --> |
| 9 <head> |
| 10 <meta http-equiv="Pragma" content="no-cache" /> |
| 11 <meta http-equiv="Expires" content="-1" /> |
| 12 <script type="text/javascript" src="nacltest.js"></script> |
| 13 <title>Nexe Crash Test</title> |
| 14 </head> |
| 15 <body> |
| 16 <h1>Nexe Crash Test</h1> |
| 17 <script type="text/javascript"> |
| 18 //<![CDATA[ |
| 19 function createModule(id) { |
| 20 return createNaClEmbed({ |
| 21 id: id, |
| 22 src: id + '.nmf', |
| 23 width: 1, |
| 24 height: 1, |
| 25 type: 'application/x-nacl' |
| 26 }); |
| 27 } |
| 28 var e = document.body; |
| 29 e.appendChild(createModule('irt_exception_test')); |
| 30 var tester = new Tester(); |
| 31 |
| 32 function AddTest(plugin, testName, expectedMessage) { |
| 33 tester.addAsyncTest(testName, function(test) { |
| 34 test.expectEvent(plugin, 'message', |
| 35 function(e) { |
| 36 if (e.data == expectedMessage) { |
| 37 test.pass(); |
| 38 } else { |
| 39 test.fail(); |
| 40 } |
| 41 }); |
| 42 test.expectEvent(plugin, 'crash', function() { test.fail(); }) |
| 43 plugin.postMessage(testName); |
| 44 }); |
| 45 tester.waitFor(plugin); |
| 46 } |
| 47 |
| 48 AddTest($('irt_exception_test'), |
| 49 'CrashViaSignalHandler', 'CrashViaSignalHandler:PASSED'); |
| 50 |
| 51 tester.run(); |
| 52 //]]> |
| 53 </script> |
| 54 </body> |
| 55 </html> |
OLD | NEW |