Index: samples/third_party/todomvc_performance/js_todomvc/components/polymer-localstorage/test/html/polymer-localstorage.html |
diff --git a/samples/third_party/todomvc_performance/js_todomvc/components/polymer-localstorage/test/html/polymer-localstorage.html b/samples/third_party/todomvc_performance/js_todomvc/components/polymer-localstorage/test/html/polymer-localstorage.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7234dbee9afd0d9c755c37797523ddf0a436e5f7 |
--- /dev/null |
+++ b/samples/third_party/todomvc_performance/js_todomvc/components/polymer-localstorage/test/html/polymer-localstorage.html |
@@ -0,0 +1,28 @@ |
+<!doctype html> |
+<html> |
+<head> |
+ <title>polymer-localstorage</title> |
+ <script src="../../../platform/platform.js"></script> |
+ <script src="../../../tools/test/htmltest.js"></script> |
+ <script src="../../../tools/test/chai/chai.js"></script> |
+ <link rel="import" href="../../polymer-localstorage.html"> |
+</head> |
+<body> |
+ |
+ <polymer-localstorage id="localstorage" name="polymer-localstorage-test" useRaw></polymer-localstorage> |
+ |
+ <script> |
+ var assert = chai.assert; |
+ document.addEventListener('polymer-ready', function() { |
+ var s = document.querySelector('#localstorage'); |
+ var m = 'hello wold'; |
+ window.localStorage.setItem(s.name, m); |
+ s.load(); |
+ assert.equal(s.value, m); |
+ s.value = 'goodbye'; |
+ assert.equal(window.localStorage.getItem(s.name), m); |
+ done(); |
+ }); |
+ </script> |
+</body> |
+</html> |