|
1 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
2 <head> |
|
3 <title>sessionStorage basic test</title> |
|
4 |
|
5 <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
6 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
7 |
|
8 <script type="text/javascript"> |
|
9 |
|
10 function startTest() |
|
11 { |
|
12 // Check that we do not crash when we access the sessionStorage object from |
|
13 // chrome and that we throw. See bug 404453. |
|
14 var exceptionCaught = false; |
|
15 try { |
|
16 sessionStorage; |
|
17 } |
|
18 catch (e) { |
|
19 is(e.result, Components.results.NS_ERROR_NOT_AVAILABLE, |
|
20 "Testing that we get the expected exception."); |
|
21 exceptionCaught = true; |
|
22 } |
|
23 is(exceptionCaught, true, "Testing that an exception was thrown."); |
|
24 |
|
25 SimpleTest.finish(); |
|
26 } |
|
27 |
|
28 </script> |
|
29 |
|
30 </head> |
|
31 |
|
32 <body onload="startTest();"> |
|
33 </body> |
|
34 </html> |