OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>polymer-localstorage</title> |
| 5 <script src="../../../platform/platform.js"></script> |
| 6 <script src="../../../tools/test/htmltest.js"></script> |
| 7 <script src="../../../tools/test/chai/chai.js"></script> |
| 8 <link rel="import" href="../../polymer-localstorage.html"> |
| 9 </head> |
| 10 <body> |
| 11 |
| 12 <polymer-localstorage id="localstorage" name="polymer-localstorage-test" useRa
w></polymer-localstorage> |
| 13 |
| 14 <script> |
| 15 var assert = chai.assert; |
| 16 document.addEventListener('polymer-ready', function() { |
| 17 var s = document.querySelector('#localstorage'); |
| 18 var m = 'hello wold'; |
| 19 window.localStorage.setItem(s.name, m); |
| 20 s.load(); |
| 21 assert.equal(s.value, m); |
| 22 s.value = 'goodbye'; |
| 23 assert.equal(window.localStorage.getItem(s.name), m); |
| 24 done(); |
| 25 }); |
| 26 </script> |
| 27 </body> |
| 28 </html> |
OLD | NEW |