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

Side by Side Diff: LayoutTests/storage/indexeddb/deleteDatabase-event.html

Issue 235933010: deleteDatabase() success should be IDBVersionChangeEvent [Tests] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Propagate typo fix to expected file Created 6 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
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/deleteDatabase-event-expected.txt » ('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: Verify deleteDatabase success event</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 (function() {
7 var t = async_test('deleteDatabase success event type, existing DB');
8 t.step(function() {
9 var dbName = 'db' + location.pathname;
10 var openRequest = indexedDB.open(dbName, 9);
11 openRequest.onsuccess = t.step_func(function(e) {
12 var db = openRequest.result;
13 db.close();
14
15 var deleteRequest = indexedDB.deleteDatabase(dbName);
16 deleteRequest.onsuccess = t.step_func(function(e) {
17 assert_equals(deleteRequest.result, undefined,
18 '...the implementation must set the result of the request to undefined...');
19 assert_true(e instanceof IDBVersionChangeEvent,
20 'The event must implement the IDBVersionChangeEvent interface ...');
21 assert_equals(e.oldVersion, 9,
22 'and have oldVersion set to database version...');
23 assert_equals(e.newVersion, null,
24 'and have the newVersion property set to null.');
25 t.done();
26 });
27 });
28 });
29 }());
30
31 (function() {
32 var t = async_test('deleteDatabase success event, non-existent DB');
33 t.step(function() {
34
35 var dbName = 'db' + location.pathname + '-does-not-exist';
36 var deleteRequest = indexedDB.deleteDatabase(dbName);
37 deleteRequest.onsuccess = t.step_func(function(e) {
38 assert_equals(deleteRequest.result, undefined,
39 '...the implementation must set the result of the requ est to undefined...');
40 assert_true(e instanceof IDBVersionChangeEvent,
41 'The event must implement the IDBVersionChangeEvent inte rface ...');
42 assert_equals(e.oldVersion, 0,
43 'and have oldVersion set to database version...');
44 assert_equals(e.newVersion, null,
45 'and have the newVersion property set to null.');
46 t.done();
47 });
48 });
49 }());
50 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/deleteDatabase-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698