https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f1016c6768b8c41100ecaab5e00da9c2853cdaf9 authored by James Graham on 22 April 2014, 20:07:16 UTC
Disable some tests that depend on https since we don't really support that yet.
Tip revision: f1016c6
storage_local_getitem.html
<!DOCTYPE HTML>
<html>
 <head>
  <title>Web Storage</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
    <h1>storage_local_getItem</h1>
    <div id="log"></div>
    <script>
        test(function() {
            localStorage.clear();
            localStorage.setItem("name", "user1");
            localStorage.setItem("age", "20");
            test(function() {
                assert_equals(localStorage.getItem("name"), "user1", "localStorage.getItem('name')")
                assert_equals(localStorage.getItem("unknown"), null, "localStorage.getItem('unknown')")
            }, "getItem method test")
        });
    </script>
 </body>
</html>
back to top