| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <head> |
| 4 <title>WebStorage Test: missing arguments</title> |
| 5 <script src="../../../resources/testharness.js"></script> |
| 6 <script src="../../../resources/testharnessreport.js"></script> |
| 7 </head> |
| 8 <body> |
| 9 <h1>missing_arguments</h1> |
| 10 <div id="log"></div> |
| 11 <script> |
| 12 var tests = [ |
| 13 function() { localStorage.key(); }, |
| 14 function() { localStorage.getItem(); }, |
| 15 function() { localStorage.setItem(); }, |
| 16 function() { localStorage.setItem("a"); }, |
| 17 function() { localStorage.removeItem(); }, |
| 18 function() { sessionStorage.key(); }, |
| 19 function() { sessionStorage.getItem(); }, |
| 20 function() { sessionStorage.setItem(); }, |
| 21 function() { sessionStorage.setItem("a"); }, |
| 22 function() { sessionStorage.removeItem(); }, |
| 23 function() { new StorageEvent(); } |
| 24 ]; |
| 25 tests.forEach(function(fun) { |
| 26 test(function() { |
| 27 assert_throws(new TypeError(), fun); |
| 28 }, "Should throw TypeError for " + format_value(fun) + "."); |
| 29 }); |
| 30 </script> |
| 31 </body> |
| 32 </html> |
| OLD | NEW |