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

Side by Side Diff: LayoutTests/imported/web-platform-tests/IndexedDB/idbcursor_continue_index2.htm

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 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 <!DOCTYPE html>
2 <title>IDBCursor.continue() - index - attempt to pass a key parameter that is no t a valid key</title>
3 <link rel="author" title="Microsoft" href="http://www.microsoft.com">
4 <link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html# widl-IDBCursor-continue-void-any-key">
5 <link rel=assert title="If the key parameter is specified and fulfills any of th ese conditions this method must throw a DOMException of type DataError">
6 <link rel=assert title="The parameter is not a valid key.">
7 <script src="../../../resources/testharness.js"></script>
8 <script src="../../../resources/testharnessreport.js"></script>
9 <script src="support.js"></script>
10
11 <script>
12
13 var db,
14 t = async_test(),
15 records = [ { pKey: "primaryKey_0", iKey: "indexKey_0" },
16 { pKey: "primaryKey_1", iKey: "indexKey_1" } ];
17
18 var open_rq = createdb(t);
19 open_rq.onupgradeneeded = function(e) {
20 db = e.target.result;
21 var objStore = db.createObjectStore("test", {keyPath:"pKey"});
22
23 objStore.createIndex("index", "iKey");
24
25 for(var i = 0; i < records.length; i++)
26 objStore.add(records[i]);
27 };
28
29 open_rq.onsuccess = function(e) {
30 var cursor_rq = db.transaction("test")
31 .objectStore("test")
32 .index("index")
33 .openCursor();
34
35 cursor_rq.onsuccess = t.step_func(function(e) {
36 var cursor = e.target.result;
37
38 assert_throws("DataError",
39 function() { cursor.continue(document); });
40
41 assert_true(cursor instanceof IDBCursorWithValue, "cursor");
42
43 t.done();
44 });
45 };
46
47 </script>
48
49 <div id="log"></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698