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

Side by Side Diff: LayoutTests/storage/indexeddb/noblobs-expected.txt

Issue 18590006: Blob support for IDB [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: aaaaaaaand one more nit. Created 6 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
(Empty)
1 Confirm Blob/File/FileList limitations of WebKit's IndexedDB implementation.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self. msIndexedDB || self.OIndexedDB;
7
8 dbname = "noblobs.html"
9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname)
11 store = db.createObjectStore('storeName')
12 store.put('value', 'key')
13
14 testBlob():
15 PASS FileReader != null is true
16 test_content = 'This is a test. This is only a test.'
17 blob = new Blob([test_content])
18
19 validateExceptions(blob):
20 transaction = db.transaction('storeName', 'readwrite')
21 store = transaction.objectStore('storeName')
22 Expecting exception from store.put(blob, 'key')
23 PASS Exception was thrown.
24 PASS code is DOMException.DATA_CLONE_ERR
25 Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store currently does not support blob values.
26 Expecting exception from store.add(blob, 'key')
27 PASS Exception was thrown.
28 PASS code is DOMException.DATA_CLONE_ERR
29 Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store currently does not support blob values.
30 request = store.openCursor()
31 cursor = request.result
32 Expecting exception from cursor.update(blob)
33 PASS Exception was thrown.
34 PASS code is DOMException.DATA_CLONE_ERR
35 Exception message: Failed to execute 'update' on 'IDBCursor': The object store c urrently does not support blob values.
36
37 testFile():
38 file = fileInput.files[0]
39
40 validateExceptions(file):
41 transaction = db.transaction('storeName', 'readwrite')
42 store = transaction.objectStore('storeName')
43 Expecting exception from store.put(file, 'key')
44 PASS Exception was thrown.
45 PASS code is DOMException.DATA_CLONE_ERR
46 Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store currently does not support blob values.
47 Expecting exception from store.add(file, 'key')
48 PASS Exception was thrown.
49 PASS code is DOMException.DATA_CLONE_ERR
50 Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store currently does not support blob values.
51 request = store.openCursor()
52 cursor = request.result
53 Expecting exception from cursor.update(file)
54 PASS Exception was thrown.
55 PASS code is DOMException.DATA_CLONE_ERR
56 Exception message: Failed to execute 'update' on 'IDBCursor': The object store c urrently does not support blob values.
57
58 testFileList():
59 filelist = fileInput.files
60
61 validateExceptions(filelist):
62 transaction = db.transaction('storeName', 'readwrite')
63 store = transaction.objectStore('storeName')
64 Expecting exception from store.put(filelist, 'key')
65 PASS Exception was thrown.
66 PASS code is DOMException.DATA_CLONE_ERR
67 Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store currently does not support blob values.
68 Expecting exception from store.add(filelist, 'key')
69 PASS Exception was thrown.
70 PASS code is DOMException.DATA_CLONE_ERR
71 Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store currently does not support blob values.
72 request = store.openCursor()
73 cursor = request.result
74 Expecting exception from cursor.update(filelist)
75 PASS Exception was thrown.
76 PASS code is DOMException.DATA_CLONE_ERR
77 Exception message: Failed to execute 'update' on 'IDBCursor': The object store c urrently does not support blob values.
78 PASS successfullyParsed is true
79
80 TEST COMPLETE
81
OLDNEW
« no previous file with comments | « LayoutTests/storage/indexeddb/noblobs.html ('k') | LayoutTests/storage/indexeddb/resources/keypath-intrinsic-properties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698