Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1081)

Unified Diff: content/test/data/indexeddb/disk_full_on_commit.html

Issue 932143003: IndexedDB: Report QuotaExceededError when commit fails due to disk full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IndexedDBDatabaseError impl to cc file Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/indexeddb/disk_full_on_commit.html
diff --git a/content/test/data/indexeddb/disk_full_on_commit.html b/content/test/data/indexeddb/disk_full_on_commit.html
new file mode 100644
index 0000000000000000000000000000000000000000..c42c8504b8a8a35a763f5fa815f693a823723d99
--- /dev/null
+++ b/content/test/data/indexeddb/disk_full_on_commit.html
@@ -0,0 +1,37 @@
+<!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>
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698