https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f31ef37b39dad03d8ba2fcfff0265c662c3bcd8c authored by Bernard Aboba on 02 April 2018, 17:37:00 UTC
Bring RTCCertificate interface up to date with Candidate Recommendation
Tip revision: f31ef37
storage_supported_property_names.html
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Storage Test: Supported property names</title>
<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["name"] = "user1";
            assert_array_equals(Object.getOwnPropertyNames(storage), ['name']);
        }, "Object.getOwnPropertyNames on " + name + " Storage");

        test(function() {
            var storage = window[name];
            storage.clear();
            assert_array_equals(Object.getOwnPropertyNames(storage), []);
        }, "Object.getOwnPropertyNames on " + name + " storage with empty collection");
    });
</script>
back to top