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

Side by Side Diff: LayoutTests/storage/indexeddb/resources/data-corruption.js

Issue 17060008: Add dataLoss property to IDB's upgradeneeded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix last usages of the bool Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 if (this.importScripts) { 1 if (this.importScripts) {
2 importScripts('../../../fast/js/resources/js-test-pre.js'); 2 importScripts('../../../fast/js/resources/js-test-pre.js');
3 importScripts('shared.js'); 3 importScripts('shared.js');
4 } 4 }
5 5
6 description("Test that data inserted into IndexedDB does not get corrupted on di sk."); 6 description("Test that data inserted into IndexedDB does not get corrupted on di sk.");
7 7
8 indexedDBTest(prepareDatabase, addData); 8 indexedDBTest(prepareDatabase, addData);
9 function prepareDatabase() 9 function prepareDatabase()
10 { 10 {
11 db = event.target.result; 11 db = event.target.result;
12 debug("setVersionSuccess():"); 12 debug("setVersionSuccess():");
13 shouldBeEqualToString("event.dataLoss", "none");
jsbell 2013/06/17 23:37:35 You should also add a "'dataLoss' in XXXXX" case t
dgrogan 2013/06/17 23:52:14 Done.
13 self.trans = evalAndLog("trans = event.target.transaction"); 14 self.trans = evalAndLog("trans = event.target.transaction");
14 shouldBeNonNull("trans"); 15 shouldBeNonNull("trans");
15 trans.onabort = unexpectedAbortCallback; 16 trans.onabort = unexpectedAbortCallback;
16 17
17 evalAndLog("db.createObjectStore('storeName')"); 18 evalAndLog("db.createObjectStore('storeName')");
18 } 19 }
19 20
20 var testDate = new Date('February 24, 1955 12:00:08'); 21 var testDate = new Date('February 24, 1955 12:00:08');
21 22
22 function addData() 23 function addData()
(...skipping 12 matching lines...) Expand all
35 var request = evalAndLog("request = transaction.objectStore('storeName').get ('key')"); 36 var request = evalAndLog("request = transaction.objectStore('storeName').get ('key')");
36 request.onerror = unexpectedErrorCallback; 37 request.onerror = unexpectedErrorCallback;
37 request.onsuccess = doCheck; 38 request.onsuccess = doCheck;
38 } 39 }
39 40
40 function doCheck() 41 function doCheck()
41 { 42 {
42 shouldBe("event.target.result.x.toString()", "testDate.toString()"); 43 shouldBe("event.target.result.x.toString()", "testDate.toString()");
43 finishJSTest(); 44 finishJSTest();
44 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698