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

Side by Side Diff: LayoutTests/storage/indexeddb/resources/testharness-helpers.js

Issue 1087923003: Indexed DB: Adopt BufferSource model for binary keys (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 function idb_test(description, onUpgrade, onOpen) {
2 async_test(function(t) {
3 var dbName = 'db' + location.pathname + '-' + description;
4 var deleteRequest = indexedDB.deleteDatabase(dbName);
5 deleteRequest.onerror = t.unreached_func('deleteDatabase should not fail ');
6 deleteRequest.onsuccess = t.step_func(function(e) {
7 var openRequest = indexedDB.open(dbName);
8 openRequest.onerror = t.unreached_func('open should not fail');
9 openRequest.onupgradeneeded = t.step_func(function(e) {
10 onUpgrade(t, openRequest.result);
11 });
12 openRequest.onsuccess = t.step_func(function(e) {
13 onOpen(t, openRequest.result);
14 });
15 });
16 }, description);
17 }
18
19 function assert_key_equals(a, b, message) {
20 assert_equals(indexedDB.cmp(a, b), 0, message);
cmumford 2015/04/27 17:14:23 expected is first argument.
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698