Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2014 The Chromium Authors. All rights reserved. | 3 Copyright 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 <!-- libc_free.html tests for basic load up. This file contains test | 7 <!-- libc_free.html tests for basic load up. This file contains test |
| 8 about IRT functionality. --> | 8 about IRT functionality. --> |
| 9 <head> | 9 <head> |
| 10 <title>NonSFI NaCl IRT Basic Test</title> | 10 <title>NonSFI NaCl IRT Basic Test</title> |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 function setupTests(tester, plugin) { | 26 function setupTests(tester, plugin) { |
| 27 tester.addAsyncTest('TestRandom', function(status) { | 27 tester.addAsyncTest('TestRandom', function(status) { |
| 28 plugin.addEventListener('message', function(message_event) { | 28 plugin.addEventListener('message', function(message_event) { |
| 29 this.removeEventListener('message', arguments.callee, false); | 29 this.removeEventListener('message', arguments.callee, false); |
| 30 status.assertEqual(message_event.data, 'randomsuccess'); | 30 status.assertEqual(message_event.data, 'randomsuccess'); |
| 31 status.pass(); | 31 status.pass(); |
| 32 }, false); | 32 }, false); |
| 33 plugin.postMessage('random'); | 33 plugin.postMessage('random'); |
| 34 }); | 34 }); |
| 35 tester.addAsyncTest('TestException', function(status) { | |
| 36 // This test crashes libc_free.nexe. | |
| 37 // This test must be the last test of the sequence. | |
| 38 // TODO(uekawa): Do I want to split this test out to a different location? | |
|
Junichi Uekawa
2014/04/17 07:54:56
I see existing tests related to signal handling in
| |
| 39 plugin.addEventListener('message', function(message_event) { | |
| 40 this.removeEventListener('message', arguments.callee, false); | |
| 41 status.assertEqual(message_event.data, 'exceptionsuccess'); | |
| 42 status.pass(); | |
| 43 }, false); | |
| 44 plugin.postMessage('exception'); | |
| 45 }); | |
| 35 }; | 46 }; |
| 36 | 47 |
| 37 var embed = create("libc_free.nmf"); | 48 var embed = create("libc_free.nmf"); |
| 38 document.body.appendChild(embed); | 49 document.body.appendChild(embed); |
| 39 | 50 |
| 40 var tester = new Tester(); | 51 var tester = new Tester(); |
| 41 setupTests(tester, embed); | 52 setupTests(tester, embed); |
| 42 tester.waitFor(embed); | 53 tester.waitFor(embed); |
| 43 tester.run(); | 54 tester.run(); |
| 44 | 55 |
| 45 </script> | 56 </script> |
| 46 </body> | 57 </body> |
| 47 </html> | 58 </html> |
| OLD | NEW |