Revision a882c225d73268e3865e82acf56b748a9eae1ebd authored by plehegar on 19 June 2016, 18:57:41 UTC, committed by plehegar on 19 June 2016, 19:05:16 UTC
1 parent e7c1c0b
storage_local_setitem_quotaexceedederr.html
<!DOCTYPE HTML>
<html>
<head>
<title>WebStorage Test: localStorage - setItem throws QuotaExceededError</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>storage_local_setItem_QUOTA_EXCEEDED_ERR</h1>
<div id="log"></div>
<script>
test(function() {
localStorage.clear();
var index = 0;
var key = "name";
var val = "x".repeat(1024);
assert_throws("QUOTA_EXCEEDED_ERR", function() {
while (true) {
index++;
localStorage.setItem("" + key + index, "" + val + index);
}
});
localStorage.clear();
}, "Throws QuotaExceededError when the quota has been exceeded");
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...