OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 function test() { | 5 function test() { |
6 if (window.webkitStorageInfo) { | 6 if (window.webkitStorageInfo) { |
7 window.jsTestIsAsync = true; | 7 window.jsTestIsAsync = true; |
8 webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY, | 8 webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY, |
9 initUsageCallback, | 9 initUsageCallback, |
10 unexpectedErrorCallback); | 10 unexpectedErrorCallback); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 startNewTransaction(); | 87 startNewTransaction(); |
88 } | 88 } |
89 | 89 |
90 function onAbort() { | 90 function onAbort() { |
91 shouldBeEqualToString("event.target.error.name", "QuotaExceededError"); | 91 shouldBeEqualToString("event.target.error.name", "QuotaExceededError"); |
92 done("Transaction aborted. Data added: " + displaySize(dataAdded)); | 92 done("Transaction aborted. Data added: " + displaySize(dataAdded)); |
93 debug("There were " + successfulWrites + " successful writes"); | 93 debug("There were " + successfulWrites + " successful writes"); |
94 } | 94 } |
95 | 95 |
96 function logError() { | 96 function logError() { |
97 debug("Error function called: (" + event.target.errorCode + ") " + | 97 debug("Error function called: (" + event.target.error.name + ") " + |
98 event.target.webkitErrorMessage); | 98 event.target.error.message); |
99 event.preventDefault(); | 99 event.preventDefault(); |
100 } | 100 } |
101 | |
OLD | NEW |