| <!DOCTYPE html> |
| <html> |
| <!-- |
| Copyright 2015 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| <head> |
| <title>IDB test that a commit failing due to disk full results in a QuotaError</title> |
| <script type="text/javascript" src="common.js"></script> |
| <script> |
| |
| function test() { |
| indexedDBTest(prepareDatabase, startNewTransaction); |
| } |
| |
| function prepareDatabase() { |
| db = event.target.result; |
| objectStore = db.createObjectStore('store'); |
| } |
| |
| function startNewTransaction() { |
| tx = db.transaction('store', 'readwrite'); |
| tx.objectStore('store').put('value', 'key'); |
| tx.oncomplete = unexpectedCompleteCallback; |
| tx.onabort = function() { |
| shouldBeEqualToString("tx.error.name", "QuotaExceededError"); |
| done(); |
| }; |
| } |
| |
| </script> |
| </head> |
| <body onLoad="test()"> |
| <div id="status">Starting...</div> |
| </body> |
| </html> |