OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <!-- |
| 4 Copyright 2015 The Chromium Authors. All rights reserved. |
| 5 Use of this source code is governed by a BSD-style license that can be |
| 6 found in the LICENSE file. |
| 7 --> |
| 8 <head> |
| 9 <title>IDB test that a commit failing due to disk full results in a QuotaError</
title> |
| 10 <script type="text/javascript" src="common.js"></script> |
| 11 <script> |
| 12 |
| 13 function test() { |
| 14 indexedDBTest(prepareDatabase, startNewTransaction); |
| 15 } |
| 16 |
| 17 function prepareDatabase() { |
| 18 db = event.target.result; |
| 19 objectStore = db.createObjectStore('store'); |
| 20 } |
| 21 |
| 22 function startNewTransaction() { |
| 23 tx = db.transaction('store', 'readwrite'); |
| 24 tx.objectStore('store').put('value', 'key'); |
| 25 tx.oncomplete = unexpectedCompleteCallback; |
| 26 tx.onabort = function() { |
| 27 shouldBeEqualToString("tx.error.name", "QuotaExceededError"); |
| 28 done(); |
| 29 }; |
| 30 } |
| 31 |
| 32 </script> |
| 33 </head> |
| 34 <body onLoad="test()"> |
| 35 <div id="status">Starting...</div> |
| 36 </body> |
| 37 </html> |
OLD | NEW |