Mypal/testing/web-platform/tests/webstorage/storage_key_empty_string.html
2019-03-11 13:26:37 +03:00

21 lines
604 B
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>