Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /webstorage/storage_local_setitem_quotaexceedederr.window.html - WPT Dashboard Interop Dashboard
test(function() {
localStorage.clear();
var index = 0;
var key = "name";
var val = "x".repeat(1024);
assert_throws_dom("QUOTA_EXCEEDED_ERR", function() {
while (true) {
index++;
localStorage.setItem("" + key + index, "" + val + index);
}
});
localStorage.clear();
}, "Throws QuotaExceededError when the quota has been exceeded");