OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Set Exception Test</title> | 3 <title>Set Exception Test</title> |
4 <script src="npapi.js"></script> | 4 <script src="npapi.js"></script> |
5 </head> | 5 </head> |
6 | 6 |
7 <body> | 7 <body> |
8 | 8 |
9 <h2>Test that if NPN_SetException is called by an out of process plugin, the | 9 <h2>Test that if NPN_SetException is called by an out of process plugin, the |
10 exception is sent to the proper renderer.</h2> | 10 exception is sent to the proper renderer.</h2> |
11 | 11 |
12 <div id="PluginDiv"> | 12 <div id="PluginDiv"> |
13 <embed name="plg" type="application/x-webkit-test-netscape"></embed> | 13 <embed name="plg" type="application/x-webkit-test-netscape"></embed> |
14 </div> | 14 </div> |
15 <script> | 15 <script> |
16 var plg = window.document["plg"]; | 16 var plg = window.document["plg"]; |
17 try { | 17 try { |
18 plg.testThrowException(); | 18 plg.testThrowException(); |
19 } catch (e) { | 19 } catch (e) { |
20 onSuccess("npobject_set_exception", 1); | 20 /* try to match it with exception message thrown by TestNetscapePlugin */ |
| 21 if(e.message == "plugin object testThrowException SUCCESS"){ |
| 22 onSuccess("npobject_set_exception", 1) |
| 23 } |
| 24 else { |
| 25 onFailure("npobject_set_exception", 1, "Unexpected exception message throw
n") |
| 26 } |
21 } | 27 } |
22 </script> | 28 </script> |
23 </body> | 29 </body> |
24 </html> | 30 </html> |
OLD | NEW |