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

Side by Side Diff: LayoutTests/storage/indexeddb/idbcursor_continueprimarykey.html

Issue 1160853004: IndexedDB: continuePrimaryKey() on object store cursor should throw (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>IndexedDB: IDBCursor continuePrimaryKey() method</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6
7 async_test(function(t) {
8 var dbname = document.location + '-' + t.name;
9 var del = indexedDB.deleteDatabase(dbname);
10 del.onerror = t.unreached_func('deleteDatabase should succeed');
11 var open = indexedDB.open(dbname);
12 open.onerror = t.unreached_func('open should succeed');
13
14 open.onupgradeneeded = t.step_func(function() {
15 var db = open.result;
16 var store = db.createObjectStore('store');
17 store.put('a', 1).onerror = t.unreached_func('put should not fail');
18 var request = store.openCursor();
19 request.onerror = t.unreached_func('openCursor should not fail');
20 request.onsuccess = function() {
21 var cursor = request.result;
22 assert_true(cursor instanceof IDBCursor,
cmumford 2015/05/29 00:32:17 assert_class_string
jsbell 2015/05/29 00:35:12 Done.
23 'result should be a cursor');
24
25 assert_throws('InvalidAccessError', function() {
26 cursor.continuePrimaryKey(2, 2);
27 }, 'continuePrimaryKey() should throw if source is not an index');
28 };
29 });
30
31 open.onsuccess = t.step_func(function() {
32 var db = open.result;
33 db.close();
34 t.done();
35 });
36
37 }, 'IDBCursor continuePrimaryKey() on object store cursor');
38
39 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698