| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta charset="utf-8"> | |
| 5 <title>Web Storage IDL tests</title> | |
| 6 <link rel="author" title="W3C" href="http://www.w3.org/" /> | |
| 7 <link rel="help" href="http://www.w3.org/TR/webstorage/#storage"/> | |
| 8 <script src="../../../resources/testharness.js"></script> | |
| 9 <script src="../../../resources/testharnessreport.js"></script> | |
| 10 <script src="../../../resources/WebIDLParser.js"></script> | |
| 11 <script src="../../../resources/idlharness.js"></script> | |
| 12 </head> | |
| 13 <body> | |
| 14 <h1>Web Storage IDL tests</h1> | |
| 15 <div id="log"></div> | |
| 16 | |
| 17 <pre id='untested_idl' style='display:none'> | |
| 18 [PrimaryGlobal] | |
| 19 interface Window { | |
| 20 }; | |
| 21 | |
| 22 interface Event { | |
| 23 }; | |
| 24 | |
| 25 interface EventInit { | |
| 26 }; | |
| 27 </pre> | |
| 28 | |
| 29 <pre id='idl'> | |
| 30 interface Storage { | |
| 31 readonly attribute unsigned long length; | |
| 32 DOMString? key(unsigned long index); | |
| 33 getter DOMString? getItem(DOMString key); | |
| 34 setter void setItem(DOMString key, DOMString value); | |
| 35 deleter void removeItem(DOMString key); | |
| 36 void clear(); | |
| 37 }; | |
| 38 [NoInterfaceObject] | |
| 39 interface WindowSessionStorage { | |
| 40 readonly attribute Storage sessionStorage; | |
| 41 }; | |
| 42 Window implements WindowSessionStorage; | |
| 43 [NoInterfaceObject] | |
| 44 interface WindowLocalStorage { | |
| 45 readonly attribute Storage localStorage; | |
| 46 }; | |
| 47 Window implements WindowLocalStorage; | |
| 48 [Constructor(DOMString type, optional StorageEventInit eventInitDict)] | |
| 49 interface StorageEvent : Event { | |
| 50 readonly attribute DOMString? key; | |
| 51 readonly attribute DOMString? oldValue; | |
| 52 readonly attribute DOMString? newValue; | |
| 53 readonly attribute DOMString url; | |
| 54 readonly attribute Storage? storageArea; | |
| 55 }; | |
| 56 | |
| 57 dictionary StorageEventInit : EventInit { | |
| 58 DOMString? key; | |
| 59 DOMString? oldValue; | |
| 60 DOMString? newValue; | |
| 61 DOMString url; | |
| 62 Storage? storageArea; | |
| 63 }; | |
| 64 </pre> | |
| 65 | |
| 66 <script> | |
| 67 | |
| 68 (function() { | |
| 69 var idl_array = new IdlArray(); | |
| 70 | |
| 71 idl_array.add_untested_idls(document.getElementById("untested_idl").textConten
t); | |
| 72 idl_array.add_idls(document.getElementById("idl").textContent); | |
| 73 | |
| 74 idl_array.add_objects({Storage: ["window.localStorage"]}); | |
| 75 | |
| 76 idl_array.test(); | |
| 77 })(); | |
| 78 | |
| 79 </script> | |
| 80 </body> | |
| 81 </html> | |
| OLD | NEW |