Index: chrome/test/data/nacl/irt_exception/irt_exception_test.html |
diff --git a/chrome/test/data/nacl/irt_exception/irt_exception_test.html b/chrome/test/data/nacl/irt_exception/irt_exception_test.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1b31f6c6031e83fe32af3e8fa274888d2e010c88 |
--- /dev/null |
+++ b/chrome/test/data/nacl/irt_exception/irt_exception_test.html |
@@ -0,0 +1,55 @@ |
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
+<html> |
+ <!-- |
+ Copyright 2014 The Chromium Authors. All rights reserved. |
+ Use of this source code is governed by a BSD-style license that can be |
+ found in the LICENSE file. |
+ --> |
+ <head> |
+ <meta http-equiv="Pragma" content="no-cache" /> |
+ <meta http-equiv="Expires" content="-1" /> |
+ <script type="text/javascript" src="nacltest.js"></script> |
+ <title>Nexe Crash Test</title> |
+ </head> |
+ <body> |
+ <h1>Nexe Crash Test</h1> |
+ <script type="text/javascript"> |
+ //<![CDATA[ |
+ function createModule(id) { |
+ return createNaClEmbed({ |
+ id: id, |
+ src: id + '.nmf', |
+ width: 1, |
+ height: 1, |
+ type: 'application/x-nacl' |
+ }); |
+ } |
+ var e = document.body; |
+ e.appendChild(createModule('irt_exception_test')); |
+ var tester = new Tester(); |
+ |
+ function AddTest(plugin, testName, expectedMessage) { |
+ tester.addAsyncTest(testName, function(test) { |
+ test.expectEvent(plugin, 'message', |
+ function(e) { |
+ if (e.data == expectedMessage) { |
+ test.pass(); |
+ } else { |
+ test.fail(); |
+ } |
+ }); |
+ test.expectEvent(plugin, 'crash', function() { test.fail(); }) |
+ plugin.postMessage(testName); |
+ }); |
+ tester.waitFor(plugin); |
+ } |
+ |
+ AddTest($('irt_exception_test'), |
+ 'CrashViaSignalHandler', 'CrashViaSignalHandler:PASSED'); |
+ |
+ tester.run(); |
+ //]]> |
+ </script> |
+ </body> |
+</html> |