https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7bed6bee0d70190e87bd48a71c81a1f6d79e8d97 authored by L. David Baron on 14 April 2018, 11:18:26 UTC
Sync Mozilla tests as of https://hg.mozilla.org/mozilla-central/rev/37b8862d354e0014a72715462dd2102dd5b599cc .
Tip revision: 7bed6be
storage_key_empty_string.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>WebStorage Test: Storage - key with empty string</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
  ["localStorage", "sessionStorage"].forEach(function(name) {
    test(function () {
      var storage = window[name];
      storage.clear();

      storage.setItem("", "empty string");
      assert_equals(storage.getItem(""), "empty string");

    }, name + ".key with empty string");
  });
</script>

back to top