Skip to content
This repository
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 30 lines (27 sloc) 0.748 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<!DOCTYPE HTML>
<html>
 <head>
  <title>Web Storage</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
    <h1>storage_session_setItem_QUOTA_EXCEEDED_ERR</h1>
    <div id="log"></div>
    <script>
        test(function() {
            sessionStorage.clear();

            var index = 0;
            var key = "name";
            var val = "user";

            assert_throws("QUOTA_EXCEEDED_ERR", function() {
                while (true) {
                    index++;
                    sessionStorage.setItem("" + key + index, "" + name + index);
                }
            });

            sessionStorage.clear();
        });
    </script>
 </body>
</html>
Something went wrong with that request. Please try again.